Function at 0x40e348
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 0x40eef7
cmp ecx, 2
je 0x40eee4
cmp ecx, 3
je 0x40eed1
cmp ecx, 4
je 0x40eebe
mov eax, 0xfffffffe
movsx ecx, al
test ecx, ecx
je 0x40e3a8
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 [0x800e44], ecx
mov dword [0x800e48], 0
mov eax, dword [esi]
mov dword [0x800e4c], eax
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f2f4
mov dword [esp + 0x324], eax
call fcn.0040f2f4
mov dword [esp + 0x338], eax
call fcn.0040f390
movzx edi, al
mov esi, edi
and esi, 0x80
and edi, 7
inc edi
call fcn.0040f390
call fcn.0040f390
test esi, esi
je 0x40e4d7
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.00467959
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 0x40e4d7
xor esi, esi
call fcn.0040f390
mov byte [esp + esi*4 + 0x34c], al
call fcn.0040f390
mov byte [esp + esi*4 + 0x34d], al
call fcn.0040f390
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.00467959
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 0x40e469
mov eax, dword [esp + 0x324]
cmp eax, 0x2000
jg 0x40e977
mov eax, dword [esp + 0x338]
cmp eax, 0x2000
jg 0x40e977
cmp dword [ebx + 0x9c], 0
jne 0x40e52f
push 0x8000
call fcn.00466ddc
pop ecx
mov dword [ebx + 0x9c], eax
xor edx, edx
jmp 0x40e51f
mov eax, dword [ebx + 0x9c]
mov dword [eax + edx*4], 0
inc edx
cmp edx, 0x2000
jl 0x40e519
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.0040f390
movzx eax, al
cmp eax, 0x2c
je 0x40eeb4
cmp eax, 0x3b
je 0x40eeaa
cmp eax, 0x21
je 0x40ee67
xor edx, edx
cmp edx, 2
je 0x40ee1c
cmp edx, 3
je 0x40edf4
cmp edx, 4
je 0x40ed9f
cmp edx, 5
je 0x40ed5c
cmp edx, 6
je 0x40e9c9
cmp edx, 1
jne 0x40ef0a
call fcn.0040f2f4
mov ebx, eax
call fcn.0040f2f4
mov dword [esp + 0x780], eax
call fcn.0040f2f4
mov dword [esp + 0x788], eax
call fcn.0040f2f4
mov edi, eax
call fcn.0040f390
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 0x40e6e0
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.00467959
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 0x40e6e0
xor esi, esi
call fcn.0040f390
mov byte [esp + esi*4 + 0x34c], al
call fcn.0040f390
mov byte [esp + esi*4 + 0x34d], al
call fcn.0040f390
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.00467959
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 0x40e672
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 0x40e99d
mov edx, dword [esp + 0x788]
imul edx, edi
add edx, 0x410
push edx
push ecx
call fcn.00467278
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 0x40ef1c
push 0x400
push esi
call dword [0x5cf480]
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 0x40e7a3
mov edi, dword [esp + 0x784]
mov eax, 0x6140
call fcn.0040f33c
mov ebx, eax
call fcn.0040f390
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 0x40e849
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 0x40e8fe
test edi, edi
jle 0x40e95d
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.0040ef30
add esi, edi
inc ebx
mov eax, dword [esp + 0x784]
cmp ebx, eax
jl 0x40e8d7
mov ebx, dword [esp + 0x780]
jmp 0x40e95d
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 0x40e950
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.0040ef30
add edi, dword [esp + ebx*4 + 0x770]
mov ecx, dword [esp + 0x784]
cmp edi, ecx
jl 0x40e91d
mov eax, ecx
inc ebx
cmp ebx, 4
jl 0x40e90b
mov ebx, dword [esp + 0x780]
mov eax, ebx
call fcn.0040f3b4
mov eax, ebx
call fcn.0040f470
inc dword [esp + 0x768]
jmp 0x40e56f
mov eax, dword [esp + 0x328]
push eax
push 1
push 0x186fb
call fcn.00463e98
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.00466ddc
pop ecx
mov edx, dword [esp + 0x764]
mov ecx, dword [edx + 0x9c]
mov dword [ecx + esi*2], eax
jmp 0x40e72c
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.0040c6c0
mov dword [ebx + 0x90], eax
test eax, eax
je 0x40e396
mov eax, dword [esp + 0x75c]
test eax, eax
je 0x40ea24
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 0x40ea77
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 0x40ebe1
test edi, edi
jle 0x40ed0f
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 0x40ed38
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 0x40eb6a
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 0x40eb0c
jmp 0x40ed0f
test edi, edi
jle 0x40ed0f
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 0x40ed4a
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 0x40ec75
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 0x40ec19
mov eax, dword [0x800e44]
test eax, eax
je 0x40ed1f
push eax
call fcn.0046703f
pop ecx
mov dword [0x800e44], 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 0x40eb0c
jmp 0x40ed0f
inc esi
mov eax, dword [esp + 0x754]
cmp esi, eax
jl 0x40ec19
jmp 0x40ed0f
call fcn.0040f390
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f390
call fcn.0040f390
call fcn.0040f390
call fcn.0040f2f4
mov dword [esp + 0x758], eax
call fcn.0040f390
jmp 0x40e56f
call fcn.0040f390
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f2f4
call fcn.0040f390
call fcn.0040f390
call fcn.0040f390
call fcn.0040f390
call fcn.0040f390
movzx esi, al
test esi, esi
jle 0x40e56f
jle 0x40edea
xor ebx, ebx
call fcn.0040f390
inc ebx
cmp ebx, esi
jl 0x40ede0
call fcn.0040f390
jmp 0x40e56f
call fcn.0040f390
movzx esi, al
test esi, esi
jle 0x40e56f
jle 0x40ee12
xor ebx, ebx
call fcn.0040f390
inc ebx
cmp ebx, esi
jl 0x40ee08
call fcn.0040f390
jmp 0x40e56f
call fcn.0040f390
call fcn.0040f390
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.0040f2f4
mov dword [esp + 0x750], eax
call fcn.0040f390
movzx eax, al
mov dword [esp + 0x754], eax
call fcn.0040f390
jmp 0x40e56f
call fcn.0040f390
movzx eax, al
cmp eax, 0xf9
je 0x40eea3
xor edx, edx
cmp eax, 0xfe
jne 0x40ee84
mov edx, 3
cmp eax, 1
jne 0x40ee8e
mov edx, 4
cmp eax, 0xff
jne 0x40e594
mov edx, 5
jmp 0x40e594
mov edx, 2
jmp 0x40ee78
mov edx, 6
jmp 0x40e594
mov edx, 1
jmp 0x40e594
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e198
jmp 0x40e38f
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e218
jmp 0x40e38f
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e290
jmp 0x40e38f
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043eb80
jmp 0x40e38f
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