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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffe0
push edi
push esi
push ebx
sub esp, 0x7b4
mov dword [esp + 0x328], ecx
mov ebx, edx
mov esi, eax
movsx ecx, byte [esi + 8]
cmp ecx, 1
je 0x40ee9f
cmp ecx, 2
je 0x40ee8c
cmp ecx, 3
je 0x40ee79
cmp ecx, 4
je 0x40ee66
mov eax, 0xfffffffe
movsx ecx, al
test ecx, ecx
je 0x40e350
mov eax, 1
add esp, 0x7b4
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 4]
mov dword [0x808c0c], ecx
mov dword [0x808c10], 0
mov eax, dword [esi]
mov dword [0x808c14], eax
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f29c
mov dword [esp + 0x324], eax
call fcn.0040f29c
mov dword [esp + 0x338], eax
call fcn.0040f338
movzx edi, al
mov esi, edi
and esi, 0x80
and edi, 7
inc edi
call fcn.0040f338
call fcn.0040f338
test esi, esi
je 0x40e47f
mov dword [esp + 0x330], edi
fild dword [esp + 0x330]
fst qword [esp + 0x798]
mov dword [esp], 0
mov dword [esp + 4], 0x40000000
fstp qword [esp + 8]
call fcn.0046a279
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
fistp dword [esp + 0x790]
fldcw word [esp + 0x18]
cmp dword [esp + 0x790], 0
jle 0x40e47f
xor esi, esi
call fcn.0040f338
mov byte [esp + esi*4 + 0x34c], al
call fcn.0040f338
mov byte [esp + esi*4 + 0x34d], al
call fcn.0040f338
mov byte [esp + esi*4 + 0x34e], al
inc esi
mov dword [esp], 0
mov dword [esp + 4], 0x40000000
fld qword [esp + 0x798]
fstp qword [esp + 8]
call fcn.0046a279
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
fistp dword [esp + 0x790]
fldcw word [esp + 0x18]
cmp esi, dword [esp + 0x790]
jl 0x40e411
mov eax, dword [esp + 0x324]
cmp eax, 0x2000
jg 0x40e91f
mov eax, dword [esp + 0x338]
cmp eax, 0x2000
jg 0x40e91f
cmp dword [ebx + 0x9c], 0
jne 0x40e4d7
push 0x8000
call fcn.004696fc
pop ecx
mov dword [ebx + 0x9c], eax
xor edx, edx
jmp 0x40e4c7
mov eax, dword [ebx + 0x9c]
mov dword [eax + edx*4], 0
inc edx
cmp edx, 0x2000
jl 0x40e4c1
xor esi, esi
mov ecx, 1
xor edx, edx
xor eax, eax
xor edi, edi
mov dword [esp + 0x75c], edi
xor edi, edi
mov dword [esp + 0x74c], edi
mov dword [esp + 0x750], eax
mov dword [esp + 0x754], edx
mov dword [esp + 0x758], ecx
mov dword [esp + 0x768], esi
mov dword [esp + 0x764], ebx
call fcn.0040f338
movzx eax, al
cmp eax, 0x2c
je 0x40ee5c
cmp eax, 0x3b
je 0x40ee52
cmp eax, 0x21
je 0x40ee0f
xor edx, edx
cmp edx, 2
je 0x40edc4
cmp edx, 3
je 0x40ed9c
cmp edx, 4
je 0x40ed47
cmp edx, 5
je 0x40ed04
cmp edx, 6
je 0x40e971
cmp edx, 1
jne 0x40eeb2
call fcn.0040f29c
mov ebx, eax
call fcn.0040f29c
mov dword [esp + 0x780], eax
call fcn.0040f29c
mov dword [esp + 0x788], eax
call fcn.0040f29c
mov edi, eax
call fcn.0040f338
movzx eax, al
mov ecx, eax
and ecx, 0x80
mov edx, eax
and edx, 0x40
mov dword [esp + 0x76c], edx
and eax, 7
inc eax
test ecx, ecx
je 0x40e688
mov dword [esp + 0x330], eax
fild dword [esp + 0x330]
fst qword [esp + 0x798]
mov dword [esp], 0
mov dword [esp + 4], 0x40000000
fstp qword [esp + 8]
call fcn.0046a279
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
fistp dword [esp + 0x790]
fldcw word [esp + 0x18]
cmp dword [esp + 0x790], 0
jle 0x40e688
xor esi, esi
call fcn.0040f338
mov byte [esp + esi*4 + 0x34c], al
call fcn.0040f338
mov byte [esp + esi*4 + 0x34d], al
call fcn.0040f338
mov byte [esp + esi*4 + 0x34e], al
inc esi
mov dword [esp], 0
mov dword [esp + 4], 0x40000000
fld qword [esp + 0x798]
fstp qword [esp + 8]
call fcn.0046a279
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
fistp dword [esp + 0x790]
fldcw word [esp + 0x18]
cmp esi, dword [esp + 0x790]
jl 0x40e61a
mov esi, dword [esp + 0x764]
mov edx, dword [esi + 0x9c]
mov ecx, dword [esp + 0x768]
lea esi, [ecx + ecx]
mov ecx, dword [edx + ecx*4]
test ecx, ecx
je 0x40e945
mov edx, dword [esp + 0x788]
imul edx, edi
add edx, 0x410
push edx
push ecx
call fcn.00469b98
add esp, 8
mov edx, dword [esp + 0x764]
mov ecx, dword [edx + 0x9c]
mov dword [ecx + esi*2], eax
mov ecx, dword [edx + 0x9c]
mov esi, dword [ecx + esi*2]
test esi, esi
je 0x40eec4
push 0x400
push esi
call dword [0x5d2480]
add esp, 8
mov dword [esi], ebx
mov ecx, dword [esp + 0x780]
mov dword [esi + 4], ecx
mov ebx, dword [esp + 0x788]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], edi
mov ecx, dword [esp + 0x74c]
mov dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x75c]
mov dword [esi + 0x14], ecx
mov ecx, dword [esp + 0x750]
mov dword [esi + 0x18], ecx
mov ecx, dword [esp + 0x754]
mov dword [esi + 0x1c], ecx
mov ecx, dword [esp + 0x758]
mov dword [esi + 0x20], ecx
xor ebx, ebx
lea ecx, [esi + 0x40]
mov dword [esp + 0x784], edi
movzx eax, byte [esp + ebx*4 + 0x34c]
mov byte [ecx], al
movzx eax, byte [esp + ebx*4 + 0x34d]
mov byte [ecx + 1], al
movzx eax, byte [esp + ebx*4 + 0x34e]
mov byte [ecx + 2], al
add ecx, 3
inc ebx
cmp ebx, 0x100
jl 0x40e74b
mov edi, dword [esp + 0x784]
mov eax, 0x6140
call fcn.0040f2e4
mov ebx, eax
call fcn.0040f338
mov dword [esp + 0x760], esi
movzx ecx, al
xor edx, edx
mov dword [ebx + 0x34], edx
mov dword [ebx + 0x38], edx
mov dword [ebx + 0x3c], edx
mov byte [ebx + 0x40], dl
mov dword [ebx + 4], ecx
mov esi, 1
shl esi, cl
mov dword [ebx + 8], esi
lea eax, [esi + 1]
mov dword [ebx + 0xc], eax
add esi, 2
mov dword [ebx + 0x10], esi
inc ecx
mov dword [ebx + 0x14], ecx
mov esi, 1
shl esi, cl
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x24], edx
mov dword [ebx + 0x1c], 0x1002
mov dword [ebx + 0x28], edx
mov dword [ebx + 0x2c], edx
lea eax, [ebx + 0x2140]
lea ecx, [ebx + 0x613c]
mov esi, dword [esp + 0x760]
mov dword [eax], 0x1002
add eax, 4
cmp ecx, eax
jae 0x40e7f1
mov dword [esp + 0x33c], 0
mov eax, 4
mov dword [esp + 0x340], eax
mov edx, 2
mov dword [esp + 0x344], edx
mov dword [esp + 0x348], 1
mov ecx, 8
mov dword [esp + 0x770], ecx
mov dword [esp + 0x774], ecx
mov dword [esp + 0x778], eax
mov dword [esp + 0x77c], edx
mov ecx, dword [esp + 0x76c]
test ecx, ecx
jne 0x40e8a6
test edi, edi
jle 0x40e905
xor eax, eax
add esi, 0x400
mov dword [esp + 0x780], ebx
mov dword [esp + 0x784], edi
mov ebx, eax
mov edi, dword [esp + 0x788]
mov eax, dword [esp + 0x780]
mov edx, esi
mov ecx, edi
call fcn.0040eed8
add esi, edi
inc ebx
mov eax, dword [esp + 0x784]
cmp ebx, eax
jl 0x40e87f
mov ebx, dword [esp + 0x780]
jmp 0x40e905
xor eax, eax
mov dword [esp + 0x780], ebx
mov ebx, eax
mov eax, edi
mov edi, dword [esp + ebx*4 + 0x33c]
cmp edi, eax
jge 0x40e8f8
mov dword [esp + 0x784], eax
mov ecx, dword [esp + 0x788]
mov eax, ecx
imul eax, edi
lea edx, [esi + eax + 0x400]
mov eax, dword [esp + 0x780]
call fcn.0040eed8
add edi, dword [esp + ebx*4 + 0x770]
mov ecx, dword [esp + 0x784]
cmp edi, ecx
jl 0x40e8c5
mov eax, ecx
inc ebx
cmp ebx, 4
jl 0x40e8b3
mov ebx, dword [esp + 0x780]
mov eax, ebx
call fcn.0040f35c
mov eax, ebx
call fcn.0040f418
inc dword [esp + 0x768]
jmp 0x40e517
mov eax, dword [esp + 0x328]
push eax
push 1
push 0x186fb
call fcn.004667b0
mov eax, 0xffffffff
add esp, 0x7c0
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x788]
imul edx, edi
add edx, 0x410
push edx
call fcn.004696fc
pop ecx
mov edx, dword [esp + 0x764]
mov ecx, dword [edx + 0x9c]
mov dword [ecx + esi*2], eax
jmp 0x40e6d4
mov ebx, dword [esp + 0x764]
mov ecx, dword [esp + 0x324]
mov dword [ebx + 0x78], ecx
mov esi, dword [esp + 0x338]
mov dword [ebx + 0x7c], esi
mov dword [esp + 0xc], esi
mov edi, dword [esp + 0x328]
mov dword [esp + 0x10], edi
mov eax, dword [ebx + 0x90]
mov edx, dword [ebx + 0x94]
call fcn.0040c668
mov dword [ebx + 0x90], eax
test eax, eax
je 0x40e33e
mov eax, dword [esp + 0x75c]
test eax, eax
je 0x40e9cc
mov byte [ebx + 0x86], 1
mov eax, dword [ebx + 0x9c]
mov edx, dword [eax]
mov dword [esp + 0x324], edx
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov esi, dword [edx + 8]
mov dword [esp + 0x768], esi
mov edi, dword [edx + 0xc]
mov esi, dword [edx + 0x14]
mov edx, dword [edx + 0x1c]
mov dword [esp + 0x758], edx
xor edx, edx
mov dword [esp + 0x74c], ecx
mov dword [esp + 0x750], esi
mov dword [esp + 0x754], edi
mov dword [esp + 0x764], ebx
mov esi, dword [esp + 0x324]
movzx ecx, byte [edx + esi + 0x40]
mov byte [esp + edx + 0x24], cl
movzx ebx, byte [edx + esi + 0x41]
mov byte [esp + edx + 0x25], bl
movzx ecx, byte [edx + esi + 0x42]
mov byte [esp + edx + 0x26], cl
add edx, 3
cmp edx, 0x300
jl 0x40ea1f
mov ecx, dword [esp + 0x74c]
mov esi, dword [esp + 0x750]
mov edi, dword [esp + 0x754]
mov ebx, dword [esp + 0x764]
mov edx, dword [ebx + 0x90]
mov dword [esp + 0x338], edx
mov edx, dword [ebx + 0x78]
mov ebx, dword [ebx + 0x7c]
test esi, esi
jne 0x40eb89
test edi, edi
jle 0x40ecb7
xor esi, esi
add edx, edx
add edx, edx
neg ecx
imul ecx, edx
imul ebx, edx
add ecx, ebx
mov ebx, edi
neg ebx
imul ebx, edx
add eax, eax
add eax, eax
mov dword [esp + 0x328], eax
mov dword [esp + 0x74c], ecx
mov dword [esp + 0x754], edi
mov eax, dword [esp + 0x768]
mov edi, eax
imul edi, esi
mov ecx, dword [esp + 0x324]
lea ecx, [ecx + edi + 0x400]
mov dword [esp + 0x76c], ecx
mov ecx, esi
imul ecx, edx
add ecx, ebx
add ecx, dword [esp + 0x74c]
add ecx, dword [esp + 0x328]
test eax, eax
jle 0x40ece0
xor eax, eax
mov dword [esp + 0x788], eax
mov dword [esp + 0x75c], edx
mov dword [esp + 0x758], ebx
mov dword [esp + 0x764], esi
mov ebx, eax
mov eax, dword [esp + 0x76c]
inc eax
mov dword [esp + 0x76c], eax
movzx eax, byte [eax - 1]
lea edi, [eax + eax]
add edi, eax
movzx eax, byte [esp + edi + 0x26]
mov esi, dword [esp + 0x338]
mov byte [ecx + esi], al
movzx edx, byte [esp + edi + 0x25]
mov byte [ecx + esi + 1], dl
movzx eax, byte [esp + edi + 0x24]
mov byte [ecx + esi + 2], al
mov byte [ecx + esi + 3], 0xff
add ecx, 4
inc ebx
mov eax, dword [esp + 0x768]
cmp ebx, eax
jl 0x40eb12
mov edx, dword [esp + 0x75c]
mov ebx, dword [esp + 0x758]
mov esi, dword [esp + 0x764]
inc esi
mov eax, dword [esp + 0x754]
cmp esi, eax
jl 0x40eab4
jmp 0x40ecb7
test edi, edi
jle 0x40ecb7
xor esi, esi
add edx, edx
add edx, edx
neg ecx
imul ecx, edx
imul ebx, edx
add ecx, ebx
mov ebx, edi
neg ebx
imul ebx, edx
add eax, eax
add eax, eax
mov dword [esp + 0x328], eax
mov dword [esp + 0x750], ebx
mov dword [esp + 0x754], edi
mov ebx, dword [esp + 0x768]
mov edi, ebx
imul edi, esi
mov eax, dword [esp + 0x324]
lea eax, [eax + edi + 0x400]
mov dword [esp + 0x76c], eax
mov eax, esi
imul eax, edx
add eax, dword [esp + 0x750]
add eax, ecx
add eax, dword [esp + 0x328]
test ebx, ebx
jle 0x40ecf2
xor ebx, ebx
mov dword [esp + 0x788], ebx
mov dword [esp + 0x74c], ecx
mov dword [esp + 0x75c], edx
mov dword [esp + 0x764], esi
mov ebx, dword [esp + 0x76c]
inc ebx
mov dword [esp + 0x76c], ebx
movzx esi, byte [ebx - 1]
lea ebx, [esi + esi]
add ebx, esi
movzx edx, byte [esp + ebx + 0x26]
mov edi, dword [esp + 0x338]
mov byte [eax + edi], dl
movzx ecx, byte [esp + ebx + 0x25]
mov byte [eax + edi + 1], cl
movzx edx, byte [esp + ebx + 0x24]
mov byte [eax + edi + 2], dl
mov edx, dword [esp + 0x758]
cmp edx, esi
mov edx, 0
sete dl
mov ecx, edx
shl ecx, 8
sub ecx, edx
neg ecx
dec ecx
mov byte [eax + edi + 3], cl
add eax, 4
mov edx, dword [esp + 0x788]
inc edx
mov dword [esp + 0x788], edx
mov ecx, dword [esp + 0x768]
cmp edx, ecx
jl 0x40ec1d
mov ecx, dword [esp + 0x74c]
mov edx, dword [esp + 0x75c]
mov esi, dword [esp + 0x764]
inc esi
mov eax, dword [esp + 0x754]
cmp esi, eax
jl 0x40ebc1
mov eax, dword [0x808c0c]
test eax, eax
je 0x40ecc7
push eax
call fcn.0046995f
pop ecx
mov dword [0x808c0c], 0
xor eax, eax
add esp, 0x7b4
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
inc esi
mov eax, dword [esp + 0x754]
cmp esi, eax
jl 0x40eab4
jmp 0x40ecb7
inc esi
mov eax, dword [esp + 0x754]
cmp esi, eax
jl 0x40ebc1
jmp 0x40ecb7
call fcn.0040f338
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f338
call fcn.0040f338
call fcn.0040f338
call fcn.0040f29c
mov dword [esp + 0x758], eax
call fcn.0040f338
jmp 0x40e517
call fcn.0040f338
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f29c
call fcn.0040f338
call fcn.0040f338
call fcn.0040f338
call fcn.0040f338
call fcn.0040f338
movzx esi, al
test esi, esi
jle 0x40e517
jle 0x40ed92
xor ebx, ebx
call fcn.0040f338
inc ebx
cmp ebx, esi
jl 0x40ed88
call fcn.0040f338
jmp 0x40e517
call fcn.0040f338
movzx esi, al
test esi, esi
jle 0x40e517
jle 0x40edba
xor ebx, ebx
call fcn.0040f338
inc ebx
cmp ebx, esi
jl 0x40edb0
call fcn.0040f338
jmp 0x40e517
call fcn.0040f338
call fcn.0040f338
movzx edx, al
mov eax, edx
and eax, 0x1c
sar eax, 2
mov dword [esp + 0x74c], eax
and edx, 1
mov dword [esp + 0x75c], edx
call fcn.0040f29c
mov dword [esp + 0x750], eax
call fcn.0040f338
movzx eax, al
mov dword [esp + 0x754], eax
call fcn.0040f338
jmp 0x40e517
call fcn.0040f338
movzx eax, al
cmp eax, 0xf9
je 0x40ee4b
xor edx, edx
cmp eax, 0xfe
jne 0x40ee2c
mov edx, 3
cmp eax, 1
jne 0x40ee36
mov edx, 4
cmp eax, 0xff
jne 0x40e53c
mov edx, 5
jmp 0x40e53c
mov edx, 2
jmp 0x40ee20
mov edx, 6
jmp 0x40e53c
mov edx, 1
jmp 0x40e53c
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e6e8
jmp 0x40e337
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e768
jmp 0x40e337
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e7e0
jmp 0x40e337
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043f0d0
jmp 0x40e337
mov eax, 0xffffffff
add esp, 0x7b4
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffff
add esp, 0x7b4
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret