Function at 0x40e304
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 0x40eeb3
cmp ecx, 2
je 0x40eea0
cmp ecx, 3
je 0x40ee8d
cmp ecx, 4
je 0x40ee7a
mov eax, 0xfffffffe
movsx ecx, al
test ecx, ecx
je 0x40e364
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 [0x801cec], ecx
mov dword [0x801cf0], 0
mov eax, dword [esi]
mov dword [0x801cf4], eax
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f2b0
mov dword [esp + 0x324], eax
call fcn.0040f2b0
mov dword [esp + 0x338], eax
call fcn.0040f34c
movzx edi, al
mov esi, edi
and esi, 0x80
and edi, 7
inc edi
call fcn.0040f34c
call fcn.0040f34c
test esi, esi
je 0x40e493
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.00468219
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 0x40e493
xor esi, esi
call fcn.0040f34c
mov byte [esp + esi*4 + 0x34c], al
call fcn.0040f34c
mov byte [esp + esi*4 + 0x34d], al
call fcn.0040f34c
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.00468219
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 0x40e425
mov eax, dword [esp + 0x324]
cmp eax, 0x2000
jg 0x40e933
mov eax, dword [esp + 0x338]
cmp eax, 0x2000
jg 0x40e933
cmp dword [ebx + 0x9c], 0
jne 0x40e4eb
push 0x8000
call fcn.0046769c
pop ecx
mov dword [ebx + 0x9c], eax
xor edx, edx
jmp 0x40e4db
mov eax, dword [ebx + 0x9c]
mov dword [eax + edx*4], 0
inc edx
cmp edx, 0x2000
jl 0x40e4d5
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.0040f34c
movzx eax, al
cmp eax, 0x2c
je 0x40ee70
cmp eax, 0x3b
je 0x40ee66
cmp eax, 0x21
je 0x40ee23
xor edx, edx
cmp edx, 2
je 0x40edd8
cmp edx, 3
je 0x40edb0
cmp edx, 4
je 0x40ed5b
cmp edx, 5
je 0x40ed18
cmp edx, 6
je 0x40e985
cmp edx, 1
jne 0x40eec6
call fcn.0040f2b0
mov ebx, eax
call fcn.0040f2b0
mov dword [esp + 0x780], eax
call fcn.0040f2b0
mov dword [esp + 0x788], eax
call fcn.0040f2b0
mov edi, eax
call fcn.0040f34c
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 0x40e69c
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.00468219
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 0x40e69c
xor esi, esi
call fcn.0040f34c
mov byte [esp + esi*4 + 0x34c], al
call fcn.0040f34c
mov byte [esp + esi*4 + 0x34d], al
call fcn.0040f34c
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.00468219
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 0x40e62e
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 0x40e959
mov edx, dword [esp + 0x788]
imul edx, edi
add edx, 0x410
push edx
push ecx
call fcn.00467b38
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 0x40eed8
push 0x400
push esi
call dword [0x5d0480]
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 0x40e75f
mov edi, dword [esp + 0x784]
mov eax, 0x6140
call fcn.0040f2f8
mov ebx, eax
call fcn.0040f34c
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 0x40e805
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 0x40e8ba
test edi, edi
jle 0x40e919
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.0040eeec
add esi, edi
inc ebx
mov eax, dword [esp + 0x784]
cmp ebx, eax
jl 0x40e893
mov ebx, dword [esp + 0x780]
jmp 0x40e919
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 0x40e90c
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.0040eeec
add edi, dword [esp + ebx*4 + 0x770]
mov ecx, dword [esp + 0x784]
cmp edi, ecx
jl 0x40e8d9
mov eax, ecx
inc ebx
cmp ebx, 4
jl 0x40e8c7
mov ebx, dword [esp + 0x780]
mov eax, ebx
call fcn.0040f370
mov eax, ebx
call fcn.0040f42c
inc dword [esp + 0x768]
jmp 0x40e52b
mov eax, dword [esp + 0x328]
push eax
push 1
push 0x186fb
call fcn.00464754
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.0046769c
pop ecx
mov edx, dword [esp + 0x764]
mov ecx, dword [edx + 0x9c]
mov dword [ecx + esi*2], eax
jmp 0x40e6e8
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.0040c67c
mov dword [ebx + 0x90], eax
test eax, eax
je 0x40e352
mov eax, dword [esp + 0x75c]
test eax, eax
je 0x40e9e0
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 0x40ea33
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 0x40eb9d
test edi, edi
jle 0x40eccb
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 0x40ecf4
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 0x40eb26
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 0x40eac8
jmp 0x40eccb
test edi, edi
jle 0x40eccb
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 0x40ed06
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 0x40ec31
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 0x40ebd5
mov eax, dword [0x801cec]
test eax, eax
je 0x40ecdb
push eax
call fcn.004678ff
pop ecx
mov dword [0x801cec], 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 0x40eac8
jmp 0x40eccb
inc esi
mov eax, dword [esp + 0x754]
cmp esi, eax
jl 0x40ebd5
jmp 0x40eccb
call fcn.0040f34c
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f34c
call fcn.0040f34c
call fcn.0040f34c
call fcn.0040f2b0
mov dword [esp + 0x758], eax
call fcn.0040f34c
jmp 0x40e52b
call fcn.0040f34c
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f2b0
call fcn.0040f34c
call fcn.0040f34c
call fcn.0040f34c
call fcn.0040f34c
call fcn.0040f34c
movzx esi, al
test esi, esi
jle 0x40e52b
jle 0x40eda6
xor ebx, ebx
call fcn.0040f34c
inc ebx
cmp ebx, esi
jl 0x40ed9c
call fcn.0040f34c
jmp 0x40e52b
call fcn.0040f34c
movzx esi, al
test esi, esi
jle 0x40e52b
jle 0x40edce
xor ebx, ebx
call fcn.0040f34c
inc ebx
cmp ebx, esi
jl 0x40edc4
call fcn.0040f34c
jmp 0x40e52b
call fcn.0040f34c
call fcn.0040f34c
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.0040f2b0
mov dword [esp + 0x750], eax
call fcn.0040f34c
movzx eax, al
mov dword [esp + 0x754], eax
call fcn.0040f34c
jmp 0x40e52b
call fcn.0040f34c
movzx eax, al
cmp eax, 0xf9
je 0x40ee5f
xor edx, edx
cmp eax, 0xfe
jne 0x40ee40
mov edx, 3
cmp eax, 1
jne 0x40ee4a
mov edx, 4
cmp eax, 0xff
jne 0x40e550
mov edx, 5
jmp 0x40e550
mov edx, 2
jmp 0x40ee34
mov edx, 6
jmp 0x40e550
mov edx, 1
jmp 0x40e550
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043df88
jmp 0x40e34b
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e008
jmp 0x40e34b
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e080
jmp 0x40e34b
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e970
jmp 0x40e34b
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