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

Disassembly:
sub esp, 0x284
mov edx, dword [esp + 0x288]
push ebx
mov ebx, dword [edx + 0x60]
push ebp
mov ebp, dword [edx]
push esi
mov esi, dword [esp + 0x2a4]
mov al, byte [esi + 1]
test al, al
push edi
mov edi, dword [esp + 0x2ac]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x2c], edi
jns 0x40e290
movzx eax, word [ebp + 0xea]
mov dword [esp + 0x18], eax
jmp 0x40e298
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x18]
movzx esi, word [esi]
add ecx, 2
xor eax, eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x2a0]
mov ax, word [ecx]
and esi, 0x7fff
mov dword [esp + 0x3c], esi
mov byte [edx + 0x94], 1
and eax, 0x7fff
mov dword [esp + 0x10], eax
add eax, ecx
cmp edi, eax
mov dword [esp + 0x34], eax
jae 0x40e2e9
mov eax, dword [ebp + 0x198]
test al, 1
lea eax, [eax + 1]
mov dword [ebp + 0x198], eax
jne 0x40e2fc
movzx eax, word [ebp + 0xea]
lea eax, [eax + ecx + 2]
cmp edi, eax
jne 0x40e720
mov edi, dword [esp + 0x1c]
movzx edx, word [edi + 0xea]
mov ebp, dword [esp + 0x29c]
push ebx
lea ecx, [esp + 0x30]
push ecx
push edx
push ebp
call dword [ebp + 0x74]
mov eax, dword [esp + 0x3c]
movzx ecx, word [edi + 0xea]
push eax
push ecx
call fcn.00409380
mov edx, dword [esp + 0x2b0]
xor ecx, ecx
push ecx
push ebx
push ecx
push eax
push ebp
push edx
mov dword [esp + 0x68], eax
call fcn.00408bb0
add esp, 0x30
test eax, eax
je 0x40eb26
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + 0xea]
xor edi, edi
mov di, word [ebx]
push eax
lea ecx, [ebx + 2]
push ecx
mov ecx, dword [esp + 0x34]
sub ecx, eax
push ecx
and edi, 0x7fff
call fcn.0041ccb0
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x2ac]
push edx
mov edx, dword [esp + 0x2a8]
lea eax, [esp + 0x18c]
push eax
push ecx
push ebp
push edx
call fcn.00409e40
mov eax, dword [esp + 0x2c8]
lea ecx, [esi + eax]
push ecx
lea edx, [esp + 0x88]
push edx
push eax
mov eax, dword [esp + 0x2c4]
push ebp
push eax
call fcn.00409e40
mov eax, dword [esp + 0x48]
lea edx, [esp + 0x74]
push edx
lea edx, [esp + 0x1b4]
push edx
xor edx, edx
mov ecx, edi
sub ecx, eax
cmp esi, eax
sete dl
mov dword [esp + 0x6c], ecx
lea ecx, [eax + ebx]
lea eax, [esp + 0xa0]
dec edx
and edx, eax
push edx
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
push ebp
call fcn.0040f220
mov ecx, dword [esp + 0x7c]
add esp, 0x4c
add eax, ecx
push ecx
add eax, esi
add eax, ebx
add edi, ebx
push edi
push eax
mov dword [esp + 0x30], eax
call fcn.00418ff4
mov ecx, esi
mov esi, dword [esp + 0x2b4]
mov edx, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x48]
lea eax, [esp + 0x4c]
push eax
add ecx, ebx
push ecx
push ebp
call fcn.0040f4f0
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x4c]
mov edi, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c4]
sub esi, ebx
neg eax
sbb eax, eax
and eax, 0x8000
mov dword [esp + 0x3c], eax
add eax, esi
push edx
mov word [ebx], ax
movzx edx, word [edi + 0xea]
lea eax, [esp + 0x198]
push eax
push ecx
push edx
push ebp
call fcn.0040eb50
mov ecx, dword [esp + 0x3c]
mov dx, word [edi + 0xea]
sub ecx, eax
mov eax, dword [esp + 0x2cc]
add esp, 0x2c
neg dx
mov dword [esp + 0x10], ecx
sbb edx, edx
and edx, 0x8000
add edx, ecx
mov word [eax], dx
movzx ecx, word [ebp + 2]
cmp esi, ecx
ja 0x40e4e7
mov edi, dword [esp + 0x2a8]
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
xor eax, eax
push eax
mov eax, dword [esp + 0x3c]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x2a0]
push ebp
push ecx
call fcn.00408d30
add esp, 0x10
jmp 0x40e6d4
mov edx, dword [esp + 0x2ac]
mov esi, dword [esp + 0x298]
push edx
lea ecx, [esp + 0x180]
push ecx
push eax
push ebp
push esi
call fcn.00409e40
lea edx, [esp + 0x78]
push edx
push ebx
push ebp
push esi
call fcn.0040f5c0
mov edi, dword [esp + 0x2cc]
mov dword [esp + 0x44], eax
sub eax, ebx
mov ecx, eax
mov edx, ecx
shr ecx, 2
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x2cc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x48]
add ecx, eax
mov eax, dword [esp + 0x34]
mov word [edx], cx
mov ecx, dword [esp + 0x2c4]
lea edi, [eax + ecx]
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0x88]
push edx
lea eax, [esp + 0x48]
push eax
push ecx
push ebp
call dword [ebp + 0x74]
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x2cc]
push edx
lea eax, [esp + eax + 0x9c]
push eax
push ecx
call fcn.004093b0
mov esi, dword [esp + 0x2ec]
add esp, 0x40
lea edx, [esp + 0x40]
push edx
xor edx, edx
cmp esi, edi
sete dl
lea eax, [esp + 0x68]
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x184]
push ecx
movzx ecx, word [eax + 0xea]
dec edx
and edx, esi
push edx
push ecx
push ebp
call fcn.0040f220
add esp, 0x18
test eax, eax
mov dword [esp + 0x30], eax
jl 0x40e5d4
mov edx, edi
sub edx, esi
push edx
push edi
add edi, eax
push edi
call fcn.00418ff4
jmp 0x40e5e4
sub edi, esi
add edi, eax
mov ecx, esi
push edi
sub ecx, eax
push ecx
push esi
call fcn.0041ccb0
add esp, 0xc
lea edx, [esp + 0x40]
push edx
push esi
push ebp
call fcn.0040f4f0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x24]
add eax, ecx
mov ecx, dword [esp + 0x28]
mov dx, word [ecx + 0xea]
add esp, 0xc
neg dx
mov dword [esp + 0x10], eax
sbb edx, edx
and edx, 0x8000
add edx, eax
test esi, esi
mov eax, dword [esp + 0x2a0]
mov word [eax], dx
je 0x40e642
mov ecx, dword [esp + 0x20]
push esi
sub ecx, esi
push ecx
lea eax, [ebx + 2]
push eax
call fcn.0041ccb0
add esp, 0xc
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x24]
push eax
push esi
push ebp
call dword [ebp + 0x74]
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x78]
push edx
push 0
push 0
push esi
push ebp
call fcn.0040f220
mov edx, dword [esp + 0x3c]
mov edi, eax
mov eax, dword [esp + 0x48]
movzx ecx, byte [eax]
xor esi, esi
mov dword [esp + 0x74], ecx
mov si, word [ebx]
and esi, 0x7fff
sub esi, eax
add esi, ebx
push esi
push eax
lea eax, [edi + edx]
add eax, ebx
push eax
call fcn.0041ccb0
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x74]
push ecx
lea eax, [edx + ebx]
push eax
push ebp
call fcn.0040f4f0
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x78]
add eax, ecx
add eax, edi
add esp, 0x40
add eax, esi
mov word [ebx], ax
push ebx
xor eax, eax
push eax
mov eax, dword [esp + 0x2a0]
push edx
push ebp
push eax
call fcn.00408c40
add esp, 0x14
test eax, eax
jne 0x40eb26
mov ecx, dword [esp + 0x2a8]
mov edx, dword [esp + 0x2a4]
push ecx
push eax
mov eax, dword [esp + 0x2a0]
push edx
push ebp
push eax
call fcn.00408c40
add esp, 0x14
test eax, eax
jne 0x40eb26
movzx ecx, word [ebp + 2]
mov edx, dword [esp + 0x10]
pop edi
shr ecx, 1
cmp ecx, edx
pop esi
sbb eax, eax
pop ebp
inc eax
pop ebx
add esp, 0x284
ret
push edi
mov edi, dword [esp + 0x2a0]
lea eax, [esp + 0x180]
push eax
push ecx
push edi
push edx
call fcn.00409e40
movzx ecx, word [ebp + 0xea]
push eax
push ecx
mov dword [esp + 0x2c8], eax
call fcn.00409380
mov edx, dword [esp + 0x2b4]
xor ecx, ecx
push ecx
push ebx
push ecx
push eax
push edi
push edx
mov dword [esp + 0x6c], eax
call fcn.00408bb0
add esp, 0x34
test eax, eax
je 0x40eb26
mov ecx, dword [esp + 0x2a8]
mov edx, dword [esp + 0x2c]
xor eax, eax
mov ax, word [ebx]
add ecx, 2
and eax, 0x7fff
mov dword [esp + 0x28], eax
add eax, ebx
mov dword [esp + 0x24], eax
movzx eax, word [ebp + 0xea]
push eax
push ecx
sub edx, eax
push edx
call fcn.0041ccb0
mov eax, dword [esp + 0x2b8]
lea ecx, [esp + 0x188]
push ecx
mov dword [esp + 0x3c], eax
movzx eax, word [ebp + 0xea]
lea edx, [esp + 0x3c]
push edx
push eax
push edi
call dword [edi + 0x74]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x2b4]
push ecx
lea edx, [esp + 0x84]
push edx
push ebx
push edi
push eax
call fcn.00409e40
mov ebp, dword [esp + 0x44]
mov ecx, dword [esp + 0x2d8]
lea edx, [esp + 0x70]
push edx
xor edx, edx
cmp esi, ebp
sete dl
lea eax, [ecx + ebp]
lea ecx, [esp + 0x1b0]
push ecx
lea ecx, [esp + 0x9c]
mov dword [esp + 0x74], eax
dec edx
and edx, ecx
push edx
mov edx, dword [esp + 0x54]
push eax
push edx
push edi
call fcn.0040f220
mov ebp, eax
add esp, 0x48
test ebp, ebp
jl 0x40e842
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
mov eax, esi
sub eax, edx
mov edx, dword [esp + 0x28]
push eax
lea eax, [edx + ebx]
push ecx
add eax, ebp
jmp 0x40e860
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov ecx, ebp
sub ecx, eax
add ecx, esi
push ecx
mov ecx, dword [esp + 0x2ac]
sub eax, ebp
add eax, ecx
push eax
lea eax, [edx + ebx]
push eax
call fcn.0041ccb0
mov ecx, dword [esp + 0x34]
add esp, 0xc
lea eax, [esp + 0x40]
push eax
lea eax, [ecx + ebx]
push eax
push edi
call fcn.0040f4f0
sub ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x40]
add ebp, esi
mov esi, dword [esp + 0x34]
add esi, ebp
mov ebp, dword [esp + 0x24]
neg ebp
sbb ebp, ebp
mov edx, esi
and ebp, 0x8000
lea eax, [edx + ebp]
push ecx
mov word [ebx], ax
mov eax, dword [esp + 0x2c]
movzx ecx, word [eax + 0xea]
lea edx, [esp + 0x18c]
push edx
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x2c0]
push esi
push ecx
push edi
call fcn.0040eb50
mov edx, dword [esp + 0x3c]
mov dx, word [edx + 0xea]
mov ecx, dword [esp + 0x30]
sub ecx, eax
mov eax, dword [esp + 0x2c0]
add esp, 0x20
neg dx
mov dword [esp + 0x10], ecx
sbb edx, edx
and edx, 0x8000
add edx, ecx
mov word [eax], dx
movzx ecx, word [edi + 2]
cmp dword [esp + 0x28], ecx
ja 0x40e922
mov edx, dword [esp + 0x2a4]
mov eax, dword [esp + 0x298]
push 0
push edx
push edi
push eax
call fcn.00408d30
add esp, 0x10
jmp 0x40eb06
mov edx, dword [esp + 0x298]
push esi
lea ecx, [esp + 0x180]
push ecx
push eax
push edi
push edx
call fcn.00409e40
mov ecx, dword [esp + 0x2ac]
lea eax, [esp + 0x78]
push eax
push ebx
push edi
push ecx
call fcn.0040f5c0
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0x88]
push edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x48]
push eax
push ecx
push edi
call dword [edi + 0x74]
mov edx, dword [esp + 0x2d8]
mov ecx, dword [esp + 0x2cc]
push edx
lea eax, [esp + eax + 0x9c]
push eax
push ecx
call fcn.004093b0
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x2e0]
add esp, 0x40
add eax, edx
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x68]
push edx
xor edx, edx
cmp esi, eax
sete dl
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x184]
push ecx
movzx ecx, word [eax + 0xea]
dec edx
and edx, esi
push edx
push ecx
push edi
call fcn.0040f220
mov ecx, dword [esp + 0x4c]
add esp, 0x18
test eax, eax
mov dword [esp + 0x30], eax
jle 0x40e9eb
mov edx, ecx
sub edx, esi
push edx
push ecx
add ecx, eax
push ecx
call fcn.00418ff4
jmp 0x40e9fb
sub ecx, esi
add ecx, eax
push ecx
mov ecx, esi
sub ecx, eax
push ecx
push esi
call fcn.0041ccb0
add esp, 0xc
lea edx, [esp + 0x40]
push edx
push esi
push edi
call fcn.0040f4f0
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
add eax, edx
mov dx, word [ecx + 0xea]
add esp, 0xc
neg dx
mov dword [esp + 0x10], eax
sbb edx, edx
and edx, 0x8000
add edx, eax
test esi, esi
mov eax, dword [esp + 0x2a0]
mov word [eax], dx
je 0x40ea60
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2a8]
push esi
sub ecx, esi
push ecx
lea eax, [edx + 2]
push eax
call fcn.0041ccb0
add esp, 0xc
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x24]
push ecx
push esi
push edi
call dword [edi + 0x74]
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x78]
push eax
push 0
push 0
push esi
push edi
call fcn.0040f220
mov edx, dword [esp + 0x3c]
mov esi, eax
mov eax, dword [esp + 0x48]
movzx ecx, byte [eax]
mov dword [esp + 0x74], ecx
mov ecx, dword [esp + 0x50]
sub ecx, eax
add ecx, ebx
push ecx
push eax
lea eax, [esi + edx]
add eax, dword [esp + 0x2d8]
push eax
mov dword [esp + 0x64], ecx
call fcn.0041ccb0
mov edx, dword [esp + 0x70]
lea ecx, [esp + 0x74]
push ecx
push edx
push edi
call fcn.0040f4f0
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x70]
lea ecx, [eax + ebp]
mov eax, dword [esp + 0x2e8]
add esp, 0x40
push eax
add ecx, esi
mov esi, dword [esp + 0x28]
add ecx, edx
mov edx, dword [esp + 0x2a8]
push 0
push edx
mov word [eax], cx
mov eax, dword [esp + 0x2a4]
sub ebp, ebx
push edi
add ebp, esi
push eax
mov word [ebx], bp
call fcn.00408c40
add esp, 0x14
test eax, eax
jne 0x40eb26
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x298]
push ebx
push eax
push ecx
push edi
push edx
call fcn.00408c40
add esp, 0x14
test eax, eax
je 0x40eb34
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x284
ret
movzx eax, word [edi + 2]
mov edx, dword [esp + 0x10]
shr eax, 1
pop edi
cmp eax, edx
pop esi
sbb eax, eax
pop ebp
inc eax
pop ebx
add esp, 0x284
ret