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

Disassembly:
push 0xffffffffffffffff
push 0x470e63
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48ea40]
xor eax, esp
push eax
lea eax, [esp + 0xb4]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x94], ebx
mov eax, dword [ebx + 0x54]
mov eax, dword [eax + 0xe078]
test eax, eax
je 0x40f875
cmp dword [ebx + 0x50], eax
je 0x40f875
call fcn.0040f3b0
test eax, eax
je 0x410116
mov ecx, dword [esp + 0xcc]
mov edx, dword [ecx]
mov edi, dword [ecx + 0xc]
xor eax, eax
mov dword [esp + 0xa4], edx
mov edx, dword [ecx + 8]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ebx + 0x30]
mov dword [esp + 0xac], edx
xor edx, edx
div ecx
xor edx, edx
movzx esi, byte [ebx + 0xc]
shr esi, 3
mov dword [esp + 0xa0], esi
mov ebp, eax
mov eax, edi
div ecx
xor edx, edx
mov edi, eax
mov eax, dword [esp + 0xa4]
div ecx
xor edx, edx
mov dword [esp + 0x60], edi
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0xac]
div ecx
cmp esi, 4
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x54]
jae 0x40f906
cmp esi, 1
mov edx, eax
jne 0x40f8fd
and edx, 3
jmp 0x40f900
and edx, 1
sub eax, edx
mov dword [esp + 0x54], eax
cmp ecx, 1
jne 0x40f910
mov edx, dword [ebx + 0x50]
jmp 0x40f913
mov edx, dword [ebx + 0x34]
mov ecx, dword [esp + 0x5c]
sub ecx, eax
cmp ecx, 0x10
mov dword [esp + 0x50], edx
mov byte [esp + 0x17], 0
jge 0x40f936
mov dword [esp + 0x4c], 8
mov byte [esp + 0x17], 1
jmp 0x40f94f
xor edx, edx
cmp ecx, 0x20
setge dl
sub edx, 1
and edx, 0xffffffd0
add edx, 0x40
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x50]
cmp dword [ebx + 0x20], 0
je 0x40fdd3
mov ecx, dword [ebx + 0x54]
cmp byte [ecx + 0xa4], 0
jne 0x40fdd3
cmp dword [ebx + 0x4c], 0
je 0x40fdd3
mov ecx, dword [ebx + 4]
imul eax, esi
mov esi, dword [ebx + 0x4c]
imul ecx, ebp
add ecx, eax
mov eax, dword [ebx + 0x44]
add eax, ecx
add esi, ecx
add ecx, edx
cmp ebp, edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x18], ebp
jge 0x410116
jmp 0x40f9ac
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x60]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x4c]
add eax, edx
cmp eax, edi
mov dword [esp + 0x50], eax
mov dword [esp + 0x68], eax
jl 0x40f9de
mov dword [esp + 0x68], edi
cmp ecx, dword [esp + 0x5c]
mov dword [esp + 0x40], ecx
jge 0x40fda8
lea esp, [esp]
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x5c]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x2c]
add eax, ecx
cmp eax, edi
mov dword [esp + 0x98], edx
mov dword [esp + 0x88], esi
mov dword [esp + 0x80], eax
jge 0x40fa23
mov edi, eax
mov dword [esp + 0x30], eax
jmp 0x40fa27
mov dword [esp + 0x30], edi
sub edi, ecx
imul edi, dword [esp + 0xa0]
mov ecx, dword [ebx + 0x38]
xor edx, edx
mov eax, edi
div ecx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x90], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x44], 1
mov dword [esp + 0x24], esi
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x20], edx
mov ebp, eax
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x68]
mov dword [esp + 0x28], eax
jae 0x40fd87
mov ecx, dword [ebx + 0x3c]
mov edx, dword [esp + 0x88]
imul ecx, ebp
mov esi, dword [esp + 0x98]
add edx, ecx
add ecx, esi
cmp ebp, 4
mov eax, ebp
jb 0x40faa4
mov esi, dword [ecx]
cmp esi, dword [edx]
jne 0x40faa8
sub eax, 4
add edx, 4
add ecx, 4
cmp eax, 4
jae 0x40fa90
test eax, eax
je 0x40fb13
movzx esi, byte [ecx]
movzx ebx, byte [edx]
sub esi, ebx
jne 0x40faf7
sub eax, 1
add edx, 1
add ecx, 1
test eax, eax
je 0x40fb0c
movzx esi, byte [ecx]
movzx ebx, byte [edx]
sub esi, ebx
jne 0x40faf7
sub eax, 1
add edx, 1
add ecx, 1
test eax, eax
je 0x40fb0c
movzx esi, byte [ecx]
movzx ebx, byte [edx]
sub esi, ebx
jne 0x40faf7
sub eax, 1
add edx, 1
add ecx, 1
test eax, eax
je 0x40fb0c
movzx esi, byte [ecx]
movzx eax, byte [edx]
sub esi, eax
je 0x40fb0c
test esi, esi
mov ebx, dword [esp + 0x94]
mov eax, 1
jg 0x40fb15
or eax, 0xffffffff
jmp 0x40fb15
mov ebx, dword [esp + 0x94]
xor eax, eax
test eax, eax
jne 0x40fb55
mov eax, dword [ebx + 4]
add dword [esp + 0x98], eax
add dword [esp + 0x88], eax
mov eax, dword [ebx + 0x3c]
add eax, 1
cdq
idiv dword [esp + 0x90]
mov eax, dword [esp + 0x28]
add eax, 1
cmp eax, dword [esp + 0x68]
mov dword [esp + 0x28], eax
mov dword [ebx + 0x3c], edx
jb 0x40fa71
jmp 0x40fd87
mov dl, byte [esp + 0x17]
test dl, dl
mov ecx, dword [ebx + 0x30]
mov ebp, dword [esp + 0x28]
mov eax, ecx
je 0x40fb8d
mov esi, dword [esp + 0x1c]
imul eax, ebp
mov dword [esp + 0x74], eax
mov eax, ebp
sub eax, dword [esp + 0x18]
imul eax, dword [ebx + 4]
add esi, eax
mov dword [esp + 0x6c], esi
mov esi, dword [esp + 0x2c]
add eax, esi
mov dword [esp + 0x24], eax
jmp 0x40fb96
imul eax, dword [esp + 0x18]
mov dword [esp + 0x74], eax
mov esi, dword [esp + 0x68]
mov eax, ecx
imul eax, dword [esp + 0x40]
mov dword [esp + 0x70], eax
mov eax, ecx
imul ecx, esi
imul eax, dword [esp + 0x30]
test dl, dl
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], ecx
mov eax, ebp
jne 0x40fbc1
mov eax, dword [esp + 0x18]
cmp eax, esi
jae 0x40fcbb
sub esi, eax
mov dword [esp + 0x30], esi
cmp dword [esp + 0x44], 0
je 0x40fc73
cmp edi, 4
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x6c]
mov eax, edi
jb 0x40fc04
lea esp, [esp]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x40fc08
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x40fbf0
test eax, eax
je 0x40fc65
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x40fc57
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x40fc65
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x40fc57
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x40fc65
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x40fc57
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x40fc65
movzx esi, byte [edx]
movzx ecx, byte [ecx]
sub esi, ecx
je 0x40fc65
test esi, esi
mov eax, 1
jg 0x40fc67
or eax, 0xffffffff
jmp 0x40fc67
xor eax, eax
test eax, eax
je 0x40fc73
mov dword [esp + 0x44], 0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push edi
push edx
push eax
call fcn.0045d280
mov esi, dword [esp + 0x78]
mov ebp, dword [esp + 0x30]
push edi
push esi
push ebp
call fcn.0045d280
mov eax, dword [ebx + 4]
add dword [esp + 0x38], eax
add esi, eax
add ebp, eax
add esp, 0x18
sub dword [esp + 0x30], 1
mov dword [esp + 0x6c], esi
mov dword [esp + 0x24], ebp
jne 0x40fbcf
cmp dword [esp + 0x44], 0
je 0x40fd1b
lea ecx, [esp + 0x70]
push ecx
lea ecx, [esp + 0x88]
call fcn.00407370
mov esi, dword [esp + 0xc8]
push eax
lea edx, [esp + 0xa0]
push edx
mov ecx, esi
mov dword [esp + 0xc4], 0
call fcn.00407200
push eax
mov ecx, esi
mov byte [esp + 0xc0], 1
call fcn.00407390
lea ecx, [esp + 0x9c]
mov byte [esp + 0xbc], 0
call fcn.004070e0
lea ecx, [esp + 0x84]
jmp 0x40fd77
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x68]
call fcn.00407370
mov esi, dword [esp + 0xc4]
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x90]
push edx
mov ecx, esi
mov dword [esp + 0xc4], 2
call fcn.00407200
push eax
mov ecx, esi
mov byte [esp + 0xc0], 3
call fcn.00407390
lea ecx, [esp + 0x8c]
mov byte [esp + 0xbc], 2
call fcn.004070e0
lea ecx, [esp + 0x64]
mov dword [esp + 0xbc], 0xffffffff
call fcn.004070e0
mov ecx, dword [esp + 0x80]
add dword [esp + 0x2c], edi
add dword [esp + 0x1c], edi
add dword [esp + 0x34], edi
cmp ecx, dword [esp + 0x5c]
mov dword [esp + 0x40], ecx
jl 0x40f9f0
mov eax, dword [ebx + 4]
imul eax, dword [esp + 0x4c]
add dword [esp + 0x48], eax
add dword [esp + 0x38], eax
add dword [esp + 0x3c], eax
mov eax, dword [esp + 0x50]
cmp eax, dword [esp + 0x60]
mov dword [esp + 0x18], eax
jl 0x40f9a4
jmp 0x410116
mov ecx, dword [ebx + 4]
imul eax, esi
imul ecx, ebp
add eax, ecx
mov ecx, dword [ebx + 0x44]
add ecx, eax
add eax, edx
cmp ebp, edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x18], ebp
jge 0x410116
lea edx, [edi - 1]
mov dword [esp + 0x9c], edx
jmp 0x40fe14
mov edi, dword [esp + 0x60]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x4c]
add eax, edx
cmp eax, edi
mov dword [esp + 0x50], eax
mov dword [esp + 0x1c], eax
jl 0x40fe42
mov dword [esp + 0x1c], edi
cmp ecx, dword [esp + 0x5c]
mov dword [esp + 0x40], ecx
jge 0x4100e7
mov eax, dword [esp + 0x5c]
add eax, 0xffffffff
mov dword [esp + 0x84], eax
mov edi, edi
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x5c]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
add esi, eax
cmp esi, ebp
mov dword [esp + 0x38], edx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x80], esi
jge 0x40fe91
mov ebp, esi
mov dword [esp + 0x64], esi
jmp 0x40fe95
mov dword [esp + 0x64], ebp
sub ebp, eax
imul ebp, dword [esp + 0xa0]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebx + 0x38]
xor edx, edx
mov eax, ebp
div ecx
mov dword [esp + 0x3c], ebp
mov edi, eax
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
jae 0x4100bd
jmp 0x40fed0
mov ecx, dword [ebx + 0x3c]
mov edx, dword [esp + 0x48]
imul ecx, edi
mov esi, dword [esp + 0x38]
add edx, ecx
add ecx, esi
cmp edi, 4
mov eax, edi
jb 0x40ff04
lea esp, [esp]
mov esi, dword [ecx]
cmp esi, dword [edx]
jne 0x40ff08
sub eax, 4
add edx, 4
add ecx, 4
cmp eax, 4
jae 0x40fef0
test eax, eax
je 0x40ff6d
movzx esi, byte [ecx]
movzx ebp, byte [edx]
sub esi, ebp
jne 0x40ff57
sub eax, 1
add edx, 1
add ecx, 1
test eax, eax
je 0x40ff69
movzx esi, byte [ecx]
movzx ebp, byte [edx]
sub esi, ebp
jne 0x40ff57
sub eax, 1
add edx, 1
add ecx, 1
test eax, eax
je 0x40ff69
movzx esi, byte [ecx]
movzx ebp, byte [edx]
sub esi, ebp
jne 0x40ff57
sub eax, 1
add edx, 1
add ecx, 1
test eax, eax
je 0x40ff69
movzx esi, byte [ecx]
movzx eax, byte [edx]
sub esi, eax
je 0x40ff69
test esi, esi
mov ebp, dword [esp + 0x3c]
mov eax, 1
jg 0x40ff6f
or eax, 0xffffffff
jmp 0x40ff6f
mov ebp, dword [esp + 0x3c]
xor eax, eax
test eax, eax
jne 0x40ffae
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
lea edx, [esi - 1]
cmp ecx, edx
je 0x40ff9a
mov eax, dword [ebx + 4]
add dword [esp + 0x38], eax
add dword [esp + 0x48], eax
mov eax, dword [ebx + 0x3c]
add eax, 1
cdq
idiv dword [ebx + 0x38]
mov dword [ebx + 0x3c], edx
add ecx, 1
cmp ecx, esi
mov dword [esp + 0x28], ecx
jb 0x40fed0
jmp 0x4100bd
cmp byte [esp + 0x17], 0
mov eax, dword [ebx + 0x30]
je 0x40ffe0
mov ecx, dword [esp + 0x28]
mov edx, eax
imul edx, ecx
sub ecx, dword [esp + 0x18]
mov dword [esp + 0x74], edx
imul ecx, dword [ebx + 4]
mov edx, dword [esp + 0x24]
lea edi, [ecx + edx]
mov edx, dword [esp + 0x20]
add ecx, edx
mov dword [esp + 0x2c], ecx
jmp 0x40fff2
mov edi, dword [esp + 0x8c]
mov ecx, eax
imul ecx, dword [esp + 0x18]
mov dword [esp + 0x74], ecx
mov edx, eax
imul edx, dword [esp + 0x40]
mov ecx, eax
imul eax, dword [esp + 0x1c]
imul ecx, dword [esp + 0x64]
mov dword [esp + 0x70], edx
lea edx, [esp + 0x70]
mov dword [esp + 0x78], ecx
push edx
lea ecx, [esp + 0x34]
mov dword [esp + 0x80], eax
call fcn.00407370
mov esi, dword [esp + 0xc4]
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x94]
push ecx
mov ecx, esi
mov dword [esp + 0xc4], 4
call fcn.00407200
push eax
mov ecx, esi
mov byte [esp + 0xc0], 5
call fcn.00407390
lea ecx, [esp + 0x90]
mov byte [esp + 0xbc], 4
call fcn.004070e0
lea ecx, [esp + 0x30]
mov dword [esp + 0xbc], 0xffffffff
call fcn.004070e0
cmp byte [esp + 0x17], 0
mov eax, dword [esp + 0x28]
jne 0x41008f
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
cmp eax, esi
jae 0x4100bd
sub esi, eax
lea esp, [esp]
mov edx, dword [esp + 0x2c]
push ebp
push edi
push edx
call fcn.0045d280
mov eax, dword [ebx + 4]
add dword [esp + 0x38], eax
add esp, 0xc
add edi, eax
sub esi, 1
jne 0x4100a0
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x40], eax
je 0x4100d2
add dword [esp + 0x20], ebp
add dword [esp + 0x24], ebp
mov eax, dword [esp + 0x80]
cmp eax, dword [esp + 0x5c]
mov dword [esp + 0x40], eax
jl 0x40fe60
mov ecx, dword [esp + 0x9c]
cmp dword [esp + 0x18], ecx
je 0x410104
mov eax, dword [ebx + 4]
imul eax, dword [esp + 0x4c]
add dword [esp + 0x34], eax
add dword [esp + 0x44], eax
mov eax, dword [esp + 0x50]
cmp eax, dword [esp + 0x60]
mov dword [esp + 0x18], eax
jl 0x40fe10
mov ecx, dword [esp + 0xb4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xac
ret 0xc