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

Disassembly:
push edi
push ebp
push ebx
sub esp, 0x38
mov ebp, ecx
mov ebx, edx
mov edi, eax
movsx eax, byte [edi + 8]
cmp eax, 1
je 0x40feec
cmp eax, 2
je 0x40fede
cmp eax, 3
je 0x40fed0
cmp eax, 4
je 0x40fec2
mov eax, 0xfffffffe
movsx eax, al
test eax, eax
je 0x40fb94
mov eax, 1
add esp, 0x38
pop ebx
pop ebp
pop edi
ret
mov eax, dword [edi + 4]
mov dword [0x808c00], eax
xor edi, edi
push edi
push edi
push edi
push 0x80f4d8
call fcn.004b2b24
add esp, 0x10
mov dword [esp + 0x30], eax
test eax, eax
je 0x40fe90
push eax
call fcn.004b4524
pop ecx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40fe4d
mov dword [0x808184], 0
push 0x429aac
push dword [0x808c00]
push dword [esp + 0x38]
call fcn.004b4b70
push dword [esp + 0x38]
push dword [esp + 0x40]
call fcn.004b37e8
lea ecx, [esp + 0x48]
lea edx, [esp + 0x3c]
lea edi, [esp + 0x38]
xor eax, eax
push eax
push eax
push eax
push edi
push edx
push ecx
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x5c]
push dword [esp + 0x64]
call fcn.004b4c50
add esp, 0x38
mov eax, dword [esp + 0x20]
cmp eax, 0x2000
ja 0x40fe34
mov eax, dword [esp + 0x34]
cmp eax, 0x2000
ja 0x40fe34
mov eax, dword [esp + 0x24]
cmp eax, 3
je 0x40fc6b
test eax, eax
jne 0x40fc55
mov eax, dword [esp + 0x28]
cmp eax, 8
jl 0x40fc6b
push 0x10
push dword [esp + 0x30]
push dword [esp + 0x38]
call fcn.004b4c04
add esp, 0xc
test eax, eax
je 0x40fc75
push dword [esp + 0x30]
call fcn.004b4e1c
pop ecx
mov eax, dword [esp + 0x28]
cmp eax, 0x10
je 0x40fe25
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40fc96
push dword [esp + 0x30]
call fcn.004b4e34
pop ecx
jmp 0x40fc9b
cmp eax, 4
je 0x40fc8a
push dword [esp + 0x30]
call fcn.004ba334
pop ecx
mov eax, dword [esp + 0x24]
cmp eax, 4
je 0x40fe1e
cmp eax, 6
je 0x40fcd1
push 1
push 0xff
push dword [esp + 0x38]
call fcn.004ba368
add esp, 0xc
mov edi, 1
jmp 0x40fcd3
xor edi, edi
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x30]
push dword [esp + 0x38]
call fcn.004b4c20
add esp, 0xc
test eax, eax
je 0x40fd14
push dword [esp + 0x18]
push dword [esp + 0x18]
push 0x40019999
push 0xa0000000
push dword [esp + 0x40]
call fcn.004b4dc0
add esp, 0x14
push dword [esp + 0x2c]
push dword [esp + 0x34]
call fcn.004b4390
add esp, 8
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x78], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x7c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebp
mov eax, dword [ebx + 0x90]
mov edx, dword [ebx + 0x94]
mov ecx, dword [esp + 0x20]
call fcn.0040c668
mov dword [ebx + 0x90], eax
test eax, eax
je 0x40fdd0
test edi, edi
jne 0x40fd6a
mov byte [ebx + 0x86], 1
jmp 0x40fd71
mov byte [ebx + 0x86], 0
push dword [esp + 0x30]
call fcn.004ba344
pop ecx
mov edi, eax
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [ebp + 0xd0], ecx
test edi, edi
jle 0x40fdd0
xor ebp, ebp
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x1c], esi
inc ebp
test ecx, ecx
jbe 0x40fdc8
xor esi, esi
mov ecx, dword [ebx + 0x78]
add ecx, ecx
add ecx, ecx
imul ecx, esi
add ecx, dword [ebx + 0x90]
push 0
push ecx
push dword [esp + 0x38]
call fcn.004b2e0c
add esp, 0xc
inc esi
mov ecx, dword [esp + 0x34]
cmp esi, ecx
jb 0x40fda0
cmp ebp, edi
jl 0x40fd99
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x30]
lea eax, [esp + 0x2c]
push 0
push eax
push edx
call fcn.004b33bc
add esp, 0xc
mov eax, dword [0x808c00]
test eax, eax
je 0x40fdf4
push eax
call fcn.0046995f
pop ecx
mov dword [0x808c00], 0
movsx eax, byte [0x808730]
test eax, eax
je 0x40fe15
mov eax, 1
add esp, 0x38
pop ebx
pop ebp
pop edi
ret
xor eax, eax
add esp, 0x38
pop ebx
pop ebp
pop edi
ret
xor edi, edi
jmp 0x40fcd3
push dword [esp + 0x30]
call fcn.004b4dac
pop ecx
jmp 0x40fc82
push ebp
push 1
push 0x186fb
call fcn.004667b0
mov eax, 1
add esp, 0x44
pop ebx
pop ebp
pop edi
ret
lea edx, [esp + 0x30]
xor eax, eax
push eax
push eax
push edx
call fcn.004b33bc
add esp, 0xc
mov eax, dword [0x808c00]
test eax, eax
je 0x40fe6e
push eax
call fcn.0046995f
pop ecx
mov dword [0x808c00], 0
push 1
push 0x18768
call fcn.0046683c
mov eax, 1
add esp, 0x40
pop ebx
pop ebp
pop edi
ret
mov eax, dword [0x808c00]
test eax, eax
je 0x40fea0
push eax
call fcn.0046995f
pop ecx
mov dword [0x808c00], 0
push 1
push 0x18768
call fcn.0046683c
mov eax, 1
add esp, 0x40
pop ebx
pop ebp
pop edi
ret
mov eax, edi
mov edx, ebp
call fcn.0043e6e8
jmp 0x40fb81
mov eax, edi
mov edx, ebp
call fcn.0043e768
jmp 0x40fb81
mov eax, edi
mov edx, ebp
call fcn.0043e7e0
jmp 0x40fb81
mov eax, edi
mov edx, ebp
call fcn.0043f0d0
jmp 0x40fb81