Function at 0x40f830
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [esp + 0x14]
push esi
push edi
mov esi, ecx
mov dword [esp + 0x1c], 0
mov edi, edx
mov dword [esp + 0x2c], esi
lea edx, [esp + 0x70]
mov dword [esp + 0x30], edi
mov ecx, ebx
mov dword [esp + 0x70], 1
mov dword [esp + 0x74], 1
mov dword [esp + 0x78], eax
call fcn.0040eed0
test eax, eax
jne 0x40f886
mov eax, 0xfffffff4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, ebx
mov dword [esp + 0x34], 1
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x58], 1
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x4c], 1
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x64], 1
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
call fcn.0040ee40
test eax, eax
jns 0x40f945
test esi, esi
je 0x40f925
xor edx, edx
mov ecx, esi
call fcn.0040e200
mov esi, eax
test esi, esi
jne 0x40fe11
test edi, edi
je 0x40f93c
mov edx, ebx
mov ecx, edi
call fcn.0040df40
mov esi, eax
test esi, esi
jne 0x40fe11
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, ebx
lea ecx, [esp + 0x34]
call fcn.0040df40
mov esi, eax
test esi, esi
jne 0x40fd3d
mov edx, dword [ebp + 0xc]
lea ecx, [esp + 0x40]
call fcn.0040df40
mov esi, eax
test esi, esi
jne 0x40fd3d
mov edx, dword [ebx + 4]
lea ecx, [esp + 0x58]
add edx, 2
mov dword [esp + 0x40], 1
mov dword [esp + 0x34], 1
call fcn.0040dde0
mov esi, eax
test esi, esi
jne 0x40fd3d
xor edx, edx
lea ecx, [esp + 0x58]
call fcn.0040e200
mov esi, eax
test esi, esi
jne 0x40fd3d
lea edx, [eax + 2]
lea ecx, [esp + 0x4c]
call fcn.0040dde0
mov esi, eax
test esi, esi
jne 0x40fd3d
lea edx, [eax + 3]
lea ecx, [esp + 0x64]
call fcn.0040dde0
mov esi, eax
test esi, esi
jne 0x40fd3d
lea ecx, [esp + 0x40]
call fcn.0040e460
and eax, 0x1f
cmp eax, 0x1f
jae 0x40fa22
mov ebx, 0x1f
lea ecx, [esp + 0x34]
sub ebx, eax
mov edx, ebx
mov dword [esp + 0x1c], ebx
call fcn.0040ec70
mov esi, eax
test esi, esi
jne 0x40fd3d
mov edx, ebx
lea ecx, [esp + 0x40]
call fcn.0040ec70
mov esi, eax
test esi, esi
jne 0x40fd3d
jmp 0x40fa2a
mov dword [esp + 0x1c], 0
mov ebx, dword [esp + 0x38]
lea ecx, [esp + 0x40]
mov eax, dword [esp + 0x44]
dec ebx
dec eax
mov edi, ebx
sub edi, eax
mov dword [esp + 0x10], eax
mov eax, edi
mov dword [esp + 0x18], edi
shl eax, 5
mov edx, eax
mov dword [esp + 0xc], eax
call fcn.0040ec70
mov esi, eax
test esi, esi
jne 0x40fd3d
lea edx, [esp + 0x40]
lea ecx, [esp + 0x34]
call fcn.0040eed0
test eax, eax
js 0x40faaa
mov eax, dword [esp + 0x60]
lea edi, [eax + edi*4]
inc dword [edi]
lea eax, [esp + 0x40]
lea edx, [esp + 0x34]
push eax
mov ecx, edx
call fcn.0040f2a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40fd3d
lea edx, [esp + 0x40]
lea ecx, [esp + 0x34]
call fcn.0040eed0
test eax, eax
jns 0x40fa76
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x40]
call fcn.0040ed50
mov esi, eax
test esi, esi
jne 0x40fd3d
mov ecx, dword [esp + 0x10]
cmp ebx, ecx
jbe 0x40fccd
mov eax, dword [esp + 0x48]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0xc]
add eax, 0xffffffe0
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x60]
sub eax, 4
lea edi, [eax + edi*4]
nop dword [eax]
mov eax, dword [esp + 0x3c]
mov esi, dword [eax + ebx*4]
lea eax, [eax + ebx*4]
mov edx, dword [ecx]
mov dword [esp + 0x18], eax
cmp esi, edx
jae 0x40fb2e
test edx, edx
je 0x40fb2e
cmp esi, edx
jae 0x40fb2e
mov ecx, dword [eax - 4]
xor eax, eax
push 0
push edx
or eax, esi
push eax
push ecx
call sub.ntdll.dll__aulldiv
test edx, edx
jne 0x40fb26
cmp eax, 0xffffffff
jbe 0x40fb31
mov dword [esp + 0x24], 0
or eax, 0xffffffff
inc eax
mov dword [edi], eax
dec dword [edi]
lea ecx, [esp + 0x4c]
xor edx, edx
call fcn.0040e200
mov esi, eax
test esi, esi
jne 0x40fd3d
cmp dword [esp + 0x10], 1
jb 0x40fb59
mov eax, dword [esp + 0x14]
mov eax, dword [eax - 4]
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0x4c]
mov dword [esp + 0x7c], 1
mov dword [esp + 0x80], 1
mov dword [ecx], eax
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
mov dword [ecx + 4], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x84], eax
mov ecx, edx
mov eax, dword [edi]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x7c]
push eax
call fcn.0040f620
mov esi, eax
add esp, 4
test esi, esi
jne 0x40fd3d
xor edx, edx
lea ecx, [esp + 0x64]
call fcn.0040e200
mov esi, eax
test esi, esi
jne 0x40fd3d
cmp ebx, 2
jae 0x40fbc7
xor ecx, ecx
jmp 0x40fbcf
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + ebx*4 - 8]
mov eax, dword [esp + 0x6c]
mov dword [eax], ecx
cmp ebx, 1
jae 0x40fbde
xor eax, eax
jmp 0x40fbe5
mov eax, dword [esp + 0x18]
mov eax, dword [eax - 4]
mov ecx, dword [esp + 0x6c]
lea edx, [esp + 0x64]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
mov dword [ecx + 8], eax
lea ecx, [esp + 0x4c]
call fcn.0040eed0
test eax, eax
jg 0x40fb34
push dword [edi]
lea edx, [esp + 0x44]
lea ecx, [esp + 0x50]
call fcn.0040f7c0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40fd3d
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x4c]
call fcn.0040ec70
mov esi, eax
test esi, esi
jne 0x40fd3d
lea eax, [esp + 0x4c]
lea edx, [esp + 0x34]
push eax
mov ecx, edx
call fcn.0040f2a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40fd3d
xor edx, edx
lea ecx, [esp + 0x34]
call fcn.0040ef90
test eax, eax
jns 0x40fcb6
lea edx, [esp + 0x40]
lea ecx, [esp + 0x4c]
call fcn.0040df40
mov esi, eax
test esi, esi
jne 0x40fd3d
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x4c]
call fcn.0040ec70
mov esi, eax
test esi, esi
jne 0x40fd3d
lea eax, [esp + 0x4c]
lea edx, [esp + 0x34]
push eax
mov ecx, edx
call fcn.0040f230
mov esi, eax
add esp, 4
test esi, esi
jne 0x40fd3d
dec dword [edi]
sub dword [esp + 0xc], 0x20
dec ebx
mov ecx, dword [esp + 0x14]
sub edi, 4
cmp ebx, dword [esp + 0x10]
ja 0x40faf0
mov ebx, dword [esp + 0x2c]
test ebx, ebx
je 0x40fcf5
lea edx, [esp + 0x58]
mov ecx, ebx
call fcn.0040df40
mov esi, eax
test esi, esi
jne 0x40fd3d
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi]
imul eax, dword [ecx]
mov dword [ebx], eax
jmp 0x40fcf8
mov edi, dword [ebp + 8]
mov ebx, dword [esp + 0x30]
test ebx, ebx
je 0x40fd3d
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x34]
call fcn.0040ed50
mov esi, eax
test esi, esi
jne 0x40fd3d
mov eax, dword [edi]
lea edx, [esp + 0x34]
mov ecx, ebx
mov dword [esp + 0x34], eax
call fcn.0040df40
mov esi, eax
test esi, esi
jne 0x40fd3d
xor edx, edx
mov ecx, ebx
call fcn.0040ef90
test eax, eax
jne 0x40fd3d
mov dword [ebx], 1
mov ecx, dword [esp + 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test ecx, ecx
je 0x40fd71
mov eax, dword [esp + 0x38]
shl eax, 2
push eax
mov eax, dword [sub.ntdll.dll_memset]
push 0
push ecx
call eax
add esp, 0xc
push dword [esp + 0x3c]
push 0
call ebx
push eax
call edi
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x40fd99
mov eax, dword [esp + 0x44]
shl eax, 2
push eax
mov eax, dword [sub.ntdll.dll_memset]
push 0
push ecx
call eax
add esp, 0xc
push dword [esp + 0x48]
push 0
call ebx
push eax
call edi
mov ecx, dword [esp + 0x60]
test ecx, ecx
je 0x40fdc1
mov eax, dword [esp + 0x5c]
shl eax, 2
push eax
mov eax, dword [sub.ntdll.dll_memset]
push 0
push ecx
call eax
add esp, 0xc
push dword [esp + 0x60]
push 0
call ebx
push eax
call edi
mov ecx, dword [esp + 0x54]
test ecx, ecx
je 0x40fde9
mov eax, dword [esp + 0x50]
shl eax, 2
push eax
mov eax, dword [sub.ntdll.dll_memset]
push 0
push ecx
call eax
add esp, 0xc
push dword [esp + 0x54]
push 0
call ebx
push eax
call edi
mov ecx, dword [esp + 0x6c]
test ecx, ecx
je 0x40fe11
mov eax, dword [esp + 0x68]
shl eax, 2
push eax
mov eax, dword [sub.ntdll.dll_memset]
push 0
push ecx
call eax
add esp, 0xc
push dword [esp + 0x6c]
push 0
call ebx
push eax
call edi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret