Function at 0x40f694
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 0x410243
cmp ecx, 2
je 0x410230
cmp ecx, 3
je 0x41021d
cmp ecx, 4
je 0x41020a
mov eax, 0xfffffffe
movsx ecx, al
test ecx, ecx
je 0x40f6f4
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 [0x809b38], ecx
mov dword [0x809b3c], 0
mov eax, dword [esi]
mov dword [0x809b40], eax
call fcn.00410640
call fcn.00410640
call fcn.00410640
call fcn.00410640
mov dword [esp + 0x324], eax
call fcn.00410640
mov dword [esp + 0x338], eax
call fcn.004106dc
movzx edi, al
mov esi, edi
and esi, 0x80
and edi, 7
inc edi
call fcn.004106dc
call fcn.004106dc
test esi, esi
je 0x40f823
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.0046bae9
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 0x40f823
xor esi, esi
call fcn.004106dc
mov byte [esp + esi*4 + 0x34c], al
call fcn.004106dc
mov byte [esp + esi*4 + 0x34d], al
call fcn.004106dc
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.0046bae9
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 0x40f7b5
mov eax, dword [esp + 0x324]
cmp eax, 0x2000
jg 0x40fcc3
mov eax, dword [esp + 0x338]
cmp eax, 0x2000
jg 0x40fcc3
cmp dword [ebx + 0x9c], 0
jne 0x40f87b
push 0x8000
call fcn.0046adec
pop ecx
mov dword [ebx + 0x9c], eax
xor edx, edx
jmp 0x40f86b
mov eax, dword [ebx + 0x9c]
mov dword [eax + edx*4], 0
inc edx
cmp edx, 0x2000
jl 0x40f865
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.004106dc
movzx eax, al
cmp eax, 0x2c
je 0x410200
cmp eax, 0x3b
je 0x4101f6
cmp eax, 0x21
je 0x4101b3
xor edx, edx
cmp edx, 2
je 0x410168
cmp edx, 3
je 0x410140
cmp edx, 4
je 0x4100eb
cmp edx, 5
je 0x4100a8
cmp edx, 6
je 0x40fd15
cmp edx, 1
jne 0x410256
call fcn.00410640
mov ebx, eax
call fcn.00410640
mov dword [esp + 0x780], eax
call fcn.00410640
mov dword [esp + 0x788], eax
call fcn.00410640
mov edi, eax
call fcn.004106dc
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 0x40fa2c
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.0046bae9
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 0x40fa2c
xor esi, esi
call fcn.004106dc
mov byte [esp + esi*4 + 0x34c], al
call fcn.004106dc
mov byte [esp + esi*4 + 0x34d], al
call fcn.004106dc
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.0046bae9
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 0x40f9be
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 0x40fce9
mov edx, dword [esp + 0x788]
imul edx, edi
add edx, 0x410
push edx
push ecx
call fcn.0046b288
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 0x410268
push 0x400
push esi
call dword [0x5d3480]
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 0x40faef
mov edi, dword [esp + 0x784]
mov eax, 0x6140
call fcn.00410688
mov ebx, eax
call fcn.004106dc
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 0x40fb95
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 0x40fc4a
test edi, edi
jle 0x40fca9
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.0041027c
add esi, edi
inc ebx
mov eax, dword [esp + 0x784]
cmp ebx, eax
jl 0x40fc23
mov ebx, dword [esp + 0x780]
jmp 0x40fca9
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 0x40fc9c
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.0041027c
add edi, dword [esp + ebx*4 + 0x770]
mov ecx, dword [esp + 0x784]
cmp edi, ecx
jl 0x40fc69
mov eax, ecx
inc ebx
cmp ebx, 4
jl 0x40fc57
mov ebx, dword [esp + 0x780]
mov eax, ebx
call fcn.00410700
mov eax, ebx
call fcn.004107bc
inc dword [esp + 0x768]
jmp 0x40f8bb
mov eax, dword [esp + 0x328]
push eax
push 1
push 0x186fb
call fcn.00467e44
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.0046adec
pop ecx
mov edx, dword [esp + 0x764]
mov ecx, dword [edx + 0x9c]
mov dword [ecx + esi*2], eax
jmp 0x40fa78
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 0x40f6e2
mov eax, dword [esp + 0x75c]
test eax, eax
je 0x40fd70
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 0x40fdc3
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 0x40ff2d
test edi, edi
jle 0x41005b
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 0x410084
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 0x40feb6
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 0x40fe58
jmp 0x41005b
test edi, edi
jle 0x41005b
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 0x410096
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 0x40ffc1
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 0x40ff65
mov eax, dword [0x809b38]
test eax, eax
je 0x41006b
push eax
call fcn.0046b04f
pop ecx
mov dword [0x809b38], 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 0x40fe58
jmp 0x41005b
inc esi
mov eax, dword [esp + 0x754]
cmp esi, eax
jl 0x40ff65
jmp 0x41005b
call fcn.004106dc
call fcn.00410640
call fcn.00410640
call fcn.00410640
call fcn.00410640
call fcn.00410640
call fcn.004106dc
call fcn.004106dc
call fcn.004106dc
call fcn.00410640
mov dword [esp + 0x758], eax
call fcn.004106dc
jmp 0x40f8bb
call fcn.004106dc
call fcn.00410640
call fcn.00410640
call fcn.00410640
call fcn.00410640
call fcn.004106dc
call fcn.004106dc
call fcn.004106dc
call fcn.004106dc
call fcn.004106dc
movzx esi, al
test esi, esi
jle 0x40f8bb
jle 0x410136
xor ebx, ebx
call fcn.004106dc
inc ebx
cmp ebx, esi
jl 0x41012c
call fcn.004106dc
jmp 0x40f8bb
call fcn.004106dc
movzx esi, al
test esi, esi
jle 0x40f8bb
jle 0x41015e
xor ebx, ebx
call fcn.004106dc
inc ebx
cmp ebx, esi
jl 0x410154
call fcn.004106dc
jmp 0x40f8bb
call fcn.004106dc
call fcn.004106dc
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.00410640
mov dword [esp + 0x750], eax
call fcn.004106dc
movzx eax, al
mov dword [esp + 0x754], eax
call fcn.004106dc
jmp 0x40f8bb
call fcn.004106dc
movzx eax, al
cmp eax, 0xf9
je 0x4101ef
xor edx, edx
cmp eax, 0xfe
jne 0x4101d0
mov edx, 3
cmp eax, 1
jne 0x4101da
mov edx, 4
cmp eax, 0xff
jne 0x40f8e0
mov edx, 5
jmp 0x40f8e0
mov edx, 2
jmp 0x4101c4
mov edx, 6
jmp 0x40f8e0
mov edx, 1
jmp 0x40f8e0
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043e99c
jmp 0x40f6db
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043ea1c
jmp 0x40f6db
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043ea94
jmp 0x40f6db
mov eax, esi
mov edx, dword [esp + 0x328]
call fcn.0043f394
jmp 0x40f6db
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