Function at 0x40dbd0
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 + 0xc8], eax
mov eax, dword [esp + 0xfc]
shl ecx, 2
mov edx, dword [eax]
mov dword [esp + 0x9c], esi
mov dword [esp + 0x8c], 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 + 0x9c], eax
mov eax, dword [esp + 0x104]
mov dword [esp + 0x98], esi
mov dword [esp + 0xb4], edi
mov esi, dword [eax]
mov dword [esp + 0x94], edx
mov dword [esp + 0xa4], esi
mov esi, dword [eax + 4]
movsx eax, byte [eax + 8]
add eax, ecx
mov dword [esp + 0xa8], esi
shl eax, 2
mov dword [esp + 0xc8], ebx
mov edi, dword [eax + 0x506148]
mov eax, dword [eax + 0x506168]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x108]
mov dword [esp + 0xac], edi
mov edi, dword [eax]
mov dword [esp + 0xb8], edi
mov edi, dword [eax + 4]
movsx eax, byte [eax + 8]
add eax, ecx
mov dword [esp + 0xbc], edi
shl eax, 2
mov ecx, dword [eax + 0x506148]
mov eax, dword [eax + 0x506168]
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc4], eax
xor eax, eax
xor ecx, ecx
cmp esi, edx
mov dword [esp + 0x64], eax
jle 0x40dce7
mov dword [esp + 0x64], 1
mov eax, dword [esp + 0x64]
jge 0x40dcee
mov ecx, 1
lea edx, [eax + eax*4]
cmp edi, dword [esp + edx*4 + 0x94]
jle 0x40dd06
mov dword [esp + 0x64], 2
mov eax, dword [esp + 0x64]
lea edx, [ecx + ecx*4]
cmp edi, dword [esp + edx*4 + 0x94]
jge 0x40dd17
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 + 0x40], esi
mov esi, dword [esp + esi + 0x94]
mov ebx, dword [esp + edx + 0x94]
mov dword [esp + 0x8c], esi
sub esi, ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x48], esi
js 0x40e5cc
mov dword [esp + 0x50], eax
mov dword [esp + 0x58], eax
lea eax, [edi + edi*4]
mov esi, ecx
shl eax, 2
mov ebp, dword [esp + eax + 0x94]
cmp ebx, ebp
mov dword [esp + 0x28], ebp
jne 0x40dd96
mov edx, dword [esp + edx + 0x90]
mov ebx, dword [esp + eax + 0x90]
cmp edx, ebx
jge 0x40dd8f
mov esi, edi
jmp 0x40de17
mov ecx, edi
jmp 0x40de17
mov ebp, dword [esp + edx + 0x90]
mov edx, dword [esp + 0x40]
mov edx, dword [esp + edx + 0x90]
cmp ebp, edx
mov dword [esp + 0x5c], edx
jne 0x40ddbf
cmp ebp, dword [esp + eax + 0x90]
jge 0x40de13
mov dword [esp + 0x50], edi
jmp 0x40de17
mov eax, dword [esp + eax + 0x90]
cmp ebp, eax
jne 0x40ddd4
cmp ebp, edx
jl 0x40de13
mov dword [esp + 0x50], edi
jmp 0x40de17
mov edx, dword [esp + 0x28]
cmp dword [esp + 0x8c], edx
jne 0x40dded
cmp dword [esp + 0x5c], eax
jge 0x40de13
mov dword [esp + 0x50], edi
jmp 0x40de17
sub eax, ebp
sub edx, ebx
shl eax, 0xc
mov ebx, edx
cdq
idiv ebx
mov ebx, eax
mov eax, dword [esp + 0x5c]
sub eax, ebp
shl eax, 0xc
cdq
idiv dword [esp + 0x48]
cmp eax, ebx
jge 0x40de13
mov dword [esp + 0x50], edi
jmp 0x40de17
mov dword [esp + 0x58], edi
lea esi, [esi + esi*4]
lea eax, [ecx + ecx*4]
shl esi, 2
shl eax, 2
mov edx, dword [esp + esi + 0x90]
mov edi, dword [esp + 0x58]
mov dword [esp + 0x68], edx
mov ebp, dword [esp + eax + 0x90]
shl edx, 0xc
mov dword [esp + 0x20], edx
mov edx, dword [esp + esi + 0xa0]
mov dword [esp + 0x6c], edx
mov ecx, dword [esp + eax + 0xa0]
shl edx, 0xc
mov dword [esp + 0x30], edx
mov edx, dword [esp + eax + 0x98]
mov dword [esp + 0x48], edx
lea edi, [edi + edi*4]
shl edx, 0xc
mov dword [esp + 0x14], edx
mov edx, dword [esp + eax + 0x9c]
mov dword [esp + 0x7c], edx
mov dword [esp + 0x44], ecx
shl edx, 0xc
mov dword [esp + 0x1c], edx
mov edx, dword [esp + esi + 0x98]
mov dword [esp + 0x60], edx
shl edx, 0xc
mov dword [esp + 0x18], edx
mov edx, dword [esp + esi + 0x9c]
mov dword [esp + 0x4c], edx
shl edx, 0xc
shl edi, 2
mov dword [esp + 0x24], edx
mov edx, dword [esp + eax + 0x94]
mov eax, dword [esp + edi + 0x90]
mov ebx, dword [esp + edi + 0x94]
shl ebp, 0xc
mov dword [esp + 0xd8], eax
sub ebp, 0x1000
shl eax, 0xc
mov dword [esp + 0xdc], eax
sub eax, ebp
mov dword [esp + 0xec], ebx
sub eax, 0x1000
sub ebx, edx
cdq
idiv ebx
mov edx, dword [esp + 0x44]
shl ecx, 0xc
mov dword [esp + 0x54], ecx
mov dword [esp + 0x78], eax
mov eax, dword [esp + edi + 0xa0]
mov dword [esp + 0xe8], eax
sub eax, edx
shl eax, 0xc
cdq
idiv ebx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x80], eax
mov eax, dword [esp + edi + 0x98]
mov dword [esp + 0xd0], eax
sub eax, edx
shl eax, 0xc
cdq
idiv ebx
mov edi, dword [esp + edi + 0x9c]
mov dword [esp + 0xd4], edi
mov dword [esp + 0x70], eax
mov eax, edi
sub eax, dword [esp + 0x7c]
shl eax, 0xc
cdq
idiv ebx
mov ebx, dword [esp + 0x50]
lea ebx, [ebx + ebx*4]
shl ebx, 2
mov dword [esp + 0x5c], eax
mov eax, dword [esp + ebx + 0x90]
mov dword [esp + 0x7c], eax
mov edi, dword [esp + ebx + 0x94]
mov edx, dword [esp + esi + 0x94]
mov dword [esp + 0xe4], edi
sub edi, edx
mov edx, dword [esp + 0x68]
mov esi, dword [esp + ebx + 0xa0]
sub eax, edx
mov dword [esp + 0xe0], esi
shl eax, 0xc
cdq
idiv edi
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x84], eax
mov eax, esi
sub eax, edx
shl eax, 0xc
cdq
idiv edi
mov edx, dword [esp + 0x60]
mov dword [esp + 0x74], eax
mov eax, dword [esp + ebx + 0x98]
mov dword [esp + 0x48], eax
sub eax, edx
shl eax, 0xc
cdq
idiv edi
mov ebx, dword [esp + ebx + 0x9c]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x88], eax
mov eax, ebx
sub eax, dword [esp + 0x4c]
shl eax, 0xc
cdq
idiv edi
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0xf4]
mov dword [esp + 0x4c], edi
mov ebx, eax
mov eax, edi
imul eax, dword [0x541bec]
mov dword [esp + 0x68], ebx
lea eax, [edx + eax*2]
mov dword [esp + 0xf4], eax
mov eax, dword [esp + 0x28]
cmp edi, eax
jg 0x40e222
mov eax, dword [esp + 0x118]
cmp edi, dword [eax + 4]
jl 0x40e191
cmp edi, dword [eax + 0xc]
jge 0x40e191
mov eax, dword [esp + 0x20]
mov esi, ebp
sar eax, 0xc
mov dword [esp + 0x34], eax
mov edi, eax
sar esi, 0xc
mov eax, 0x1000
sub edi, esi
cdq
inc edi
mov dword [esp + 0x3c], ecx
idiv edi
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
sub edi, ecx
mov dword [esp + 0x2c], edx
mov ebx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], ebx
imul edi, ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x38], eax
sub ebx, edx
mov edx, dword [esp + 0x24]
imul ebx, dword [esp + 0x10]
sub edx, eax
mov eax, esi
imul edx, dword [esp + 0x10]
mov esi, dword [esp + 0x34]
mov dword [esp + 0x10], eax
sar edi, 0xc
sar ebx, 0xc
sar edx, 0xc
cmp eax, esi
mov dword [esp + 0x6c], edx
jg 0x40e182
mov esi, dword [esp + 0xf4]
lea esi, [esi + eax*2]
mov dword [esp + 0x60], esi
mov esi, dword [esp + 0x118]
cmp eax, dword [esi]
jl 0x40e148
cmp eax, dword [esi + 8]
jge 0x40e148
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0xcc]
mov esi, dword [esp + 0xf8]
mov eax, dword [esp + 0x3c]
sar edx, 0xc
shl edx, cl
mov ecx, dword [esp + 0x2c]
sar ecx, 0xc
sar eax, 0xc
add edx, ecx
xor ecx, ecx
shl eax, 5
mov cx, word [esi + edx*2]
xor edx, edx
add eax, 0x587af0
mov dx, word [ecx*2 + 0xb55670]
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 + 0x60]
shl esi, 5
or ecx, esi
shl ecx, 5
or ecx, edx
mov edx, dword [esp + 0x6c]
mov word [eax], cx
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x3c]
add esi, edi
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x2c]
add esi, ebx
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x38]
add esi, edx
inc eax
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x60]
add esi, 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x60], esi
mov esi, dword [esp + 0x34]
cmp eax, esi
jle 0x40e0b9
mov ebx, dword [esp + 0x68]
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0xe0]
mov edx, dword [0x541bec]
mov eax, dword [esp + 0xf4]
lea edx, [eax + edx*2]
mov eax, dword [esp + 0x78]
mov dword [esp + 0xf4], edx
mov edx, dword [esp + 0x20]
add ebp, eax
mov eax, dword [esp + 0x84]
add edx, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x80]
add ecx, edx
mov edx, dword [esp + 0x74]
add eax, edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x70]
add edx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x88]
add eax, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x5c]
add edx, eax
mov eax, dword [esp + 0x24]
add eax, ebx
inc edi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
cmp edi, eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x4c], edi
jle 0x40e01d
mov edx, dword [esp + 0x8c]
cmp edi, edx
jg 0x40e5cc
mov eax, dword [esp + 0x64]
cmp dword [esp + 0x58], eax
je 0x40e306
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0xec]
mov ecx, edx
mov edx, dword [esp + 0xd8]
mov eax, dword [esp + ebp + 0x90]
sub ecx, esi
sub eax, edx
mov esi, dword [esp + 0xe8]
shl eax, 0xc
cdq
idiv ecx
mov dword [esp + 0x78], eax
mov eax, dword [esp + ebp + 0xa0]
sub eax, esi
shl eax, 0xc
cdq
idiv ecx
mov edx, dword [esp + 0xd0]
shl esi, 0xc
mov dword [esp + 0x80], eax
mov eax, dword [esp + ebp + 0x98]
sub eax, edx
shl eax, 0xc
cdq
idiv ecx
mov edx, dword [esp + 0xd4]
mov dword [esp + 0x70], eax
mov eax, dword [esp + ebp + 0x9c]
sub eax, edx
shl eax, 0xc
cdq
idiv ecx
mov ecx, dword [esp + 0xdc]
mov edx, dword [esp + 0x78]
lea ebp, [edx + ecx - 0x1000]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x70]
add esi, ecx
mov ecx, dword [esp + 0xd0]
mov dword [esp + 0x54], esi
shl ecx, 0xc
add ecx, edx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0xd4]
shl ecx, 0xc
add ecx, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x1c], ecx
mov ecx, esi
jmp 0x40e3cb
cmp dword [esp + 0x50], eax
je 0x40e3cb
mov eax, dword [esp + 0xe4]
mov ebx, edx
mov edx, dword [esp + 0x7c]
sub ebx, eax
mov eax, dword [esp + 0x40]
mov eax, dword [esp + eax + 0x90]
sub eax, edx
shl eax, 0xc
cdq
idiv ebx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x84], eax
mov eax, dword [esp + edx + 0xa0]
sub eax, esi
shl eax, 0xc
cdq
idiv ebx
mov edx, dword [esp + 0x48]
shl esi, 0xc
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x40]
mov eax, dword [esp + eax + 0x98]
sub eax, edx
shl eax, 0xc
cdq
idiv ebx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x88], eax
mov eax, dword [esp + edx + 0x9c]
sub eax, dword [esp + 0x44]
shl eax, 0xc
cdq
idiv ebx
mov edx, dword [esp + 0x84]
mov ebx, eax
mov eax, dword [esp + 0x7c]
shl eax, 0xc
add eax, edx
mov edx, dword [esp + 0x88]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x74]
add esi, eax
mov eax, dword [esp + 0x48]
shl eax, 0xc
add eax, edx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x44]
shl eax, 0xc
add eax, ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x118]
cmp edi, dword [eax + 4]
jl 0x40e538
cmp edi, dword [eax + 0xc]
jge 0x40e538
mov eax, dword [esp + 0x20]
mov esi, ebp
sar eax, 0xc
mov dword [esp + 0x34], eax
mov edi, eax
sar esi, 0xc
mov eax, 0x1000
sub edi, esi
cdq
inc edi
mov dword [esp + 0x3c], ecx
idiv edi
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
sub edi, ecx
mov dword [esp + 0x2c], edx
mov ebx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], ebx
imul edi, ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x38], eax
sub ebx, edx
mov edx, dword [esp + 0x24]
imul ebx, dword [esp + 0x10]
sub edx, eax
mov eax, esi
imul edx, dword [esp + 0x10]
mov esi, dword [esp + 0x34]
mov dword [esp + 0x10], eax
sar edi, 0xc
sar ebx, 0xc
sar edx, 0xc
cmp eax, esi
mov dword [esp + 0x6c], edx
jge 0x40e530
mov esi, dword [esp + 0xf4]
lea esi, [esi + eax*2]
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x118]
cmp eax, dword [esi]
jl 0x40e4f6
cmp eax, dword [esi + 8]
jge 0x40e4f6
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0xcc]
mov esi, dword [esp + 0xf8]
mov eax, dword [esp + 0x3c]
sar edx, 0xc
shl edx, cl
mov ecx, dword [esp + 0x2c]
sar ecx, 0xc
sar eax, 0xc
add edx, ecx
xor ecx, ecx
shl eax, 5
mov cx, word [esi + edx*2]
xor edx, edx
add eax, 0x587af0
mov dx, word [ecx*2 + 0xb55670]
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 + 0x28]
shl esi, 5
or ecx, esi
shl ecx, 5
or ecx, edx
mov edx, dword [esp + 0x6c]
mov word [eax], cx
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x3c]
add esi, edi
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x2c]
add esi, ebx
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x38]
add esi, edx
inc eax
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x28]
add esi, 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x34]
cmp eax, esi
jl 0x40e467
mov ebx, dword [esp + 0x68]
mov edi, dword [esp + 0x4c]
mov edx, dword [0x541bec]
mov eax, dword [esp + 0xf4]
mov esi, dword [esp + 0x78]
lea edx, [eax + edx*2]
mov eax, dword [esp + 0x84]
mov dword [esp + 0xf4], edx
mov edx, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x80]
add ebp, esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x74]
add ecx, eax
mov eax, dword [esp + 0x70]
add esi, edx
mov edx, dword [esp + 0x14]
add edx, eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x18]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x88]
add esi, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x24]
add edx, eax
mov eax, dword [esp + 0x8c]
add esi, ebx
inc edi
cmp edi, eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], esi
mov dword [esp + 0x4c], edi
jle 0x40e3cb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe0
ret