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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x4c
mov esi, dword [esp + 0x70]
push 0x4df40
call fcn.00408da0
add esp, 4
mov dword [esi], 0
xor edi, edi
test eax, eax
je 0x405581
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x68]
imul edx, dword [esp + 0x64]
lea eax, [edx + 1]
mov ecx, 0xfffffffe
mov dword [esp + 0x18], edx
sub ecx, edx
and ecx, ebx
mov edx, ebx
not edx
and edx, eax
imul edx, ecx
mov ecx, eax
and ecx, ebx
mov esi, eax
or esi, ebx
imul esi, ecx
mov dword [esp + 4], 0
mov dword [esp + 0x10], 1
add esi, edx
mov ecx, 0x79
cmp esi, 0x40
jl 0x404ff3
imul eax, dword [esp + 0x68]
add eax, 0x39
mov ecx, eax
mov dword [esp + 8], ecx
push ecx
call fcn.00408da0
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
mov esi, dword [esp + 0x14]
je 0x405438
mov dword [esp + 0x1c], 0x29
xor ebp, ebp
mov cl, 0x29
mov ebx, 0x29
jmp 0x40504a
mov eax, dword [esp + 0xc]
mov byte [eax + ebp], cl
mov dword [esp + 4], edi
mov ebx, dword [esp + 0x1c]
mov ebp, edi
dec ebx
mov dword [esp + 0x1c], ebx
mov ecx, ebx
je 0x4050c3
lea edi, [ebp + 1]
mov eax, dword [esp + 8]
cmp edi, eax
jbe 0x405030
cmp dword [esp + 0x10], 0
je 0x4050b4
mov byte [esp + 3], cl
jmp 0x405076
mov eax, esi
cmp edi, esi
jbe 0x405090
mov esi, 0x80
test eax, 0x7fffffc0
je 0x405070
add eax, eax
mov esi, eax
jmp 0x405070
push esi
push dword [esp + 0x10]
call fcn.00408dc0
add esp, 8
test eax, eax
je 0x4050b8
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov esi, dword [esp + 0x14]
movzx ecx, byte [esp + 3]
jmp 0x405034
mov edi, ebp
jmp 0x40503f
mov edi, ebp
mov esi, dword [esp + 0x14]
jmp 0x40503f
mov eax, dword [esp + 0x74]
cmp eax, 0xa
jb 0x4050d1
mov eax, 0xa
mov eax, dword [eax*4 + 0x43fa58]
mov edi, eax
or edi, 0x1000
mov dword [esi], 0x404ee0
lea ecx, [esp + 4]
mov dword [esi + 4], ecx
mov dword [esi + 8], edi
mov ecx, edi
and ecx, 0xfff
add ecx, 2
imul ecx, ecx, 0x5556
shr ecx, 0x10
inc ecx
mov dword [esi + 0xc], ecx
mov ecx, edi
xor ecx, 0xffffbfff
mov edx, eax
or edx, 0x4000
xor ebx, ebx
test ecx, edx
setne bl
mov dword [esi + 0x14], ebx
mov ecx, eax
shr ecx, 2
and ecx, 0x3ff
add ecx, 2
imul ecx, ecx, 0x5556
mov edx, ecx
shr edx, 0x10
shr ecx, 0xf
and ecx, 2
xor edx, 1
add edx, ecx
mov dword [esi + 0x10], edx
or eax, 0x8000
xor edi, 0xffff7fff
and edi, eax
jne 0x40516e
lea eax, [esi + 0x29272]
push 0x10000
push 0
push eax
call fcn.00408f30
add esp, 0xc
lea ecx, [esi + 0x9272]
lea edx, [esi + 0x9273]
lea eax, [esi + 0x39272]
mov dword [esi + 0x24], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x60], 0
mov dword [esi + 0x64], 0
mov dword [esi + 0x68], 0
mov dword [esi + 0x28], edx
mov dword [esi + 0x2c], ecx
mov byte [esi + 0x9272], 0
mov dword [esi + 0x38], 8
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x6c], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x50], 0
mov dword [esi + 0x4c], 0
mov dword [esi + 0x18], 1
mov dword [esi + 0x70], 0
mov dword [esi + 0x74], 0
mov dword [esi + 0x78], 0
mov dword [esi + 0x7c], 0
mov dword [esi + 0x80], 0
mov dword [esi + 0x84], 0
mov dword [esi + 0x88], 0
mov dword [esi + 0x8c], 0
test edi, edi
jne 0x40526f
lea eax, [esi + 0x90]
push 0x8101
push 0
push eax
call fcn.00408f30
add esp, 0xc
mov eax, esi
add eax, 0x8192
push 0x280
push 0
push eax
call fcn.00408f30
add esp, 0xc
cmp dword [esp + 0x68], 0
jle 0x405302
mov ecx, dword [esp + 0x68]
mov eax, ecx
or eax, 0xfffffffe
and ecx, 0xfffffffe
lea edi, [eax + ecx]
inc edi
xor ebx, ebx
lea ebp, [esp + 0x20]
jmp 0x4052d8
mov ecx, dword [esp + 0x18]
imul eax, ecx
add eax, dword [esp + 0x60]
mov dword [esp + 0x20], ecx
push 0
push 0
push 0
push ebp
push eax
push esi
call fcn.00403850
add esp, 0x18
inc ebx
dec edi
cmp dword [esp + 0x68], ebx
je 0x405302
mov dword [esp + 0x20], 1
push 0
push 0
push 0
push ebp
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.00403850
add esp, 0x18
mov eax, ebx
cmp dword [esp + 0x78], 0
je 0x4052b0
mov eax, edi
jmp 0x4052b0
mov dword [esp + 0x20], 0
lea edi, [esp + 0x20]
push 4
push 0
push 0
push edi
push 0
push esi
call fcn.00403850
add esp, 0x18
cmp eax, 1
jne 0x405446
mov ebp, dword [esp + 4]
lea ebx, [ebp - 0x29]
mov eax, dword [esp + 0x70]
mov dword [eax], ebx
push 0x29
push 0x43fa89
push edi
call fcn.00408dd0
add esp, 0xc
mov eax, dword [esp + 0x64]
mov byte [esp + 0x32], ah
mov byte [esp + 0x33], al
mov eax, dword [esp + 0x68]
mov byte [esp + 0x36], ah
mov byte [esp + 0x37], al
mov eax, dword [esp + 0x6c]
movzx eax, byte [eax + 0x43fa84]
mov byte [esp + 0x39], al
mov eax, ebx
shr eax, 0x18
mov byte [esp + 0x41], al
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x42], al
mov byte [esp + 0x43], bh
mov byte [esp + 0x44], bl
mov eax, 0xffffffff
mov ecx, 0xffffffef
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + ecx + 0x3d]
mov edi, eax
shr edi, 4
and eax, 0xf
mov esi, eax
xor esi, eax
xor esi, 0xf
and esi, edx
xor esi, eax
xor edi, dword [esi*4 + 0x43fa18]
mov eax, edi
shr eax, 4
mov esi, edi
and esi, 0xf
shr edx, 4
and edi, edx
add edx, esi
add edi, edi
sub edx, edi
mov edx, dword [edx*4 + 0x43fa18]
mov esi, eax
and esi, edx
add eax, edx
add esi, esi
sub eax, esi
inc ecx
jne 0x4053a0
not eax
bswap eax
mov dword [esp + 0x3d], eax
mov edi, dword [esp + 0xc]
push 0x29
lea eax, [esp + 0x24]
push eax
push edi
call fcn.00408dd0
add esp, 0xc
lea esi, [ebp + 0x10]
mov eax, dword [esp + 8]
cmp esi, eax
jbe 0x40547c
cmp dword [esp + 0x10], 0
jne 0x405426
mov eax, dword [esp + 0x14]
jmp 0x405563
mov eax, ebx
cmp esi, ebx
jbe 0x405458
mov ebx, 0x80
test eax, 0x7fffffc0
je 0x405420
add eax, eax
mov ebx, eax
jmp 0x405420
push esi
call fcn.00408db0
add esp, 4
jmp 0x405581
push esi
call fcn.00408db0
add esp, 4
push dword [esp + 0xc]
jmp 0x405577
push ebx
push edi
call fcn.00408dc0
add esp, 8
mov edi, eax
test eax, eax
mov eax, dword [esp + 0x14]
je 0x40555f
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov ebp, dword [esp + 4]
mov ebx, dword [esp + 0x70]
mov dword [edi + ebp + 0xc], 0x826042ae
mov dword [edi + ebp + 8], 0x444e4549
mov dword [edi + ebp + 4], 0
mov dword [edi + ebp], 0
mov dword [esp + 4], esi
mov edx, dword [ebx]
mov ecx, dword [esp + 0xc]
add edx, 4
je 0x405516
mov dword [esp + 0x18], esi
mov eax, 0xffffffff
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
movzx ebp, byte [ecx + edi + 0x25]
mov ebx, eax
shr ebx, 4
and eax, 0xf
mov esi, eax
xor esi, eax
xor esi, 0xf
and esi, ebp
xor esi, eax
xor ebx, dword [esi*4 + 0x43fa18]
mov eax, ebx
shr eax, 4
mov esi, ebx
and esi, 0xf
shr ebp, 4
and ebx, ebp
add ebp, esi
add ebx, ebx
sub ebp, ebx
mov esi, dword [ebp*4 + 0x43fa18]
mov ebx, eax
and ebx, esi
add eax, esi
add ebx, ebx
sub eax, ebx
inc edi
cmp edx, edi
jne 0x4054c0
not eax
mov ebx, dword [esp + 0x70]
mov esi, dword [esp + 0x18]
jmp 0x405518
xor eax, eax
mov edx, eax
shr edx, 0x18
mov byte [ecx + esi - 0x10], dl
mov ecx, eax
shr ecx, 0x10
mov edx, dword [esp + 4]
mov esi, dword [esp + 0xc]
mov byte [esi + edx - 0xf], cl
mov ecx, dword [esp + 4]
mov edx, dword [esp + 0xc]
mov byte [edx + ecx - 0xe], ah
mov ecx, dword [esp + 4]
mov edx, dword [esp + 0xc]
mov byte [edx + ecx - 0xd], al
add dword [ebx], 0x39
push dword [esp + 0x14]
call fcn.00408db0
add esp, 4
mov edi, dword [esp + 0xc]
jmp 0x405581
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x70]
mov dword [ecx], 0
push eax
call fcn.00408db0
add esp, 4
push edi
call fcn.00408db0
add esp, 4
xor edi, edi
mov eax, edi
add esp, 0x4c
pop esi
pop edi
pop ebx
pop ebp
ret