Function at 0x40fb5c
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 0x40ff00
cmp eax, 2
je 0x40fef2
cmp eax, 3
je 0x40fee4
cmp eax, 4
je 0x40fed6
mov eax, 0xfffffffe
movsx eax, al
test eax, eax
je 0x40fba8
mov eax, 1
add esp, 0x38
pop ebx
pop ebp
pop edi
ret
mov eax, dword [edi + 4]
mov dword [0x801ce0], eax
xor edi, edi
push edi
push edi
push edi
push 0x808328
call fcn.004b0b84
add esp, 0x10
mov dword [esp + 0x30], eax
test eax, eax
je 0x40fea4
push eax
call fcn.004b2584
pop ecx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40fe61
mov dword [0x801284], 0
push 0x429348
push dword [0x801ce0]
push dword [esp + 0x38]
call fcn.004b2bd0
push dword [esp + 0x38]
push dword [esp + 0x40]
call fcn.004b1848
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.004b2cb0
add esp, 0x38
mov eax, dword [esp + 0x20]
cmp eax, 0x2000
ja 0x40fe48
mov eax, dword [esp + 0x34]
cmp eax, 0x2000
ja 0x40fe48
mov eax, dword [esp + 0x24]
cmp eax, 3
je 0x40fc7f
test eax, eax
jne 0x40fc69
mov eax, dword [esp + 0x28]
cmp eax, 8
jl 0x40fc7f
push 0x10
push dword [esp + 0x30]
push dword [esp + 0x38]
call fcn.004b2c64
add esp, 0xc
test eax, eax
je 0x40fc89
push dword [esp + 0x30]
call fcn.004b2e7c
pop ecx
mov eax, dword [esp + 0x28]
cmp eax, 0x10
je 0x40fe39
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40fcaa
push dword [esp + 0x30]
call fcn.004b2e94
pop ecx
jmp 0x40fcaf
cmp eax, 4
je 0x40fc9e
push dword [esp + 0x30]
call fcn.004b8394
pop ecx
mov eax, dword [esp + 0x24]
cmp eax, 4
je 0x40fe32
cmp eax, 6
je 0x40fce5
push 1
push 0xff
push dword [esp + 0x38]
call fcn.004b83c8
add esp, 0xc
mov edi, 1
jmp 0x40fce7
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.004b2c80
add esp, 0xc
test eax, eax
je 0x40fd28
push dword [esp + 0x18]
push dword [esp + 0x18]
push 0x40019999
push 0xa0000000
push dword [esp + 0x40]
call fcn.004b2e20
add esp, 0x14
push dword [esp + 0x2c]
push dword [esp + 0x34]
call fcn.004b23f0
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.0040c67c
mov dword [ebx + 0x90], eax
test eax, eax
je 0x40fde4
test edi, edi
jne 0x40fd7e
mov byte [ebx + 0x86], 1
jmp 0x40fd85
mov byte [ebx + 0x86], 0
push dword [esp + 0x30]
call fcn.004b83a4
pop ecx
mov edi, eax
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [ebp + 0xd0], ecx
test edi, edi
jle 0x40fde4
xor ebp, ebp
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x1c], esi
inc ebp
test ecx, ecx
jbe 0x40fddc
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.004b0e6c
add esp, 0xc
inc esi
mov ecx, dword [esp + 0x34]
cmp esi, ecx
jb 0x40fdb4
cmp ebp, edi
jl 0x40fdad
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x30]
lea eax, [esp + 0x2c]
push 0
push eax
push edx
call fcn.004b141c
add esp, 0xc
mov eax, dword [0x801ce0]
test eax, eax
je 0x40fe08
push eax
call fcn.004679cf
pop ecx
mov dword [0x801ce0], 0
movsx eax, byte [0x8017fc]
test eax, eax
je 0x40fe29
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 0x40fce7
push dword [esp + 0x30]
call fcn.004b2e0c
pop ecx
jmp 0x40fc96
push ebp
push 1
push 0x186fb
call fcn.00464828
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.004b141c
add esp, 0xc
mov eax, dword [0x801ce0]
test eax, eax
je 0x40fe82
push eax
call fcn.004679cf
pop ecx
mov dword [0x801ce0], 0
push 1
push 0x18768
call fcn.004648b4
mov eax, 1
add esp, 0x40
pop ebx
pop ebp
pop edi
ret
mov eax, dword [0x801ce0]
test eax, eax
je 0x40feb4
push eax
call fcn.004679cf
pop ecx
mov dword [0x801ce0], 0
push 1
push 0x18768
call fcn.004648b4
mov eax, 1
add esp, 0x40
pop ebx
pop ebp
pop edi
ret
mov eax, edi
mov edx, ebp
call fcn.0043df80
jmp 0x40fb95
mov eax, edi
mov edx, ebp
call fcn.0043e000
jmp 0x40fb95
mov eax, edi
mov edx, ebp
call fcn.0043e078
jmp 0x40fb95
mov eax, edi
mov edx, ebp
call fcn.0043e968
jmp 0x40fb95