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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xd0
mov ebx, dword [ebp + 0x24]
mov esi, dword [ebp + 0x28]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], ebx
test eax, eax
mov edi, 6
cmovns edi, eax
mov eax, ebx
or eax, esi
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 8], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
je 0x40e7ee
mov ax, 8
jmp 0x40e809
cmp dword [ebp + 0x14], 0
je 0x40e807
mov eax, edi
xor eax, 0xfffffbff
mov ecx, edi
or ecx, 0x400
test ecx, eax
je 0x40e7e8
xor eax, eax
movzx ecx, ax
lea eax, [ecx + 0x800]
test edi, 0x10000
cmove ecx, eax
mov dword [esp + 0x6c], ecx
mov eax, edi
and eax, 0xf
mov dword [esp + 0x2c], eax
sete al
mov ecx, dword [edx + 0x48]
mov dword [esp + 0xc], ecx
test ecx, ecx
je 0x40eba0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x14], 2
jne 0x40eba0
cmp dword [ebp + 0x14], 0
setne cl
cmp dword [ebp + 0x10], 0
sete dl
cmp dword [ebp + 0xc], 0
je 0x40eba0
and dl, cl
jne 0x40eba0
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x40eba0
cmp dword [esp + 0x2c], 0xb
jae 0x40eba0
mov ecx, dword [esp + 0xc]
cmp dword [ecx + 0x34], 0
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x10]
je 0x40e8aa
cmp ecx, 0xffffffff
jne 0x40e8c1
mov dword [edx + 0x1c], 2
jmp 0x40ebaa
test esi, esi
jne 0x40e8b6
cmp ecx, 0xffff
jne 0x40e8c1
mov ecx, dword [esp + 0xc]
mov dword [ecx + 0x34], 1
mov ecx, ebx
or ecx, esi
je 0x40e8dd
mov ecx, edi
and ecx, 0x400
jne 0x40e8dd
mov dword [edx + 0x1c], 0x18
jmp 0x40ebaa
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
jne 0x40e8f1
mov dword [edx + 0x1c], 0x19
jmp 0x40ebaa
mov ecx, edi
shr ecx, 0xa
and ecx, 1
or al, cl
movzx eax, al
test edi, 0x400
jne 0x40e94c
mov ebx, dword [ebp + 0x14]
push ebx
push dword [ebp + 0x10]
push 0
mov ebx, eax
call fcn.00402f70
add esp, 0xc
mov dword [esp + 0x68], eax
xor esi, esi
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 0
cmp ecx, 4
mov eax, dword [esp + 0x2c]
cmovb eax, esi
mov dword [esp + 0x2c], eax
mov eax, 1
cmovb ebx, eax
mov dword [esp + 0x28], ebx
mov ebx, ecx
jmp 0x40e957
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x68], eax
push dword [ebp + 0xc]
call fcn.004171f0
add esp, 4
cmp eax, 0x10000
jb 0x40e978
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x40ebaa
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x20]
mov ecx, dword [edx + 0x24]
or ecx, eax
mov edx, 0
je 0x40e9bc
mov ecx, eax
mov eax, 0xfffffffe
lea edx, [eax + ecx]
inc edx
mov dword [esp + 4], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax]
and eax, edx
mov edx, eax
not edx
and edx, ecx
xor eax, ecx
add edx, edx
sub edx, eax
and edx, dword [esp + 4]
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
movzx ecx, word [ebp + 0x1c]
xor eax, eax
mov dword [esp + 0xa4], ecx
mov edx, ecx
mov ecx, dword [esp + 0x24]
add edx, ecx
mov ecx, edx
setb al
mov dword [esp + 0x20], edx
add edx, dword [esp + 4]
adc eax, 0
add edx, 0x4a
adc eax, 0
mov ecx, 0xfffffffe
cmp ecx, edx
sbb dword [esp + 0x1c], eax
jae 0x40ea12
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x40ebaa
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x1c], eax
test eax, eax
mov ecx, dword [esp + 0x24]
jne 0x40ea90
shr ecx, 0x1f
mov dword [esp + 0x64], ecx
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0xa4]
add eax, dword [ebp + 0x38]
mov edx, 0
adc edx, 0xffffffff
add eax, dword [ebp + 0x40]
adc edx, 0
mov ecx, dword [esp + 0x24]
add ecx, ecx
add eax, ecx
adc edx, dword [esp + 0x64]
add eax, dword [esp + 0x18]
adc edx, 0
add eax, dword [esp + 4]
adc edx, 0
mov ecx, dword [ebp + 8]
add eax, dword [ecx]
adc edx, dword [ecx + 4]
mov ecx, dword [esp + 0x24]
add eax, 0x72
adc edx, 0
cmp edx, 0xffffffff
je 0x40ea90
mov eax, dword [esp + 0xc]
mov dword [eax + 0x34], 1
mov dword [esp + 0x1c], 1
xor edx, edx
test ecx, ecx
je 0x40eab7
mov eax, dword [ebp + 0xc]
cmp byte [ecx + eax - 1], 0x2f
jne 0x40eab7
cmp dword [ebp + 0x14], 0
jne 0x40eba0
mov edx, 0x10
or ebx, esi
jne 0x40eba0
mov dword [esp + 0x64], edx
mov ecx, dword [esp + 0x1c]
test ecx, ecx
mov eax, 0x1c
cmove eax, ecx
mov ecx, dword [esp + 0x20]
add eax, ecx
add eax, 0x2e
mov ecx, eax
mov edx, dword [esp + 4]
and ecx, edx
xor eax, edx
lea eax, [eax + ecx*2]
mov ebx, dword [esp + 0xc]
mov edx, dword [ebx + 8]
cmp edx, eax
jae 0x40eb1f
test edx, edx
mov ecx, 1
cmovne ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x40eaf4
push esi
push dword [ebx + 0xc]
push dword [ebx]
mov ebx, dword [ebp + 8]
push dword [ebx + 0x34]
call dword [ebx + 0x30]
add esp, 0x10
test eax, eax
je 0x40ebb4
mov ebx, dword [esp + 0xc]
mov dword [ebx], eax
mov dword [ebx + 8], esi
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x18]
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
cmp ecx, eax
jae 0x40eb67
test ecx, ecx
mov edx, 1
cmovne edx, ecx
mov esi, edx
add edx, edx
cmp esi, eax
jb 0x40eb3e
push esi
push dword [ebx + 0x1c]
push dword [ebx + 0x10]
mov ebx, dword [ebp + 8]
push dword [ebx + 0x34]
call dword [ebx + 0x30]
add esp, 0x10
test eax, eax
je 0x40ebb4
mov ecx, dword [esp + 0xc]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x18], esi
xor eax, eax
cmp dword [ebp + 0x14], 0
je 0x40ebbd
cmp dword [esp + 0x28], 0
mov ecx, dword [ebp + 8]
mov ebx, dword [esp + 8]
jne 0x40ebc4
push 0x4df40
push 1
push dword [ecx + 0x34]
mov eax, dword [ebp + 8]
call dword [eax + 0x28]
mov ecx, dword [ebp + 8]
add esp, 0xc
test eax, eax
jne 0x40ebc4
mov dword [ecx + 0x1c], 0x10
jmp 0x40ebaa
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebx + 0x1c], 0x10
jmp 0x40ebaa
mov ecx, dword [ebp + 8]
mov ebx, dword [esp + 8]
mov dword [esp + 4], eax
mov esi, dword [esp + 0x10]
mov edx, esi
push dword [esp + 0x18]
push ebx
call fcn.0040f300
add esp, 8
test eax, eax
je 0x40ec3b
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
add eax, edx
adc ecx, 0
add esi, edx
mov dword [esp + 0x10], esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
adc ebx, 0
mov dword [esp + 8], ebx
xorps xmm0, xmm0
movaps xmmword [esp + 0x70], xmm0
movups xmmword [esp + 0x7e], xmm0
cmp dword [esp + 0x28], 0
mov dword [esp + 0x20], eax
je 0x40ec2f
mov edx, edi
or edx, 0x400
xor edi, 0xfffffbff
test edx, edi
je 0x40ec50
mov dx, 8
mov dword [esp + 0x1c], edx
mov bl, 0x14
jmp 0x40ec5a
push dword [esp + 4]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x40ebaa
xor ebx, ebx
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x34], 0
mov esi, 0xfffffffe
je 0x40ec9f
xor edi, edi
cmp esi, dword [esp + 0x38]
mov edx, 0
sbb edx, dword [esp + 0x3c]
jae 0x40ed85
xor edx, edx
cmp esi, dword [esp + 0x20]
mov eax, 0
sbb eax, ecx
lea eax, [esp + 0x30]
cmovae eax, edx
lea edx, [esp + 0x38]
lea edi, [esp + 0x40]
jmp 0x40ed9a
cmp dword [esp + 0x44], 0
jne 0x40f104
cmp dword [esp + 8], 0
jne 0x40f104
mov dword [esp + 0x70], 0x4034b50
mov byte [esp + 0x74], bl
mov byte [esp + 0x75], 0
mov ebx, dword [esp + 0x6c]
movzx edx, bx
mov byte [esp + 0x76], bl
mov byte [esp + 0x77], dh
mov edx, dword [esp + 0x1c]
mov byte [esp + 0x78], dl
movups xmmword [esp + 0x79], xmm0
mov byte [esp + 0x89], 0
mov eax, dword [esp + 0x24]
mov byte [esp + 0x8a], al
mov byte [esp + 0x8b], ah
mov ebx, dword [ebp + 0x38]
mov byte [esp + 0x8c], bl
mov byte [esp + 0x8d], bh
lea edx, [esp + 0x70]
push 0x1e
push edx
push ecx
push dword [esp + 0x2c]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40ef4b
mov edi, dword [esp + 0x10]
lea eax, [edi + edi]
and eax, 0x3c
xor edi, 0x1e
add edi, eax
mov ecx, dword [esp + 8]
adc ecx, 0
mov eax, esi
mov esi, dword [esp + 0x24]
push esi
push dword [ebp + 0xc]
mov dword [esp + 0x10], ecx
push ecx
push edi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x40ef3b
add edi, esi
mov ecx, dword [esp + 8]
adc ecx, 0
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], 0
mov edx, edi
jmp 0x40eeb4
mov eax, dword [esp + 0x20]
cmp esi, eax
mov edx, 0
sbb edx, ecx
jae 0x40edbc
lea eax, [esp + 0x30]
xor edx, edx
lea ecx, [esp + 0xb0]
push eax
push edi
call fcn.0040f3b0
add esp, 8
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
lea edi, [esp + 0xb0]
jmp 0x40edc0
mov esi, eax
xor eax, eax
mov dword [esp + 0x70], 0x4034b50
mov byte [esp + 0x74], bl
mov byte [esp + 0x75], 0
movzx edx, word [esp + 0x6c]
mov byte [esp + 0x76], dl
mov byte [esp + 0x77], dh
mov edx, dword [ebp + 0x38]
mov dword [esp + 0xc], eax
add edx, eax
mov ebx, dword [esp + 0x1c]
mov byte [esp + 0x78], bl
xorps xmm0, xmm0
movups xmmword [esp + 0x79], xmm0
mov byte [esp + 0x89], 0
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x8a], bl
mov byte [esp + 0x8b], bh
mov byte [esp + 0x8c], dl
mov byte [esp + 0x8d], dh
lea edx, [esp + 0x70]
push 0x1e
push edx
push ecx
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40ef4b
mov dword [esp + 0x18], edi
mov eax, esi
mov esi, dword [esp + 0x10]
add esi, 0x1e
mov edi, dword [esp + 8]
adc edi, 0
push ebx
push dword [ebp + 0xc]
push edi
push esi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x40ef3b
add esi, ebx
adc edi, 0
cmp dword [esp + 0x18], 0
mov ecx, edi
mov edx, esi
je 0x40eea9
lea eax, [esp + 0xb0]
mov esi, dword [esp + 0xc]
push esi
push eax
push ecx
push edx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
mov edi, ecx
mov ebx, edx
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x40eee1
add ebx, esi
adc edi, 0
mov edx, ebx
mov ebx, dword [ebp + 0x38]
mov ecx, edi
jmp 0x40eeb4
mov dword [esp + 0x18], 0
mov ebx, dword [ebp + 0x38]
test ebx, ebx
je 0x40eef0
push ebx
push dword [ebp + 0x34]
push ecx
push edx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
mov esi, ecx
mov edi, edx
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x40eee1
add edi, ebx
mov dword [esp + 0x10], edi
adc esi, 0
mov dword [esp + 8], esi
jmp 0x40eef8
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x40ebaa
mov dword [esp + 0x10], edx
mov dword [esp + 8], ecx
cmp dword [esp + 0x28], 0
je 0x40ef57
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x1c]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x40ef3b
mov eax, dword [ebp + 0x14]
add dword [esp + 0x10], eax
adc dword [esp + 8], 0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0
jmp 0x40effd
push dword [esp + 4]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x40ebaa
cmp dword [ebp + 0x14], 0
je 0x40effd
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
push 0
push 0xfffffffffffffff1
push dword [esp + 0x34]
call fcn.0040da50
add esp, 0xc
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x40f410
mov esi, dword [esp + 0x10]
push esi
call fcn.0040d8b0
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xac], eax
lea eax, [esp + 0xac]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.00403c80
add esp, 0x18
cmp eax, 1
jne 0x40f113
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], eax
push dword [esp + 4]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edi, eax
mov dword [esp + 0x2c], ecx
or eax, ecx
je 0x40f227
mov dword [esp + 0x48], 0x8074b50
mov ecx, dword [esp + 0x68]
mov byte [esp + 0x4c], cl
mov byte [esp + 0x4d], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x4e], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x4f], al
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
cmp dword [esp + 0x18], 0
je 0x40f100
mov byte [esp + 0x50], cl
mov byte [esp + 0x51], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x52], al
mov eax, edx
shr eax, 0x10
shr ecx, 0x18
mov byte [esp + 0x53], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x54], dl
mov byte [esp + 0x55], dh
mov byte [esp + 0x56], al
mov byte [esp + 0x57], cl
mov ecx, edi
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov eax, edi
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, edi
shr eax, 0x18
mov byte [esp + 0x5b], al
mov dword [esp + 0x28], 0x38
mov dword [esp + 0xa0], 0x30
mov ecx, 0x28
mov dword [esp + 4], 0x18
mov dword [esp + 0x20], 0x17
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x17], al
mov dword [esp + 0x9c], 0x16
mov dword [esp + 0x98], 0x15
mov dword [esp + 0x94], 0x14
jmp 0x40f182
test edx, edx
je 0x40f12f
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x40ebaa
push dword [esp + 4]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x40ebaa
mov dword [esp + 0x50], ecx
mov dword [esp + 0x28], 0x18
mov dword [esp + 0xa0], 0x10
mov ecx, 8
mov dword [esp + 0x20], 0xf
mov dword [esp + 0x9c], 0xe
mov eax, edi
mov byte [esp + 0x17], al
mov dword [esp + 0x98], 0xd
mov dword [esp + 0x94], 0xc
mov dword [esp + 4], 0x10
mov ebx, edi
mov edx, dword [esp + 0x2c]
shrd ebx, edx, cl
mov eax, edx
shr eax, cl
test cl, 0x20
cmove eax, ebx
mov esi, edi
mov ecx, dword [esp + 0xa0]
shrd esi, edx, cl
mov dword [esp + 0xa8], esi
movzx ebx, byte [esp + 0x17]
mov esi, dword [esp + 0x94]
mov byte [esp + esi + 0x48], bl
mov ebx, dword [esp + 0x98]
mov byte [esp + ebx + 0x48], al
mov eax, edx
shr eax, cl
test cl, 0x20
cmove eax, dword [esp + 0xa8]
mov ecx, dword [esp + 0x9c]
mov byte [esp + ecx + 0x48], al
mov ecx, dword [esp + 0x28]
shrd edi, edx, cl
shr edx, cl
test cl, 0x20
cmove edx, edi
mov eax, dword [esp + 0x20]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
mov esi, dword [esp + 4]
push esi
push eax
push dword [esp + 0x10]
push dword [esp + 0x1c]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x40ebaa
mov eax, dword [esp + 4]
add dword [esp + 0x10], eax
adc dword [esp + 8], 0
cmp dword [esp + 0x18], 0
je 0x40f279
xor ecx, ecx
mov edx, 0xfffffffe
cmp edx, dword [esp + 0x30]
mov eax, 0
sbb eax, dword [esp + 0x34]
lea eax, [esp + 0x30]
cmovae eax, ecx
cmp edx, dword [esp + 0x38]
mov edx, 0
sbb edx, dword [esp + 0x3c]
lea esi, [esp + 0x40]
cmovae esi, ecx
lea edx, [esp + 0x38]
cmovae edx, ecx
lea ecx, [esp + 0xb0]
push eax
push esi
call fcn.0040f3b0
add esp, 8
mov dword [esp + 0xc], eax
movzx ebx, word [esp + 0x6c]
movzx esi, word [esp + 0x1c]
movzx eax, word [esp + 0xc]
movzx edi, word [esp + 0x24]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x6c]
push dword [esp + 0x40]
push dword [esp + 0x40]
push 0
push 0
push ebx
push esi
push dword [esp + 0x8c]
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push dword [esp + 0xdc]
push dword [ebp + 0x18]
push eax
push dword [esp + 0x5c]
push edi
call fcn.0040f470
add esp, 0x4c
test eax, eax
je 0x40ebaa
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 0x10]
mov dword [eax], ecx
mov ecx, dword [esp + 8]
mov dword [eax + 4], ecx
mov eax, 1
jmp 0x40ebac