Function at 0x4040f0
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x580
push ebx
push ebp
mov ebp, dword [esp + 0x58c]
push esi
mov esi, dword [esp + 0x594]
xor ebx, ebx
push edi
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
mov ecx, ebp
mov edx, esi
mov eax, dword [ecx]
add ecx, 4
mov edi, dword [esp + eax*4 + 0x54]
lea eax, [esp + eax*4 + 0x54]
inc edi
dec edx
mov dword [eax], edi
jne 0x40415d
cmp dword [esp + 0x54], esi
jne 0x404195
mov ecx, dword [esp + 0x5a8]
mov edx, dword [esp + 0x5ac]
mov dword [ecx], ebx
mov dword [edx], ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x580
ret
mov edi, dword [esp + 0x5ac]
mov ecx, 1
mov esi, dword [edi]
mov dword [esp + 0x14], esi
cmp dword [esp + ecx*4 + 0x54], ebx
jne 0x4041b3
inc ecx
cmp ecx, 0xf
jbe 0x4041a7
mov edx, ecx
cmp esi, ecx
mov dword [esp + 0x10], edx
jae 0x4041c3
mov dword [esp + 0x14], ecx
mov esi, ecx
mov eax, 0xf
cmp dword [esp + eax*4 + 0x54], ebx
jne 0x4041d1
dec eax
jne 0x4041c8
cmp esi, eax
mov dword [esp + 0x38], eax
jbe 0x4041df
mov dword [esp + 0x14], eax
mov esi, eax
mov dword [edi], esi
mov edi, 1
shl edi, cl
cmp ecx, eax
jae 0x4041f9
sub edi, dword [esp + ecx*4 + 0x54]
js 0x404205
inc ecx
add edi, edi
cmp ecx, eax
jb 0x4041ec
mov ecx, dword [esp + eax*4 + 0x54]
sub edi, ecx
mov dword [esp + 0x50], edi
jns 0x404215
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x580
ret
add ecx, edi
mov dword [esp + 0x98], ebx
mov dword [esp + eax*4 + 0x54], ecx
xor ecx, ecx
dec eax
je 0x40423a
xor edi, edi
add ecx, dword [esp + edi + 0x58]
add edi, 4
dec eax
mov dword [esp + edi + 0x98], ecx
jne 0x404229
xor edi, edi
mov eax, dword [ebp]
add ebp, 4
cmp eax, ebx
je 0x40425e
mov ecx, dword [esp + eax*4 + 0x94]
lea eax, [esp + eax*4 + 0x94]
mov dword [esp + ecx*4 + 0x110], edi
inc ecx
mov dword [eax], ecx
mov eax, dword [esp + 0x598]
inc edi
cmp edi, eax
jb 0x40423c
mov edi, dword [esp + 0x38]
lea eax, [esp + 0x110]
mov dword [esp + 0x1c], eax
mov eax, esi
neg eax
xor ebp, ebp
cmp edx, edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0xd4], ebx
mov dword [esp + 0x44], ebx
jg 0x40453c
lea ecx, [edx - 1]
mov dword [esp + 0x30], ecx
lea ecx, [esp + edx*4 + 0x54]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
test ecx, ecx
je 0x40451b
jmp 0x4042c8
mov ecx, dword [esp + 0x3c]
lea edi, [eax + esi]
dec ecx
cmp edx, edi
mov dword [esp + 0x3c], ecx
jle 0x4043fc
inc ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x4c], ecx
mov ecx, eax
sub ecx, esi
jmp 0x4042eb
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x38]
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x34]
add eax, esi
sub edx, eax
inc edi
add ecx, esi
add ebx, esi
cmp edx, esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x34], ebx
jbe 0x404316
mov edx, esi
mov ebx, dword [esp + 0x10]
sub ebx, eax
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp eax, dword [esp + 0x4c]
jbe 0x404356
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x28]
or ecx, 0xffffffff
sub ecx, edi
add eax, ecx
cmp ebx, edx
jae 0x404356
inc ebx
cmp ebx, edx
jae 0x404356
mov ecx, dword [esi + 4]
add esi, 4
add eax, eax
cmp eax, ecx
jbe 0x404356
sub eax, ecx
inc ebx
cmp ebx, edx
jb 0x404343
mov esi, dword [esp + 0x5b0]
mov ebp, 1
mov ecx, ebx
push 8
mov eax, dword [esi + 0x28]
shl ebp, cl
lea edx, [ebp + 1]
push edx
push eax
call dword [esi + 0x20]
add esp, 0xc
test eax, eax
je 0x404561
mov edx, dword [esp + 0x5a8]
lea ecx, [eax + 8]
add eax, 4
mov dword [esp + 0x44], ecx
mov dword [edx], ecx
mov dword [esp + 0x5a8], eax
mov dword [eax], 0
mov eax, dword [esp + 0x18]
test eax, eax
lea edi, [esp + eax*4 + 0xd4]
mov dword [edi], ecx
je 0x4043e0
mov esi, dword [esp + 0x2c]
mov byte [esp + 0x20], bl
mov dword [esp + eax*4 + 0x94], esi
mov al, byte [esp + 0x14]
mov byte [esp + 0x21], al
mov edx, dword [esp + 0x20]
mov eax, ecx
mov ecx, dword [esp + 0x40]
shr esi, cl
mov ecx, dword [edi - 4]
mov dword [esp + 0x24], eax
mov dword [ecx + esi*8], edx
mov dword [ecx + esi*8 + 4], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
cmp ecx, eax
mov eax, dword [esp + 0x48]
jg 0x4042e7
mov ebx, dword [esp + 0x2c]
mov cl, byte [esp + 0x10]
mov edx, dword [esp + 0x598]
sub cl, al
mov byte [esp + 0x21], cl
mov ecx, dword [esp + 0x1c]
lea edx, [esp + edx*4 + 0x110]
cmp ecx, edx
jb 0x404423
mov byte [esp + 0x20], 0xc0
jmp 0x404473
mov ecx, dword [ecx]
mov edx, dword [esp + 0x59c]
cmp ecx, edx
jae 0x404448
cmp ecx, 0x100
mov dword [esp + 0x24], ecx
sbb dl, dl
and dl, 0xa0
add dl, 0x60
mov byte [esp + 0x20], dl
jmp 0x40446e
sub ecx, edx
shl ecx, 2
mov edi, ecx
mov ecx, dword [esp + 0x5a4]
mov dl, byte [edi + ecx]
mov ecx, dword [esp + 0x5a0]
add dl, 0x50
mov byte [esp + 0x20], dl
mov edx, dword [edi + ecx]
mov dword [esp + 0x24], edx
add dword [esp + 0x1c], 4
mov ecx, dword [esp + 0x10]
mov edi, 1
sub ecx, eax
mov edx, ebx
shl edi, cl
mov ecx, eax
shr edx, cl
cmp edx, ebp
jae 0x4044b1
mov ecx, dword [esp + 0x44]
lea ecx, [ecx + edx*8]
mov ebx, dword [esp + 0x20]
add edx, edi
mov dword [ecx], ebx
mov ebx, dword [esp + 0x24]
mov dword [ecx + 4], ebx
lea ebx, [edi*8]
add ecx, ebx
cmp edx, ebp
jb 0x404491
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, 1
shl edx, cl
test ebx, edx
je 0x4044c8
xor ebx, edx
shr edx, 1
test ebx, edx
jne 0x4044c0
mov edi, 1
mov ecx, eax
shl edi, cl
xor ebx, edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x2c], ebx
mov ecx, dword [esp + edx*4 + 0x94]
dec edi
and edi, ebx
cmp edi, ecx
je 0x404507
sub eax, esi
mov edi, 1
mov ecx, eax
dec edx
shl edi, cl
mov ecx, dword [esp + edx*4 + 0x94]
dec edi
and edi, ebx
cmp edi, ecx
jne 0x4044e9
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x10]
test ecx, ecx
jne 0x4042c4
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
inc edx
add ecx, 4
mov dword [esp + 0x10], edx
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x30]
inc ecx
cmp edx, edi
mov dword [esp + 0x30], ecx
jle 0x4042b4
mov eax, dword [esp + 0x50]
test eax, eax
je 0x404188
cmp edi, 1
je 0x404188
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x580
ret
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40457a
mov edx, dword [esp + 0xd4]
push esi
push edx
call fcn.00404820
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0xfffffffc
pop ebx
add esp, 0x580
ret