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

Disassembly:
sub esp, 0xe0
mov ecx, dword [esp + 0xec]
push ebx
push ebp
push esi
lea eax, [ecx + 6]
mov esi, dword [esp + 0x108]
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0xfc]
shl ecx, 2
mov edx, dword [eax]
mov dword [esp + 0xa0], esi
mov dword [esp + 0x90], edx
mov edx, dword [eax + 4]
movsx eax, byte [eax + 8]
add eax, ecx
push edi
shl eax, 2
mov edi, dword [esp + 0x110]
mov ebx, dword [esp + 0x114]
mov esi, dword [eax + 0x506148]
mov eax, dword [eax + 0x506168]
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x104]
mov dword [esp + 0x9c], esi
mov dword [esp + 0xb8], edi
mov esi, dword [eax]
mov dword [esp + 0x98], edx
mov dword [esp + 0xa8], esi
mov esi, dword [eax + 4]
movsx eax, byte [eax + 8]
add eax, ecx
mov dword [esp + 0xac], esi
shl eax, 2
mov dword [esp + 0xcc], ebx
mov edi, dword [eax + 0x506148]
mov eax, dword [eax + 0x506168]
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0x108]
mov dword [esp + 0xb0], edi
mov edi, dword [eax]
mov dword [esp + 0xbc], edi
mov edi, dword [eax + 4]
movsx eax, byte [eax + 8]
add eax, ecx
mov dword [esp + 0xc0], edi
shl eax, 2
mov ecx, dword [eax + 0x506148]
mov eax, dword [eax + 0x506168]
mov dword [esp + 0xc4], ecx
mov dword [esp + 0xc8], eax
xor eax, eax
xor ecx, ecx
cmp esi, edx
mov dword [esp + 0x60], eax
jle 0x40e6f7
mov dword [esp + 0x60], 1
mov eax, dword [esp + 0x60]
jge 0x40e6fe
mov ecx, 1
lea edx, [eax + eax*4]
cmp edi, dword [esp + edx*4 + 0x98]
jle 0x40e716
mov dword [esp + 0x60], 2
mov eax, dword [esp + 0x60]
lea edx, [ecx + ecx*4]
cmp edi, dword [esp + edx*4 + 0x98]
jge 0x40e727
mov ecx, 2
mov edx, eax
mov edi, 3
or edx, ecx
lea esi, [eax + eax*4]
sub edi, edx
lea edx, [ecx + ecx*4]
shl esi, 2
shl edx, 2
mov dword [esp + 0x58], esi
mov esi, dword [esp + esi + 0x98]
mov ebx, dword [esp + edx + 0x98]
mov dword [esp + 0x90], esi
sub esi, ebx
mov dword [esp + 0x10], ebx
test esi, esi
mov dword [esp + 0x14], esi
jle 0x40f022
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], eax
lea eax, [edi + edi*4]
mov esi, ecx
shl eax, 2
mov ebp, dword [esp + eax + 0x98]
cmp ebx, ebp
mov dword [esp + 0x88], ebp
jne 0x40e7ab
mov edx, dword [esp + edx + 0x94]
mov ebx, dword [esp + eax + 0x94]
cmp edx, ebx
jge 0x40e7a4
mov esi, edi
jmp 0x40e82f
mov ecx, edi
jmp 0x40e82f
mov ebp, dword [esp + edx + 0x94]
mov edx, dword [esp + 0x58]
mov edx, dword [esp + edx + 0x94]
cmp ebp, edx
mov dword [esp + 0x2c], edx
jne 0x40e7d4
cmp ebp, dword [esp + eax + 0x94]
jge 0x40e82b
mov dword [esp + 0x48], edi
jmp 0x40e82f
mov eax, dword [esp + eax + 0x94]
cmp ebp, eax
jne 0x40e7e9
cmp ebp, edx
jl 0x40e82b
mov dword [esp + 0x48], edi
jmp 0x40e82f
mov edx, dword [esp + 0x88]
cmp dword [esp + 0x90], edx
jne 0x40e805
cmp dword [esp + 0x2c], eax
jge 0x40e82b
mov dword [esp + 0x48], edi
jmp 0x40e82f
sub eax, ebp
sub edx, ebx
shl eax, 0xc
mov ebx, edx
cdq
idiv ebx
mov ebx, eax
mov eax, dword [esp + 0x2c]
sub eax, ebp
shl eax, 0xc
cdq
idiv dword [esp + 0x14]
cmp eax, ebx
jge 0x40e82b
mov dword [esp + 0x48], edi
jmp 0x40e82f
mov dword [esp + 0x50], edi
lea eax, [ecx + ecx*4]
lea esi, [esi + esi*4]
shl eax, 2
shl esi, 2
mov edi, dword [esp + eax + 0xa0]
mov edx, dword [esp + eax + 0x94]
mov dword [esp + 0x78], edi
mov ecx, dword [esp + esi + 0x94]
shl edi, 0xc
mov dword [esp + 0x28], edi
mov edi, dword [esp + esi + 0x9c]
mov dword [esp + 0x5c], edi
mov dword [esp + 0x6c], ecx
shl edi, 0xc
mov dword [esp + 0x38], edi
mov edi, dword [esp + esi + 0xa0]
mov dword [esp + 0x30], edi
mov ebp, dword [esp + eax + 0xa4]
shl edi, 0xc
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x50]
shl ecx, 0xc
lea edi, [edi + edi*4]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + esi + 0xa4]
mov dword [esp + 0x18], ebp
shl edi, 2
mov dword [esp + 0x2c], ecx
mov ebx, dword [esp + edi + 0x98]
shl ecx, 0xc
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + eax + 0x9c]
mov dword [esp + 0xec], ebx
sub ebx, dword [esp + eax + 0x98]
mov eax, dword [esp + edi + 0x94]
mov dword [esp + 0x14], ecx
shl edx, 0xc
mov dword [esp + 0xd8], eax
sub edx, 0x1000
shl eax, 0xc
mov dword [esp + 0xdc], eax
sub eax, edx
sub eax, 0x1000
mov dword [esp + 0x40], edx
cdq
idiv ebx
mov edx, dword [esp + 0x18]
shl ebp, 0xc
shl ecx, 0xc
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x80], eax
mov eax, dword [esp + edi + 0xa4]
mov dword [esp + 0xe8], eax
sub eax, edx
shl eax, 0xc
cdq
idiv ebx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x70], eax
mov eax, dword [esp + edi + 0x9c]
mov dword [esp + 0xe0], eax
sub eax, edx
shl eax, 0xc
cdq
idiv ebx
mov edi, dword [esp + edi + 0xa0]
mov dword [esp + 0xd4], edi
mov dword [esp + 0x64], eax
mov eax, edi
sub eax, dword [esp + 0x78]
shl eax, 0xc
cdq
idiv ebx
mov ebx, dword [esp + 0x48]
lea ebx, [ebx + ebx*4]
shl ebx, 2
mov edi, dword [esp + ebx + 0x98]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + ebx + 0x94]
mov dword [esp + 0x78], eax
mov edx, dword [esp + esi + 0x98]
mov dword [esp + 0x84], edi
sub edi, edx
mov edx, dword [esp + 0x6c]
sub eax, edx
mov esi, dword [esp + ebx + 0xa4]
shl eax, 0xc
cdq
idiv edi
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x6c], esi
mov dword [esp + 0x7c], eax
mov eax, esi
sub eax, edx
shl eax, 0xc
cdq
idiv edi
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x74], eax
mov eax, dword [esp + ebx + 0x9c]
mov dword [esp + 0x14], eax
sub eax, edx
shl eax, 0xc
cdq
idiv edi
mov dword [esp + 0x68], eax
mov eax, dword [esp + ebx + 0xa0]
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x18], eax
sub eax, ebx
shl eax, 0xc
cdq
idiv edi
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0xf4]
mov dword [esp + 0x54], edi
mov dword [esp + 0x2c], eax
mov eax, edi
imul eax, dword [0x541bec]
lea eax, [edx + eax*2]
mov dword [esp + 0xf4], eax
mov eax, dword [esp + 0x88]
cmp edi, eax
jg 0x40ec61
mov eax, dword [esp + 0x118]
cmp edi, dword [eax + 4]
jl 0x40ebcc
cmp edi, dword [eax + 0xc]
jge 0x40ebcc
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
sar eax, 0xc
mov dword [esp + 0x30], eax
mov edi, eax
sar esi, 0xc
mov eax, 0x1000
sub edi, esi
cdq
inc edi
mov ebx, dword [esp + 0x38]
idiv edi
mov edi, dword [esp + 0x34]
sub ebx, ecx
sub edi, ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ecx
mov edx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], edx
imul edi, edx
imul ebx, edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x1c], eax
sub edx, eax
mov eax, dword [esp + 0x118]
imul edx, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [esp + 0x10], esi
sar edi, 0xc
sar ebx, 0xc
sar edx, 0xc
cmp esi, eax
mov dword [esp + 0x5c], edx
jge 0x40eaeb
sub eax, esi
mov esi, eax
imul esi, edi
add esi, ebp
mov dword [esp + 0x24], esi
mov esi, eax
imul esi, ebx
imul eax, edx
mov edx, dword [esp + 0x28]
add esi, ecx
add eax, edx
mov edx, dword [esp + 0x118]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], esi
mov eax, dword [edx]
mov dword [esp + 0x10], eax
jmp 0x40eaef
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x118]
mov eax, dword [edx + 8]
mov edx, dword [esp + 0x30]
cmp edx, eax
jge 0x40eb03
mov eax, edx
mov edx, dword [esp + 0x10]
cmp edx, eax
jge 0x40ebc4
mov ecx, dword [esp + 0xf4]
sub eax, edx
mov dword [esp + 0x10], eax
lea ecx, [ecx + edx*2]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x1c]
mov edx, ecx
mov ecx, dword [esp + 0xd0]
sar edx, 0xc
shl edx, cl
mov ecx, dword [esp + 0xf8]
mov eax, dword [esp + 0x24]
sar esi, 0xc
sar eax, 0xc
add edx, esi
mov esi, edx
xor edx, edx
shl eax, 5
mov dx, word [ecx + esi*2]
add eax, 0x587af0
mov ecx, edx
mov esi, edx
sar ecx, 5
sar esi, 0xa
and ecx, 0x1f
and edx, 0x1f
movzx si, byte [esi + eax]
movzx cx, byte [ecx + eax]
movzx dx, byte [edx + eax]
mov eax, dword [esp + 0x30]
shl esi, 5
or ecx, esi
mov esi, dword [esp + 0x20]
shl ecx, 5
or ecx, edx
mov edx, dword [esp + 0x24]
mov word [eax], cx
mov ecx, dword [esp + 0x1c]
add edx, edi
add eax, 2
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x10]
add esi, ebx
add ecx, edx
dec eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
jne 0x40eb27
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x54]
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0xf4]
mov edx, dword [0x541bec]
mov ebx, dword [esp + 0x44]
lea eax, [eax + edx*2]
mov edx, dword [esp + 0x80]
mov dword [esp + 0xf4], eax
mov eax, dword [esp + 0x40]
add eax, edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x7c]
add ebx, eax
mov eax, dword [esp + 0x34]
add ebp, edx
mov edx, dword [esp + 0x74]
add eax, edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x68]
add edx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x64]
add eax, edx
add ecx, ebx
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x4c], ecx
add ebx, eax
mov eax, dword [esp + 0x88]
inc edi
mov dword [esp + 0x3c], ebx
cmp edi, eax
mov dword [esp + 0x54], edi
jle 0x40ea2e
mov ebx, dword [esp + 0x90]
cmp edi, ebx
jg 0x40f022
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x50]
cmp edx, eax
je 0x40ed3c
mov eax, dword [esp + 0xec]
mov ebp, dword [esp + 0xd8]
mov ecx, ebx
mov ebx, dword [esp + 0x58]
sub ecx, eax
mov esi, dword [esp + 0xe0]
mov eax, dword [esp + ebx + 0x94]
sub eax, ebp
mov ebp, dword [esp + 0xe8]
shl eax, 0xc
cdq
idiv ecx
mov dword [esp + 0x80], eax
mov eax, dword [esp + ebx + 0xa4]
sub eax, ebp
shl eax, 0xc
cdq
idiv ecx
shl ebp, 0xc
mov dword [esp + 0x70], eax
mov eax, dword [esp + ebx + 0x9c]
sub eax, esi
shl eax, 0xc
cdq
idiv ecx
shl esi, 0xc
mov dword [esp + 0x64], eax
mov eax, dword [esp + ebx + 0xa0]
mov ebx, dword [esp + 0xd4]
sub eax, ebx
shl eax, 0xc
cdq
idiv ecx
mov ecx, dword [esp + 0xdc]
mov edx, dword [esp + 0x80]
shl ebx, 0xc
lea ecx, [edx + ecx - 0x1000]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x70]
add ebp, ecx
mov ecx, dword [esp + 0x64]
add esi, ecx
mov dword [esp + 0x4c], esi
mov ecx, esi
add ebx, eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x28], ebx
jmp 0x40edf3
cmp dword [esp + 0x48], eax
je 0x40edf3
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0x58]
sub ebx, eax
mov eax, dword [esp + edx + 0x94]
mov edx, dword [esp + 0x78]
sub eax, edx
shl eax, 0xc
cdq
idiv ebx
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x58]
mov eax, dword [esp + eax + 0xa4]
sub eax, esi
shl eax, 0xc
cdq
idiv ebx
mov edx, dword [esp + 0x58]
shl esi, 0xc
mov dword [esp + 0x74], eax
mov eax, dword [esp + edx + 0x9c]
sub eax, dword [esp + 0x14]
shl eax, 0xc
cdq
idiv ebx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x58]
mov eax, dword [esp + eax + 0xa0]
sub eax, edx
shl eax, 0xc
cdq
idiv ebx
mov ebx, dword [esp + 0x7c]
mov edx, eax
mov eax, dword [esp + 0x78]
shl eax, 0xc
add eax, ebx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x74]
add esi, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x68]
shl eax, 0xc
add eax, esi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x18]
shl eax, 0xc
add eax, edx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x118]
cmp edi, dword [eax + 4]
jl 0x40ef8d
cmp edi, dword [eax + 0xc]
jge 0x40ef8d
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
sar eax, 0xc
mov dword [esp + 0x30], eax
mov edi, eax
sar esi, 0xc
mov eax, 0x1000
sub edi, esi
cdq
inc edi
mov ebx, dword [esp + 0x38]
idiv edi
mov edi, dword [esp + 0x34]
sub ebx, ecx
sub edi, ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ecx
mov edx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], edx
imul edi, edx
imul ebx, edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x1c], eax
sub edx, eax
mov eax, dword [esp + 0x118]
imul edx, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [esp + 0x10], esi
sar edi, 0xc
sar ebx, 0xc
sar edx, 0xc
cmp esi, eax
mov dword [esp + 0x5c], edx
jge 0x40eeb0
sub eax, esi
mov esi, eax
imul esi, edi
add esi, ebp
mov dword [esp + 0x24], esi
mov esi, eax
imul esi, ebx
imul eax, edx
mov edx, dword [esp + 0x28]
add esi, ecx
add eax, edx
mov edx, dword [esp + 0x118]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], esi
mov eax, dword [edx]
mov dword [esp + 0x10], eax
jmp 0x40eeb4
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x118]
mov eax, dword [edx + 8]
mov edx, dword [esp + 0x30]
cmp edx, eax
jge 0x40eec8
mov eax, edx
mov edx, dword [esp + 0x10]
cmp edx, eax
jge 0x40ef89
mov ecx, dword [esp + 0xf4]
sub eax, edx
mov dword [esp + 0x14], eax
lea ecx, [ecx + edx*2]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x1c]
mov edx, ecx
mov ecx, dword [esp + 0xd0]
sar edx, 0xc
shl edx, cl
mov ecx, dword [esp + 0xf8]
mov eax, dword [esp + 0x24]
sar esi, 0xc
sar eax, 0xc
add edx, esi
mov esi, edx
xor edx, edx
shl eax, 5
mov dx, word [ecx + esi*2]
add eax, 0x587af0
mov ecx, edx
mov esi, edx
sar ecx, 5
sar esi, 0xa
and ecx, 0x1f
and edx, 0x1f
movzx si, byte [esi + eax]
movzx cx, byte [ecx + eax]
movzx dx, byte [edx + eax]
mov eax, dword [esp + 0x18]
shl esi, 5
or ecx, esi
mov esi, dword [esp + 0x20]
shl ecx, 5
or ecx, edx
mov edx, dword [esp + 0x24]
mov word [eax], cx
mov ecx, dword [esp + 0x1c]
add edx, edi
add eax, 2
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
add esi, ebx
add ecx, edx
dec eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
jne 0x40eeec
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0xf4]
mov edx, dword [0x541bec]
mov esi, dword [esp + 0x40]
mov ebx, dword [esp + 0x34]
lea eax, [eax + edx*2]
mov edx, dword [esp + 0x80]
mov dword [esp + 0xf4], eax
mov eax, dword [esp + 0x7c]
add esi, edx
mov edx, dword [esp + 0x44]
add edx, eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x74]
add ebp, eax
mov eax, dword [esp + 0x68]
add ebx, edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x64]
add edx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0x28]
add ecx, esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x8c]
add ebx, edx
add esi, eax
mov eax, dword [esp + 0x90]
inc edi
cmp edi, eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x54], edi
jle 0x40edf3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe0
ret