Function at 0x40fba0
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 0x40ff44
cmp eax, 2
je 0x40ff36
cmp eax, 3
je 0x40ff28
cmp eax, 4
je 0x40ff1a
mov eax, 0xfffffffe
movsx eax, al
test eax, eax
je 0x40fbec
mov eax, 1
add esp, 0x38
pop ebx
pop ebp
pop edi
ret
mov eax, dword [edi + 4]
mov dword [0x800e38], eax
xor edi, edi
push edi
push edi
push edi
push 0x807360
call fcn.004b01f4
add esp, 0x10
mov dword [esp + 0x30], eax
test eax, eax
je 0x40fee8
push eax
call fcn.004b1bf4
pop ecx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40fea5
mov dword [0x8003c4], 0
push 0x42955c
push dword [0x800e38]
push dword [esp + 0x38]
call fcn.004b2240
push dword [esp + 0x38]
push dword [esp + 0x40]
call fcn.004b0eb8
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.004b2320
add esp, 0x38
mov eax, dword [esp + 0x20]
cmp eax, 0x2000
ja 0x40fe8c
mov eax, dword [esp + 0x34]
cmp eax, 0x2000
ja 0x40fe8c
mov eax, dword [esp + 0x24]
cmp eax, 3
je 0x40fcc3
test eax, eax
jne 0x40fcad
mov eax, dword [esp + 0x28]
cmp eax, 8
jl 0x40fcc3
push 0x10
push dword [esp + 0x30]
push dword [esp + 0x38]
call fcn.004b22d4
add esp, 0xc
test eax, eax
je 0x40fccd
push dword [esp + 0x30]
call fcn.004b24ec
pop ecx
mov eax, dword [esp + 0x28]
cmp eax, 0x10
je 0x40fe7d
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40fcee
push dword [esp + 0x30]
call fcn.004b2504
pop ecx
jmp 0x40fcf3
cmp eax, 4
je 0x40fce2
push dword [esp + 0x30]
call fcn.004b7a04
pop ecx
mov eax, dword [esp + 0x24]
cmp eax, 4
je 0x40fe76
cmp eax, 6
je 0x40fd29
push 1
push 0xff
push dword [esp + 0x38]
call fcn.004b7a38
add esp, 0xc
mov edi, 1
jmp 0x40fd2b
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.004b22f0
add esp, 0xc
test eax, eax
je 0x40fd6c
push dword [esp + 0x18]
push dword [esp + 0x18]
push 0x40019999
push 0xa0000000
push dword [esp + 0x40]
call fcn.004b2490
add esp, 0x14
push dword [esp + 0x2c]
push dword [esp + 0x34]
call fcn.004b1a60
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.0040c6c0
mov dword [ebx + 0x90], eax
test eax, eax
je 0x40fe28
test edi, edi
jne 0x40fdc2
mov byte [ebx + 0x86], 1
jmp 0x40fdc9
mov byte [ebx + 0x86], 0
push dword [esp + 0x30]
call fcn.004b7a14
pop ecx
mov edi, eax
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [ebp + 0xd0], ecx
test edi, edi
jle 0x40fe28
xor ebp, ebp
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x1c], esi
inc ebp
test ecx, ecx
jbe 0x40fe20
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.004b04dc
add esp, 0xc
inc esi
mov ecx, dword [esp + 0x34]
cmp esi, ecx
jb 0x40fdf8
cmp ebp, edi
jl 0x40fdf1
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x30]
lea eax, [esp + 0x2c]
push 0
push eax
push edx
call fcn.004b0a8c
add esp, 0xc
mov eax, dword [0x800e38]
test eax, eax
je 0x40fe4c
push eax
call fcn.0046703f
pop ecx
mov dword [0x800e38], 0
movsx eax, byte [0x800964]
test eax, eax
je 0x40fe6d
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 0x40fd2b
push dword [esp + 0x30]
call fcn.004b247c
pop ecx
jmp 0x40fcda
push ebp
push 1
push 0x186fb
call fcn.00463e98
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.004b0a8c
add esp, 0xc
mov eax, dword [0x800e38]
test eax, eax
je 0x40fec6
push eax
call fcn.0046703f
pop ecx
mov dword [0x800e38], 0
push 1
push 0x18768
call fcn.00463f24
mov eax, 1
add esp, 0x40
pop ebx
pop ebp
pop edi
ret
mov eax, dword [0x800e38]
test eax, eax
je 0x40fef8
push eax
call fcn.0046703f
pop ecx
mov dword [0x800e38], 0
push 1
push 0x18768
call fcn.00463f24
mov eax, 1
add esp, 0x40
pop ebx
pop ebp
pop edi
ret
mov eax, edi
mov edx, ebp
call fcn.0043e198
jmp 0x40fbd9
mov eax, edi
mov edx, ebp
call fcn.0043e218
jmp 0x40fbd9
mov eax, edi
mov edx, ebp
call fcn.0043e290
jmp 0x40fbd9
mov eax, edi
mov edx, ebp
call fcn.0043eb80
jmp 0x40fbd9