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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x110
cmp dword [ecx + 0x20], 0
je 0x40a0d7
mov esi, ecx
movzx eax, byte [ecx]
mov byte [esp + 0xf], 0
test eax, eax
je 0x40a0de
cmp al, 0x64
jb 0x40a0ed
lea ecx, [eax + eax*4]
lea ecx, [eax + ecx*8]
movzx ecx, cx
shr ecx, 0xc
imul edx, ecx, 0x64
sub al, dl
movzx eax, al
mov edx, eax
and edx, 2
mov edi, eax
or eax, 2
imul eax, edx
xor edx, 2
and edi, 0x7d
imul edi, edx
movzx eax, word [edi + eax + 0x43e448]
mov word [esp + 0xd], ax
mov edx, 1
mov eax, ecx
jmp 0x40a0f6
mov bl, 1
jmp 0x40a805
lea eax, [esp + 0xe]
mov dword [esp + 0x3c], eax
mov byte [esp + 0xe], 0x30
jmp 0x40a122
mov edx, 3
cmp al, 9
ja 0x40a10d
movzx eax, byte [eax + 0x43f560]
lea ecx, [esp + edx]
add ecx, 0xb
mov dword [esp + 0x3c], ecx
mov byte [esp + edx + 0xb], al
jmp 0x40a122
movzx eax, word [eax + eax + 0x43e448]
lea ecx, [esp + 0xd]
mov dword [esp + 0x3c], ecx
mov word [esp + 0xd], ax
lea eax, [esi + 0x10]
push eax
call fcn.00407030
add esp, 4
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x58]
mov eax, dword [eax + 0x48]
mov dword [esp + 0xe0], eax
lea ebx, [esp + 0xeb]
push ebx
call fcn.00434ba0
add esp, 4
mov dword [esp + 0xe4], edi
lea eax, [edi + 0x800]
push eax
call fcn.00436a00
add esp, 4
mov edi, eax
mov dword [esp + 0x44], 0
mov byte [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x40], 0x170b0608
mov byte [esp + 0x44], 0xb4
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x10]
cmp eax, 0x1c
ja 0x40a202
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
movzx ecx, byte [esp + ecx + 0x40]
lea edx, [eax + ecx]
add edx, 0x9f0efb98
add eax, 0x9f0efb98
and eax, ecx
add eax, eax
mov ecx, eax
xor ecx, edx
not eax
and eax, edx
add eax, eax
sub eax, ecx
add al, 0xd8
mov ecx, dword [esp + 0x10]
mov byte [esp + ecx + 0x40], al
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, 0x1d
jb 0x40a1c0
lea eax, [esp + 0x40]
mov ecx, esi
push ebx
push eax
push edi
call fcn.004098f0
mov dword [esp + 0x4f], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0x433c3a36
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x10]
cmp eax, 0x12
ja 0x40a288
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x10]
movzx edx, byte [esp + eax + 0x40]
lea eax, [ecx + edx]
add eax, 0x4ce84ecb
add ecx, 0x4ce84ecb
and ecx, edx
add ecx, ecx
sub eax, ecx
add al, 0x73
mov ecx, dword [esp + 0x10]
mov byte [esp + ecx + 0x40], al
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, 0x13
jb 0x40a250
mov ecx, esi
push dword [esp + 0x3c]
lea eax, [esp + 0x44]
push eax
push edi
call fcn.004098f0
mov eax, dword [0x440430]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0x6386888c
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x10]
cmp ecx, 0x1f
ja 0x40a32c
nop
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
movzx ebx, byte [esp + ecx + 0x40]
mov ecx, 0x4f
sub ecx, edx
add edx, 0xb0
and edx, ebx
or ecx, ebx
not ecx
add ecx, ebx
sub ecx, edx
add cl, 0x30
mov edx, dword [esp + 0x10]
mov byte [esp + edx + 0x40], cl
inc dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
cmp ecx, 0x20
jb 0x40a2f0
mov ecx, esi
push eax
lea eax, [esp + 0x44]
push eax
push edi
call fcn.004098f0
mov dword [esp + 0x40], 0x70c04f3
mov dword [esp + 0x44], 0xf403081b
mov dword [esp + 0x48], 0xe0d08fb
mov byte [esp + 0x4c], 0x6c
mov dword [esp + 0x4d], 0
mov dword [esp + 0x51], 0
mov dword [esp + 0x55], 0
mov byte [esp + 0x59], 0
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x10]
cmp eax, 0x19
ja 0x40a3d3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
movzx edx, byte [esp + ecx + 0x40]
lea ecx, [eax + edx]
add ecx, 0x8446e770
add eax, 0x8446e770
and eax, edx
add eax, eax
mov edx, eax
not edx
and edx, ecx
not ecx
and ecx, eax
sub edx, ecx
add dl, 0xf0
mov eax, dword [esp + 0x10]
mov byte [esp + eax + 0x40], dl
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, 0x1a
jb 0x40a390
mov dword [esp + 0x2b], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0x23acbcc5
mov dword [esp + 8], 0
mov eax, dword [esp + 8]
cmp eax, 0x1e
ja 0x40a472
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 8]
mov ecx, dword [esp + 8]
movzx edx, byte [esp + ecx + 0x10]
lea ecx, [eax + edx]
add ecx, 0x87570efb
add eax, 0xfb
and eax, edx
add eax, eax
mov edx, ecx
not edx
and edx, eax
not eax
and eax, ecx
sub eax, edx
add al, 0x23
mov ecx, dword [esp + 8]
mov byte [esp + ecx + 0x10], al
inc dword [esp + 8]
mov eax, dword [esp + 8]
cmp eax, 0x1f
jb 0x40a430
lea edx, [esp + 0x10]
mov ecx, esi
lea eax, [esp + 0x40]
push eax
push edx
mov dword [esp + 0x44], edi
push edi
call fcn.004098f0
mov byte [esp + 0x54], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0xe69e9496
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x10]
cmp eax, 0x14
ja 0x40a52f
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x10]
movzx edx, byte [esp + eax + 0x40]
lea eax, [ecx + edx]
add eax, 0xf9115dd6
lea ebx, [ecx + 0xd6]
and ebx, edx
mov edi, 0x6eea229
sub edi, ecx
or edi, edx
add edi, ecx
lea edx, [ebx + edi]
add edx, 0xf9115dd7
mov ecx, edx
not ecx
and ecx, eax
not eax
and eax, edx
sub ecx, eax
mov eax, ecx
xor eax, 0x25
and ecx, 0x25
lea eax, [eax + ecx*2]
inc al
mov ecx, dword [esp + 0x10]
mov byte [esp + ecx + 0x40], al
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, 0x15
jb 0x40a4d0
mov ecx, esi
push dword [esp + 0xe4]
push dword [esp + 0xe4]
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x48]
call fcn.00409bf0
mov eax, dword [esi + 0x60]
mov dword [esp + 0x40], 0x8331815b
mov dword [esp + 0x44], 0x9f109d34
mov dword [esp + 0x48], 0x9b2e9921
mov dword [esp + 0x4c], 0x97639516
mov dword [esp + 0x50], 0x931b913a
mov dword [esp + 0x54], 0x6fd36d22
mov dword [esp + 0x58], 0x6b8869a4
mov dword [esp + 0x5c], 0x67eb65dd
mov dword [esp + 0x60], 0x63ec61d2
mov dword [esp + 0x64], 0x7fcc7dd9
mov dword [esp + 0x68], 0x7bca79dd
mov dword [esp + 0x6c], 0x778575f6
mov dword [esp + 0x70], 0x73c171c8
mov dword [esp + 0x74], 0x4ffb4dc0
mov dword [esp + 0x78], 0x4bf449b9
mov dword [esp + 0x7c], 0x47c845e9
mov dword [esp + 0x80], 0x438541e5
mov dword [esp + 0x84], 0x5ffe5da2
mov dword [esp + 0x88], 0x5bd759ef
mov dword [esp + 0x8c], 0x57e855ec
mov dword [esp + 0x90], 0x53e251f5
mov dword [esp + 0x94], 0x2feb2dd9
mov dword [esp + 0x98], 0x2b97298c
mov dword [esp + 0x9c], 0x27eb25e2
mov dword [esp + 0xa0], 0x239f219a
mov dword [esp + 0xa4], 0x3f873ded
mov dword [esp + 0xa8], 0x3b84398e
mov dword [esp + 0xac], 0x3789358b
mov dword [esp + 0xb0], 0x338f318d
mov dword [esp + 0xb4], 0xfbe0d80
mov dword [esp + 0xb8], 0xbfb09b1
mov dword [esp + 0xbc], 0x71e051d
mov word [esp + 0xc0], 0x106
mov byte [esp + 0xde], 0
mov dword [esp + 0xda], 0
mov dword [esp + 0xd6], 0
mov dword [esp + 0xd2], 0
mov dword [esp + 0xce], 0
mov dword [esp + 0xca], 0
mov dword [esp + 0xc6], 0
mov dword [esp + 0xc2], 0
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x10]
cmp ecx, 0x9e
ja 0x40a733
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x10]
movzx edx, byte [esp + edx + 0x40]
lea edi, [ecx + 0x6b]
add ecx, edx
and edi, edx
add edi, edi
sub ecx, edi
add cl, 0x7e
mov edx, dword [esp + 0x10]
mov byte [esp + edx + 0x40], cl
inc dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
cmp ecx, 0x9f
jb 0x40a700
mov dword [esp + 0x10], 0x5bfb59af
mov dword [esp + 0x14], 0x57ef55e4
mov word [esp + 0x18], 0x5150
mov dword [esp + 0x1a], 0
mov dword [esp + 0x1e], 0
mov dword [esp + 0x22], 0
mov word [esp + 0x26], 0
mov dword [esp + 8], 0
mov ecx, dword [esp + 8]
cmp ecx, 0x17
ja 0x40a7cc
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 8]
mov edx, dword [esp + 8]
movzx edx, byte [esp + edx + 0x10]
lea edi, [ecx + 0x6aade34]
mov ebx, edx
not ebx
or ebx, edi
and edi, edx
add edi, ebx
neg edi
add ecx, edi
add ecx, 0x6aade33
mov edx, ecx
xor edx, 0x93
and ecx, 0x13
lea ecx, [edx + ecx*2]
inc cl
mov edx, dword [esp + 8]
mov byte [esp + edx + 0x10], cl
inc dword [esp + 8]
mov ecx, dword [esp + 8]
cmp ecx, 0x18
jb 0x40a780
push 0x493e0
push eax
mov edi, dword [esp + 0x44]
push edi
push 0
push 0
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.0040d930
add esp, 0x1c
mov ebx, eax
push edi
call fcn.00408f20
add esp, 4
mov eax, dword [esi + 0x60]
add dword [esi + 4], eax
mov dword [esi + 0x60], 0
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret