Function at 0x10004140
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
test ebx, ebx
jne 0x10004152
mov eax, 0x57
pop ebx
pop ecx
ret
cmp dword [ebx], 0
je 0x1000414a
cmp dword [ebx + 4], 0
je 0x1000414a
cmp byte [ebx + 8], 0
lea edx, [ebx + 8]
je 0x1000414a
cmp byte [ebx + 0x28], 0
lea ecx, [ebx + 0x28]
je 0x1000414a
push edi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x1000417f
lea eax, [edi + 0x57]
pop edi
pop ebx
pop ecx
ret
push ebp
mov ebp, dword [esp + 0x1c]
cmp ebp, 8
ja 0x10004193
pop ebp
pop edi
mov eax, 0x57
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100041a1
mov dword [eax], 0
imul eax, ebx, 0xe368
cmp byte [edx], 0
push esi
mov esi, 8
mov dword [esp + 0x10], eax
je 0x100041f8
mov ecx, edx
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100041b8
sub cl, dl
dec cl
cmp cl, 0x20
jae 0x100041f5
cmp cl, 0x1f
jae 0x100041cf
inc cl
movzx esi, cl
lea eax, [esi + 0xa]
cmp eax, ebp
jae 0x100044ac
push esi
push edx
lea eax, [edi + 0xa]
mov byte [edi + 8], 1
push eax
mov byte [edi + 9], cl
call fcn.10005890
add esp, 0xc
add esi, 0xa
lea ecx, [ebx + 0x28]
cmp dword [ebx], 0
je 0x10004217
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100044ac
mov word [esi + edi], 0x402
mov eax, dword [ebx]
mov dword [esi + edi + 2], eax
add esi, 6
cmp dword [ebx + 4], 0
je 0x10004238
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100044ac
mov word [esi + edi], 0x403
mov eax, dword [ebx + 4]
mov dword [esi + edi + 2], eax
add esi, 6
cmp byte [ecx], 0
je 0x1000428e
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004240
lea eax, [ebx + 0x28]
sub cl, al
dec cl
cmp cl, 0x20
jae 0x1000428e
cmp cl, 0x1f
jae 0x1000425a
inc cl
movzx edx, cl
lea eax, [esi + 2]
add eax, edx
mov dword [esp + 0x18], edx
cmp eax, ebp
jae 0x100044ac
mov byte [esi + edi], 4
lea eax, [ebx + 0x28]
mov byte [esi + edi + 1], cl
add esi, 2
push edx
push eax
lea eax, [esi + edi]
push eax
call fcn.10005890
add esp, 0xc
add esi, dword [esp + 0x18]
cmp dword [ebx + 0x48], 0
je 0x100042af
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100044ac
mov word [esi + edi], 0x405
mov eax, dword [ebx + 0x48]
mov dword [esi + edi + 2], eax
add esi, 6
cmp dword [ebx + 0x4c], 0
je 0x100042d0
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100044ac
mov word [esi + edi], 0x407
mov eax, dword [ebx + 0x4c]
mov dword [esi + edi + 2], eax
add esi, 6
cmp word [ebx + 0x50], 0
je 0x100042f4
lea eax, [esi + 4]
cmp eax, ebp
jae 0x100044ac
mov word [esi + edi], 0x206
mov ax, word [ebx + 0x50]
mov word [esi + edi + 2], ax
add esi, 4
cmp word [ebx + 0x52], 0
je 0x10004318
lea eax, [esi + 4]
cmp eax, ebp
jae 0x100044ac
mov word [esi + edi], 0x208
mov ax, word [ebx + 0x52]
mov word [esi + edi + 2], ax
add esi, 4
cmp dword [ebx + 0x54], 0
je 0x10004339
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100044ac
mov word [esi + edi], 0x409
mov eax, dword [ebx + 0x54]
mov dword [esi + edi + 2], eax
add esi, 6
cmp dword [ebx + 0x58], 0
je 0x1000435a
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100044ac
mov word [esi + edi], 0x40a
mov eax, dword [ebx + 0x58]
mov dword [esi + edi + 2], eax
add esi, 6
cmp word [ebx + 0x5c], 0
lea edx, [ebx + 0x5c]
je 0x100043b9
mov ecx, edx
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004366
sub ecx, edx
sar ecx, 1
dec cl
cmp cl, 0x20
jae 0x100043b9
cmp cl, 0x1f
jae 0x10004383
inc cl
add cl, cl
movzx eax, cl
mov dword [esp + 0x18], eax
add eax, 2
add eax, esi
cmp eax, ebp
jae 0x100044ac
push dword [esp + 0x18]
mov byte [esi + edi], 0xb
mov byte [esi + edi + 1], cl
add esi, 2
push edx
lea eax, [esi + edi]
push eax
call fcn.10005890
add esp, 0xc
add esi, dword [esp + 0x18]
cmp word [ebx + 0x9c], 0
lea edx, [ebx + 0x9c]
je 0x10004423
mov ecx, edx
jmp 0x100043d0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100043d0
sub ecx, edx
sar ecx, 1
dec cl
cmp cl, 0x20
jae 0x10004423
cmp cl, 0x1f
jae 0x100043ed
inc cl
add cl, cl
movzx eax, cl
mov dword [esp + 0x18], eax
add eax, 2
add eax, esi
cmp eax, ebp
jae 0x100044ac
push dword [esp + 0x18]
mov byte [esi + edi], 0xc
mov byte [esi + edi + 1], cl
add esi, 2
push edx
lea eax, [esi + edi]
push eax
call fcn.10005890
add esp, 0xc
add esi, dword [esp + 0x18]
cmp byte [ebx + 0xdc], 0
lea edx, [ebx + 0xdc]
je 0x1000447a
mov ecx, edx
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004434
sub cl, dl
dec cl
cmp cl, 0x30
jae 0x1000447a
cmp cl, 0x2f
jae 0x1000444b
inc cl
movzx eax, cl
mov dword [esp + 0x18], eax
add eax, 2
add eax, esi
cmp eax, ebp
jae 0x100044ac
mov ebp, dword [esp + 0x18]
mov byte [esi + edi], 0xd
mov byte [esi + edi + 1], cl
add esi, 2
push ebp
push edx
lea eax, [esi + edi]
push eax
call fcn.10005890
add esp, 0xc
add esi, ebp
add ebx, 0x10c
cmp byte [ebx], 0
je 0x100044d2
mov ecx, ebx
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004487
sub cl, bl
dec cl
cmp cl, 0x30
jae 0x100044d2
cmp cl, 0x2f
jae 0x1000449e
inc cl
movzx ebp, cl
lea eax, [ebp + 2]
add eax, esi
cmp eax, dword [esp + 0x20]
jb 0x100044b7
pop esi
pop ebp
pop edi
mov eax, 0x7a
pop ebx
pop ecx
ret
mov byte [esi + edi], 0xe
mov byte [esi + edi + 1], cl
add esi, 2
push ebp
push ebx
lea eax, [esi + edi]
push eax
call fcn.10005890
add esp, 0xc
add esi, ebp
lea ebx, [esi + 3]
xor ecx, ecx
and ebx, 0xfffffffc
xor edx, edx
mov dword [esp + 0x18], ebx
lea esi, [ebx - 8]
mov al, byte [edx + edi + 8]
test al, al
je 0x100044ef
add ecx, ecx
jmp 0x100044f0
inc ecx
movzx eax, al
inc edx
add ecx, eax
cmp edx, esi
jbe 0x100044e3
or eax, 0xffffffff
lea ebp, [ebx - 4]
test ecx, ecx
lea edx, [edi + 4]
cmove ecx, eax
mov eax, dword [esp + 0x10]
mov dword [edx], ecx
mov esi, eax
cmp ebp, 4
jb 0x1000453e
mov ebx, 4
mov ecx, 0x8790ea3
sub ebx, edx
xor esi, ecx
lea edx, [edx + 4]
xor dword [edx - 4], esi
lea eax, [ebx + edx]
add ecx, 0x3a6cd4
cmp eax, ebp
jbe 0x10004521
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
xor eax, 0xe9b35
mov dword [edi], eax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x1000454f
mov dword [eax], ebx
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
pop ecx
ret