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

Disassembly:
push 0xffffffffffffffff
push 0x4710b0
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x489348]
xor eax, esp
push eax
lea eax, [esp + 0xcc]
mov dword fs:[0], eax
mov edi, ecx
mov ebp, dword [esp + 0xdc]
mov eax, dword [ebp + 0x54]
mov eax, dword [eax + 0xe098]
test eax, eax
je 0x40e5c7
cmp dword [ebp + 0x50], eax
je 0x40e5c7
mov eax, ebp
call fcn.0040e180
test eax, eax
je 0x40ee54
mov ecx, dword [edi]
mov edx, dword [edi + 8]
xor eax, eax
mov dword [esp + 0xc0], edx
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov eax, dword [edi + 4]
xor edx, edx
mov dword [esp + 0xb8], ecx
mov ecx, dword [ebp + 0x30]
div ecx
mov ebx, dword [edi + 0xc]
xor edx, edx
movzx esi, byte [ebp + 0xc]
shr esi, 3
mov dword [esp + 0x98], esi
mov edi, eax
mov eax, ebx
div ecx
xor edx, edx
mov ebx, eax
mov eax, dword [esp + 0xb8]
div ecx
xor edx, edx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0xc0]
div ecx
mov dword [esp + 0x5c], eax
cmp esi, 4
jae 0x40e65d
mov eax, dword [esp + 0x54]
mov edx, eax
cmp esi, 1
jne 0x40e654
and edx, 3
jmp 0x40e657
and edx, 1
sub eax, edx
mov dword [esp + 0x54], eax
cmp ecx, 1
jne 0x40e667
mov edx, dword [ebp + 0x50]
jmp 0x40e66a
mov edx, dword [ebp + 0x34]
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x54]
sub ecx, eax
cmp ecx, 0x10
mov dword [esp + 0x4c], edx
mov byte [esp + 0x17], 0
jge 0x40e691
mov dword [esp + 0x44], 8
mov byte [esp + 0x17], 1
jmp 0x40e6a8
xor edx, edx
cmp ecx, 0x20
setge dl
dec edx
and edx, 0xffffffd0
add edx, 0x40
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x4c]
cmp dword [ebp + 0x20], 0
je 0x40ea7c
mov ecx, dword [ebp + 0x54]
cmp byte [ecx + 0xa4], 0
jne 0x40ea7c
cmp dword [ebp + 0x4c], 0
je 0x40ea7c
mov ecx, dword [ebp + 4]
imul eax, esi
mov esi, dword [ebp + 0x4c]
imul ecx, edi
add ecx, eax
mov eax, dword [ebp + 0x44]
add eax, ecx
add esi, ecx
add ecx, edx
cmp edi, ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], edi
jge 0x40ee54
jmp 0x40e704
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x54]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x44]
add eax, esi
cmp eax, ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x1c], eax
jl 0x40e73a
mov dword [esp + 0x1c], ecx
cmp edx, dword [esp + 0x5c]
mov dword [esp + 0x2c], edx
jge 0x40ea51
jmp 0x40e750
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x44]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x68]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x2c]
lea eax, [ecx + edx]
mov edx, dword [esp + 0x5c]
cmp eax, edx
mov dword [esp + 0x7c], edi
mov dword [esp + 0x74], esi
mov dword [esp + 0x94], eax
jge 0x40e788
mov dword [esp + 0x30], eax
jmp 0x40e78e
mov eax, edx
mov dword [esp + 0x30], edx
mov ebx, eax
sub ebx, ecx
imul ebx, dword [esp + 0x98]
mov ecx, dword [ebp + 0x38]
xor edx, edx
mov eax, ebx
div ecx
mov dword [esp + 0x38], 1
mov dword [esp + 0x48], esi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x1c]
jae 0x40ea30
mov ecx, dword [esp + 0x78]
mov eax, dword [ebp + 0x3c]
mov edx, dword [esp + 0x74]
imul eax, ecx
lea esi, [eax + edx]
mov edx, dword [esp + 0x7c]
lea edi, [eax + edx]
cmp ecx, 4
jb 0x40e804
mov edi, edi
mov eax, dword [edi]
cmp eax, dword [esi]
jne 0x40e856
sub ecx, 4
add esi, 4
add edi, 4
cmp ecx, 4
jae 0x40e7f0
test ecx, ecx
je 0x40e828
mov dl, byte [esi]
cmp dl, byte [edi]
jne 0x40e856
cmp ecx, 1
jbe 0x40e828
mov al, byte [esi + 1]
cmp al, byte [edi + 1]
jne 0x40e856
cmp ecx, 2
jbe 0x40e828
mov cl, byte [esi + 2]
cmp cl, byte [edi + 2]
jne 0x40e856
mov eax, dword [ebp + 4]
add dword [esp + 0x7c], eax
add dword [esp + 0x74], eax
add dword [esp + 0x50], eax
mov eax, dword [ebp + 0x3c]
inc eax
cdq
idiv dword [ebp + 0x38]
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
mov dword [ebp + 0x3c], edx
cmp eax, dword [esp + 0x1c]
jb 0x40e7d1
jmp 0x40ea30
cmp byte [esp + 0x17], 0
mov ecx, dword [ebp + 0x30]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
je 0x40e892
mov edx, ecx
imul edx, esi
mov eax, esi
sub eax, edi
imul eax, dword [ebp + 4]
mov dword [esp + 0x88], edx
mov edx, dword [esp + 0x24]
add edx, eax
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x68]
add eax, edx
mov dword [esp + 0x48], eax
jmp 0x40e89e
mov eax, ecx
imul eax, edi
mov dword [esp + 0x88], eax
mov eax, ecx
imul eax, dword [esp + 0x30]
mov edx, ecx
imul edx, dword [esp + 0x2c]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x1c]
imul ecx, eax
cmp byte [esp + 0x17], 0
mov dword [esp + 0x84], edx
mov dword [esp + 0x90], ecx
jne 0x40e8d1
mov esi, edi
cmp esi, eax
jae 0x40e97d
sub eax, esi
mov dword [esp + 0x30], eax
nop
cmp dword [esp + 0x38], 0
je 0x40e936
mov esi, dword [esp + 0x70]
mov edi, dword [esp + 0x6c]
mov eax, ebx
cmp ebx, 4
jb 0x40e90a
mov ecx, dword [edi]
cmp ecx, dword [esi]
jne 0x40e92e
sub eax, 4
add esi, 4
add edi, 4
cmp eax, 4
jae 0x40e8f6
test eax, eax
je 0x40e936
mov dl, byte [esi]
cmp dl, byte [edi]
jne 0x40e92e
cmp eax, 1
jbe 0x40e936
mov cl, byte [esi + 1]
cmp cl, byte [edi + 1]
jne 0x40e92e
cmp eax, 2
jbe 0x40e936
mov dl, byte [esi + 2]
cmp dl, byte [edi + 2]
je 0x40e936
mov dword [esp + 0x38], 0
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x70]
push ebx
push esi
push eax
call fcn.00462180
mov edi, dword [esp + 0x78]
add esp, 0xc
push ebx
push edi
push esi
call fcn.00462180
mov eax, dword [ebp + 4]
add dword [esp + 0x7c], eax
add edi, eax
add esi, eax
add esp, 0xc
sub dword [esp + 0x30], 1
mov dword [esp + 0x6c], edi
mov dword [esp + 0x48], esi
jne 0x40e8e0
cmp dword [esp + 0x38], 0
je 0x40e9d0
lea esi, [esp + 0x84]
lea edi, [esp + 0xb0]
call fcn.004060b0
mov esi, dword [esp + 0xe4]
push eax
lea ecx, [esp + 0xb8]
push ecx
push esi
mov dword [esp + 0xe0], 0
call fcn.004061e0
mov edx, eax
mov byte [esp + 0xd4], 1
call fcn.00406120
lea eax, [esp + 0xb4]
call fcn.00406100
mov eax, edi
jmp 0x40ea20
lea esi, [esp + 0x84]
lea edi, [esp + 0x64]
call fcn.004060b0
mov esi, dword [esp + 0xe0]
mov edx, edi
push edx
lea eax, [esp + 0x84]
push eax
push esi
mov dword [esp + 0xe0], 2
call fcn.004061e0
mov edx, eax
mov byte [esp + 0xd4], 3
call fcn.00406120
lea eax, [esp + 0x80]
call fcn.00406100
mov eax, edi
mov dword [esp + 0xd4], 0xffffffff
call fcn.00406100
mov eax, dword [esp + 0x94]
add dword [esp + 0x68], ebx
add dword [esp + 0x24], ebx
add dword [esp + 0x28], ebx
cmp eax, dword [esp + 0x5c]
mov dword [esp + 0x2c], eax
jl 0x40e750
mov eax, dword [ebp + 4]
imul eax, dword [esp + 0x44]
add dword [esp + 0x34], eax
add dword [esp + 0x3c], eax
add dword [esp + 0x40], eax
mov eax, dword [esp + 0x4c]
cmp eax, dword [esp + 0x60]
mov dword [esp + 0x18], eax
jl 0x40e700
jmp 0x40ee54
mov ecx, dword [ebp + 4]
imul eax, esi
imul ecx, edi
add eax, ecx
mov ecx, dword [ebp + 0x44]
add ecx, eax
add eax, edx
cmp edi, ebx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], edi
jge 0x40ee54
jmp 0x40eaac
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x60]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x54]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x44]
add eax, ecx
cmp eax, ebx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x1c], eax
jl 0x40ead6
mov dword [esp + 0x1c], ebx
cmp edx, dword [esp + 0x5c]
mov dword [esp + 0x2c], edx
jge 0x40ee27
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x5c]
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
add eax, ecx
cmp eax, edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x94], eax
jge 0x40eb13
mov dword [esp + 0x64], eax
jmp 0x40eb19
mov eax, edi
mov dword [esp + 0x64], edi
sub eax, ecx
imul eax, dword [esp + 0x98]
mov ecx, dword [ebp + 0x38]
mov dword [esp + 0x50], edx
xor edx, edx
mov dword [esp + 0x48], eax
div ecx
mov dword [esp + 0x30], esi
mov edi, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x1c]
jae 0x40edfb
lea ebx, [ebx]
mov ebx, dword [ebp + 0x3c]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
mov eax, ebx
imul eax, edi
add edx, eax
add esi, eax
mov ecx, edi
cmp edi, 4
jb 0x40eb84
jmp 0x40eb70
mov eax, dword [esi]
cmp eax, dword [edx]
jne 0x40ebde
sub ecx, 4
add edx, 4
add esi, 4
cmp ecx, 4
jae 0x40eb70
test ecx, ecx
je 0x40eba8
mov al, byte [edx]
cmp al, byte [esi]
jne 0x40ebde
cmp ecx, 1
jbe 0x40eba8
mov al, byte [edx + 1]
cmp al, byte [esi + 1]
jne 0x40ebde
cmp ecx, 2
jbe 0x40eba8
mov cl, byte [edx + 2]
cmp cl, byte [esi + 2]
jne 0x40ebde
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
dec edx
cmp ecx, edx
je 0x40ebca
mov eax, dword [ebp + 4]
add dword [esp + 0x40], eax
add dword [esp + 0x3c], eax
lea eax, [ebx + 1]
cdq
idiv dword [ebp + 0x38]
mov dword [ebp + 0x3c], edx
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, dword [esp + 0x1c]
jb 0x40eb50
jmp 0x40edfb
cmp byte [esp + 0x17], 0
mov eax, dword [ebp + 0x30]
mov ebx, eax
je 0x40ec0f
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
imul ebx, ecx
sub ecx, dword [esp + 0x18]
imul ecx, dword [ebp + 4]
add edx, ecx
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x28]
add ecx, edx
mov dword [esp + 0x50], ecx
jmp 0x40ec14
imul ebx, dword [esp + 0x18]
mov ecx, eax
imul ecx, dword [esp + 0x2c]
mov edi, eax
imul eax, dword [esp + 0x1c]
imul edi, dword [esp + 0x64]
push 0x14
mov dword [esp + 0x88], ecx
mov dword [esp + 0x94], eax
call fcn.0045d5ee
mov esi, eax
add esp, 4
test esi, esi
je 0x40ec86
push 8
call fcn.0045d5ee
add esp, 4
mov dword [esi + 8], eax
test eax, eax
jne 0x40ec63
push esi
call fcn.0045d511
add esp, 4
xor esi, esi
jmp 0x40ec86
xor eax, eax
xor ecx, ecx
xor edx, edx
mov dword [esi + 4], 0
mov word [esi + 0xc], ax
mov word [esi + 0x10], cx
mov word [esi + 0xe], dx
mov word [esi + 0x12], ax
mov dword [esi], 1
sub edi, dword [esp + 0x84]
mov eax, dword [esp + 0x90]
sub eax, ebx
mov dword [esp + 0x80], esi
mov dword [esi + 4], 0
mov word [esp + 0xbc], di
mov word [esp + 0xbe], ax
test di, di
je 0x40ed28
test ax, ax
je 0x40ed28
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0xbc]
mov word [esp + 0xa8], ax
add eax, edx
mov word [esp + 0xaa], ax
mov eax, dword [esp + 0xbe]
lea ecx, [esp + 0xa8]
mov dword [esp + 0xa4], ecx
mov word [esp + 0xac], bx
add ebx, eax
mov ecx, 1
mov dword [esp + 0xa0], ecx
mov word [esp + 0xae], bx
mov dword [esp + 0x9c], ecx
mov eax, esi
mov ecx, esi
lea ebx, [esp + 0x9c]
call fcn.00455ed0
mov edi, dword [esp + 0xe0]
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x7c]
push edx
push edi
mov dword [esp + 0xe0], 4
call fcn.004061e0
mov ecx, eax
mov byte [esp + 0xd4], 5
mov edx, dword [edi]
xor eax, eax
mov dword [edx + 4], eax
mov ecx, dword [ecx]
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0x9c], eax
mov eax, dword [edi]
lea ebx, [esp + 0x9c]
call fcn.00455ed0
mov eax, dword [esp + 0x78]
mov edi, eax
mov eax, dword [eax + 8]
push eax
call fcn.0045d511
add esp, 4
push edi
call fcn.0045d511
mov dword [esp + 0xd8], 0xffffffff
mov ecx, dword [esi + 8]
add esp, 4
push ecx
call fcn.0045d511
add esp, 4
push esi
call fcn.0045d511
mov eax, dword [esp + 0x24]
add esp, 4
cmp byte [esp + 0x17], 0
jne 0x40edcd
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
cmp eax, ebx
jae 0x40edfb
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x50]
sub ebx, eax
nop
mov edx, dword [esp + 0x48]
push edx
push esi
push edi
call fcn.00462180
mov eax, dword [ebp + 4]
add esp, 0xc
add esi, eax
add edi, eax
sub ebx, 1
jne 0x40ede0
mov ecx, dword [esp + 0x5c]
lea eax, [ecx - 1]
cmp dword [esp + 0x2c], eax
je 0x40ee14
mov eax, dword [esp + 0x48]
add dword [esp + 0x28], eax
add dword [esp + 0x24], eax
mov eax, dword [esp + 0x94]
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x40eae4
mov ecx, dword [esp + 0x60]
lea eax, [ecx - 1]
cmp dword [esp + 0x18], eax
je 0x40ee44
mov eax, dword [ebp + 4]
imul eax, dword [esp + 0x44]
add dword [esp + 0x34], eax
add dword [esp + 0x38], eax
mov eax, dword [esp + 0x4c]
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x40eaa4
mov ecx, dword [esp + 0xcc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc4
ret 0xc