Function at 0x40e940
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
mov eax, 0x14f0
call fcn.0044bc30
mov esi, dword [edx + 0x10]
mov edi, edx
mov edx, dword [edx + 0x30]
mov eax, esi
mov dword [esp + 0x14], edx
imul eax, edx
cmp eax, 0x3fffff
ja 0x40f57f
mov ebx, eax
shl ebx, 0xa
cmp ebx, 0x7ffffff9
jae 0x40f57f
test ebx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x54], ecx
je 0x40e9d4
movzx eax, byte [0x4af0d4]
xor ecx, ecx
mov edx, ebx
call fcn.0042bb70
test eax, eax
mov dword [esp + 4], eax
je 0x40f57f
mov eax, dword [esp + 0x10]
mov dword [esp + 8], esi
cmp eax, 2
jb 0x40e9e9
lea eax, [ebx - 0x400]
push eax
push 0
mov esi, dword [esp + 0xc]
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea eax, [esi + ebx - 0x400]
jmp 0x40e9f1
mov dword [esp + 4], 8
mov eax, dword [esp + 0x10]
mov dword [esp + 8], esi
cmp eax, 2
jae 0x40e9b5
test eax, eax
mov eax, dword [esp + 4]
je 0x40ea01
push 0x400
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov eax, dword [edi + 0x2c]
lea edx, [esp + 0xa0]
mov ecx, dword [edi]
mov esi, dword [esp + 0x14]
xorps xmm0, xmm0
mov dword [esp + 0x2c], edi
mov dword [esp + 0xe0], edx
lea edx, [esp + 0xa4]
mov dword [esp + 0xe4], 4
movsd qword [esp + 0xd20], xmm0
xorps xmm0, xmm0
mov dword [esp + 0xe8], edx
lea edx, [esp + 0xa8]
mov dword [esp + 0xec], 4
movaps xmmword [esp + 0xd10], xmm0
movaps xmmword [esp + 0xd00], xmm0
movaps xmmword [esp + 0xcf0], xmm0
movaps xmmword [esp + 0xce0], xmm0
mov dword [esp + 0xf0], edx
lea edx, [esp + 0xac]
mov dword [esp + 0xf4], 4
mov dword [esp + 0x70], eax
mov dword [esp + 0xa4], eax
mov eax, dword [edi + 0x34]
mov dword [esp + 0xf8], edx
lea edx, [esp + 0xb0]
mov dword [esp + 0xfc], 4
mov dword [esp + 0xa0], esi
mov dword [esp + 0x100], edx
lea edx, [esp + 0xb4]
mov dword [esp + 0x104], 4
mov dword [esp + 0x108], edx
lea edx, [esp + 0xb8]
mov dword [esp + 0x10c], 4
mov dword [esp + 0x110], edx
mov dword [esp + 0x114], 4
mov dword [esp + 0x118], ecx
mov ecx, dword [edi + 0xc]
mov edx, dword [edi + 8]
mov dword [esp + 0xa8], eax
mov eax, dword [edi + 0x38]
mov dword [esp + 0xbc], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0xac], eax
mov eax, dword [edi + 4]
mov dword [esp + 0xb8], eax
mov dword [esp + 0x11c], eax
lea eax, [esp + 0xbc]
mov dword [esp + 0x120], eax
mov eax, dword [edi + 0x24]
mov dword [esp + 0x124], 4
mov dword [esp + 0x128], edx
mov dword [esp + 0x12c], ecx
lea ecx, [esp + 0x10e8]
mov edx, dword [edi + 0x28]
mov dword [esp + 0x130], ecx
mov dword [esp + 0x134], 4
lea ecx, [esp + 0x4e0]
mov dword [esp + 0x138], eax
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x13c], edx
mov dword [esp + 0x140], ecx
mov dword [esp + 0x144], 4
mov dword [esp + 0x10e8], edx
lea ecx, [esp + 0xce0]
mov edx, 0x40
mov dword [esp + 0x148], eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x4e0], eax
mov dword [esp + 0x14c], eax
movzx eax, byte [edi + 0x3c]
mov dword [esp + 0x78], eax
mov dword [esp + 0xb0], eax
movzx eax, byte [edi + 0x3d]
mov dword [esp + 0x24], eax
mov dword [esp + 0xb4], eax
lea eax, [esp + 0xe0]
push 0xe
push eax
call fcn.0040f690
add esp, 8
movaps xmm1, xmmword [esp + 0xd00]
movaps xmm0, xmmword [esp + 0xd10]
movaps xmm2, xmmword [esp + 0xce0]
test esi, esi
movaps xmmword [esp + 0x900], xmm1
movaps xmm1, xmmword [esp + 0xcf0]
movaps xmmword [esp + 0x910], xmm0
movaps xmmword [esp + 0x8e0], xmm2
movaps xmmword [esp + 0x8f0], xmm1
je 0x40ed07
mov eax, dword [esp + 8]
mov ebx, dword [esp + 4]
mov edx, 1
xor edi, edi
xor esi, esi
mov ecx, eax
sub edx, eax
shl ecx, 0xa
mov dword [esp + 0x4c], edx
mov dword [esp + 0xc], ecx
nop
mov dword [esp + 0x920], 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x924], esi
mov esi, dword [esp + 0x10]
cmp edi, esi
jae 0x40f57f
mov ecx, ebx
mov edx, 0x400
push 0x48
lea eax, [esp + 0x8e4]
push eax
call fcn.0040fb70
add esp, 8
add edi, dword [esp + 8]
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x920], 1
add eax, edi
mov dword [esp + 0x50], edi
cmp eax, esi
jae 0x40f57f
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0xc]
mov edx, 0x400
lea edi, [ebx + eax]
add ebx, 0x400
inc esi
mov ecx, ebx
push 0x48
lea eax, [esp + 0x8e4]
push eax
call fcn.0040fb70
add esp, 8
mov ebx, edi
cmp dword [esp + 0x14], esi
mov edi, dword [esp + 0x50]
jne 0x40ec70
cmp dword [esp + 0x30], 0
mov edi, dword [esp + 8]
mov esi, dword [esp + 0x24]
je 0x40f3e1
cmp dword [esp + 0x14], 0
je 0x40f499
mov eax, dword [esp + 0x2c]
test edi, edi
mov ecx, dword [eax + 0x14]
mov dword [esp + 0x5c], ecx
je 0x40f581
mov ecx, dword [eax + 0x18]
mov edx, ecx
mov dword [esp + 0x18], ecx
not ecx
mov dword [esp + 0x90], ecx
add ecx, edi
neg edx
mov dword [esp + 0x8c], ecx
xor ecx, ecx
mov dword [esp + 0x94], edx
jmp 0x40ed6e
mov ecx, dword [esp + 0x74]
cmp ecx, dword [esp + 0x30]
je 0x40f3e1
lea edx, [ecx + 1]
test ecx, ecx
mov dword [esp + 0x40], ecx
sete byte [esp + 2]
mov dword [esp + 0x74], edx
mov edx, 0xffffffff
xor eax, eax
xor ecx, ecx
xor ebx, ebx
jmp 0x40eda5
mov eax, ebx
mov ebx, dword [esp + 0x18]
add ecx, ebx
sub eax, ebx
add edx, ebx
mov ebx, dword [esp + 0x58]
cmp ebx, 4
je 0x40ed60
mov dword [esp + 0x64], eax
lea eax, [ebx + 1]
test ebx, ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x84], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x80], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x58], eax
mov eax, ebx
sete byte [esp + 3]
mov edx, dword [esp + 0x64]
or eax, dword [esp + 0x40]
mov dword [esp + 0x68], edx
mov dword [esp + 0x7c], eax
mov eax, ebx
imul eax, dword [esp + 0x18]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x58]
imul eax, dword [esp + 0x18]
cmp ebx, 3
mov ebx, 0
cmove eax, ebx
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x44]
dec eax
mov dword [esp + 0x88], eax
jmp 0x40ee55
mov eax, dword [esp + 0xc]
add dword [esp + 0x2c], edi
sub dword [esp + 0x68], edi
add dword [esp + 0x6c], edi
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x84]
mov ebx, dword [esp + 0x64]
mov ecx, dword [esp + 0x80]
inc eax
cmp eax, dword [esp + 0x14]
mov dword [esp + 0xc], eax
je 0x40ed90
cmp esi, 1
je 0x40eef0
cmp esi, 2
jne 0x40ee6e
cmp dword [esp + 0x40], 0
je 0x40f34f
push 0x400
push 0
lea eax, [esp + 0x10f0]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x400
push 0
lea eax, [esp + 0x4e8]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x400
push 0
lea eax, [esp + 0x8e8]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov dword [esp + 0x3c], 0
cmp dword [esp + 0x7c], 0
mov eax, dword [esp + 0x18]
je 0x40efce
mov dword [esp + 0x28], 0
mov dword [esp + 0x34], 0
xor ebx, ebx
mov dword [esp + 0x48], 0
jmp 0x40f070
push 0x400
push 0
lea eax, [esp + 0x10f0]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x3d0
push 0
lea eax, [esp + 0x518]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x400
push 0
lea eax, [esp + 0x8e8]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x4e4], 0
mov dword [esp + 0x4e0], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x4ec], 0
mov dword [esp + 0x4e8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x4f0], ecx
mov dword [esp + 0x4f4], 0
mov dword [esp + 0x4fc], 0
mov dword [esp + 0x4f8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x504], 0
mov dword [esp + 0x500], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x50c], 0
mov dword [esp + 0x508], eax
mov al, 1
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x7c], 0
mov eax, dword [esp + 0x18]
jne 0x40eeca
cmp byte [esp + 0x3c], 0
mov ebx, 2
mov cl, 1
mov dword [esp + 0x34], 0
mov dword [esp + 0x48], ecx
je 0x40f05f
lea esi, [esp + 0x10e8]
mov dword [esp + 0x514], 0
mov dword [esp + 0x510], 1
lea edx, [esp + 0x4e0]
mov ecx, esi
push 0
lea ebx, [esp + 0x8e4]
push ebx
call fcn.0040fd60
add esp, 8
push 0x400
push ebx
lea ebx, [esp + 0xe8]
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov edx, ebx
mov ebx, 2
mov ecx, esi
push 0
lea eax, [esp + 0x8e4]
push eax
call fcn.0040fd60
mov eax, dword [esp + 0x20]
add esp, 8
mov dword [esp + 0x28], 1
jmp 0x40f070
mov dword [esp + 0x28], 0
nop word [eax + eax]
movzx edx, byte [esp + 2]
movzx ecx, byte [esp + 3]
mov dword [esp + 0x38], ecx
mov byte [esp + 1], dl
cmp ebx, eax
jae 0x40ee20
cmp byte [esp + 0x78], 0x10
mov ecx, dword [esp + 0xc]
setne byte [esp + 0x1c]
imul ecx, edi
xor edx, edx
add ecx, dword [esp + 0x44]
add ecx, ebx
mov eax, ecx
div edi
mov eax, 0
test edx, edx
cmove eax, edi
lea esi, [eax + ecx - 1]
movzx eax, byte [esp + 1]
mov ecx, dword [esp + 0x10]
xor al, 1
and al, byte [esp + 0x1c]
mov byte [esp + 0x23], al
mov eax, dword [esp + 0x2c]
add eax, ebx
mov edx, eax
shl edx, 0xa
add edx, dword [esp + 4]
cmp ecx, eax
cmova eax, ecx
add eax, dword [esp + 0x68]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x9c], eax
nop dword [eax + eax]
mov eax, dword [esp + 0x2c]
xor edx, edx
add eax, ebx
div edi
mov eax, dword [esp + 0x6c]
cmp edx, 1
lea eax, [eax + ebx]
cmovne eax, esi
cmp byte [esp + 0x3c], 0
mov dword [esp + 0x4c], eax
je 0x40f140
mov eax, ebx
and eax, 0x7f
je 0x40f1e8
lea eax, [esp + eax*8 + 0x8e0]
mov edx, dword [eax]
cmp byte [esp + 0x48], 0
mov edi, dword [esp + 0xc]
je 0x40f15e
jmp 0x40f16d
cmp eax, dword [esp + 0x10]
jae 0x40f57f
shl eax, 0xa
add eax, dword [esp + 4]
mov edx, dword [eax]
cmp byte [esp + 0x48], 0
mov edi, dword [esp + 0xc]
jne 0x40f16d
mov eax, dword [eax + 4]
mov ecx, edx
xor edx, edx
div dword [esp + 0x14]
mov edi, edx
mov edx, ecx
cmp byte [esp + 1], 0
mov dword [esp + 0x50], ebx
je 0x40f190
cmp byte [esp + 0x38], 0
je 0x40f1d0
dec ebx
jmp 0x40f27c
mov eax, dword [esp + 0x8c]
test ebx, ebx
mov esi, dword [esp + 8]
mov ecx, dword [esp + 0x98]
lea eax, [eax + ebx]
mov ebx, dword [esp + 0x94]
cmove ebx, dword [esp + 0x90]
add ebx, esi
cmp edi, dword [esp + 0xc]
cmove ebx, eax
jmp 0x40f282
cmp edi, dword [esp + 0xc]
jne 0x40f272
mov eax, dword [esp + 0x88]
add ebx, eax
jmp 0x40f27c
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
mov edi, ebx
lea edx, [esp + 0x4e0]
add ecx, 1
adc eax, 0
mov dword [esp + 0x28], ecx
mov dword [esp + 0x510], ecx
lea ecx, [esp + 0x10e8]
mov dword [esp + 0x34], eax
mov dword [esp + 0x514], eax
push 0
lea ebx, [esp + 0x8e4]
push ebx
call fcn.0040fd60
add esp, 8
push 0x400
push ebx
lea esi, [esp + 0xe8]
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
lea ecx, [esp + 0x10e8]
mov edx, esi
push 0
push ebx
call fcn.0040fd60
add esp, 8
mov eax, ebx
mov ebx, edi
mov edx, dword [eax]
cmp byte [esp + 0x48], 0
mov edi, dword [esp + 0xc]
je 0x40f15e
jmp 0x40f16d
cmp ebx, 1
mov ebx, dword [esp + 0x44]
sbb ebx, 0
mov esi, dword [esp + 8]
xor ecx, ecx
mov eax, edx
mul edx
mov eax, edx
mul ebx
xor eax, eax
add ecx, ebx
not edx
setb al
add ecx, edx
adc eax, 0xffffffff
push 0
push esi
push eax
push ecx
call fcn.00449210
add esp, 0x10
mov ecx, eax
mov eax, edi
mul esi
mov ebx, eax
mov eax, dword [esp + 0x50]
add ebx, ecx
cmp dword [esp + 0x9c], eax
je 0x40f57f
mov edi, eax
push 0x400
push dword [esp + 0x20]
lea eax, [esp + 0xce8]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x4c]
cmp esi, eax
jae 0x40f57f
cmp eax, ebx
jbe 0x40f57f
mov eax, dword [esp + 4]
mov ecx, esi
shl ebx, 0xa
inc edi
shl ecx, 0xa
add ebx, eax
add ecx, eax
movzx eax, byte [esp + 0x23]
mov edx, ebx
push eax
lea ebx, [esp + 0xce4]
push ebx
call fcn.0040fd60
add esp, 8
push 0x400
push ebx
mov ebx, edi
mov edi, dword [esp + 0x24]
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
add edi, 0x400
inc esi
cmp dword [esp + 0x18], ebx
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 8]
jne 0x40f0f0
jmp 0x40ee20
push 0x400
push 0
lea eax, [esp + 0x10f0]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x400
push 0
lea eax, [esp + 0x4e8]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x400
push 0
lea eax, [esp + 0x8e8]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov ecx, dword [esp + 0x60]
cmp ecx, 2
jb 0x40ef39
mov eax, dword [esp + 0x18]
mov dword [esp + 0x48], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x28], 0
mov byte [esp + 1], 1
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
xor ebx, ebx
cmp ebx, eax
jae 0x40ee20
jmp 0x40f08a
lea esi, [edi - 1]
cmp esi, dword [esp + 0x10]
jae 0x40f57f
mov eax, esi
shl eax, 0xa
add eax, dword [esp + 4]
push 0x400
push eax
lea eax, [esp + 0xe8]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
cmp dword [esp + 0x14], 2
jb 0x40f48c
mov ecx, dword [esp + 8]
mov edx, 1
mov eax, ecx
shl ecx, 0xa
shl eax, 0xb
add eax, dword [esp + 4]
nop dword [eax]
mov edi, edx
imul edi, dword [esp + 8]
add edi, esi
cmp edi, dword [esp + 0x10]
jae 0x40f57f
inc edx
mov edi, 0xffffff80
nop dword [eax]
movups xmm0, xmmword [eax + edi*8]
movups xmm2, xmmword [esp + edi*8 + 0x4e0]
movups xmm1, xmmword [eax + edi*8 + 0x10]
movups xmm3, xmmword [esp + edi*8 + 0x4f0]
xorps xmm2, xmm0
xorps xmm3, xmm1
movups xmmword [esp + edi*8 + 0x4e0], xmm2
movups xmmword [esp + edi*8 + 0x4f0], xmm3
add edi, 4
jne 0x40f450
add eax, ecx
cmp edx, dword [esp + 0x14]
jne 0x40f430
mov esi, dword [esp + 0x70]
test esi, esi
jns 0x40f4cd
jmp 0x40f57f
dec edi
cmp edi, dword [esp + 0x10]
jae 0x40f57f
shl edi, 0xa
add edi, dword [esp + 4]
push 0x400
push edi
lea eax, [esp + 0xe8]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov esi, dword [esp + 0x70]
test esi, esi
js 0x40f57f
je 0x40f521
mov ecx, 8
mov edx, esi
call fcn.0042bb70
test eax, eax
je 0x40f57f
mov ecx, dword [esp + 0x54]
mov edx, esi
mov dword [ecx], esi
mov dword [ecx + 4], eax
mov dword [ecx + 8], esi
mov ecx, eax
push 0x400
lea eax, [esp + 0xe4]
push eax
call fcn.0040fb70
add esp, 8
push dword [esp + 4]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 0x54]
mov dword [eax], 0
mov dword [eax + 4], 1
mov dword [eax + 8], 0
mov eax, dword [0x4af0c8]
test eax, eax
jne 0x40f683
lea ecx, [esp + 0xc0]
call fcn.0042c4e0
mov eax, 0x8000
and eax, dword [esp + 0xc0]
xor ecx, ecx
xor edx, edx
or ecx, ecx
or eax, edx
or eax, ecx
jne 0x40f57f
mov eax, dword [0x4af0c8]
test eax, eax
jne 0x40f57f
lea ecx, [esp + 0xd0]
call fcn.0042c4e0
ud2
cmp esi, 1
je 0x40f58d
cmp dword [esp + 0x24], 2
jne 0x40f57f
push 0x400
push 0
lea eax, [esp + 0x10f0]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea eax, [esp + 0x518]
push 0x3c8
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea edi, [esp + 0x8e0]
push 0x400
push 0
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
xorps xmm0, xmm0
lea esi, [esp + 0x10e8]
movaps xmmword [esp + 0x4e0], xmm0
xorps xmm0, xmm0
movsd qword [esp + 0x4f0], xmm0
mov dword [esp + 0x4fc], 0
mov dword [esp + 0x4f8], eax
mov dword [esp + 0x500], edx
mov dword [esp + 0x504], 0
mov dword [esp + 0x508], ecx
mov dword [esp + 0x50c], 0
mov dword [esp + 0x514], 0
mov dword [esp + 0x510], 1
lea edx, [esp + 0x4e0]
mov ecx, esi
push 0
push edi
call fcn.0040fd60
add esp, 8
push 0x400
push edi
lea ebx, [esp + 0xe8]
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov ecx, esi
mov edx, ebx
push 0
push edi
call fcn.0040fd60
add esp, 8
ud2
and eax, 0x8000
jmp 0x40f55e