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

Disassembly:
sub esp, 0x24
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x1c], edi
or esi, 0xffffffff
call fcn.00480140
mov ecx, eax
mov eax, dword [ebx + 0x100]
mov dword [esp + 0x18], ecx
cmp eax, 2
je 0x48038d
cmp eax, 3
je 0x48038d
cmp dword [ebx + 0xf8], 2
mov dword [esp + 0x10], edi
jne 0x480395
mov dword [esp + 0x10], 1
xor eax, eax
mov dword [esp + 0x14], eax
test ecx, ecx
jle 0x480444
push ebp
push eax
mov ecx, ebx
call fcn.00480150
mov edi, eax
mov eax, dword [edi]
mov edx, dword [eax + 0x78]
push 0
mov ecx, edi
call edx
test eax, eax
je 0x480495
mov eax, dword [edi]
mov edx, dword [eax + 0x128]
mov ecx, edi
call edx
test eax, eax
je 0x480495
cmp dword [ebx + 0x16c], 0
mov edx, dword [edi + 0xc0]
mov ecx, dword [edi + 0xc4]
mov eax, dword [edi + 0xcc]
mov ebp, dword [edi + 0xc8]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], eax
jne 0x480477
cmp dword [edi + 0x94], 0
je 0x4804b4
or esi, 0xffffffff
cmp dword [esp + 0x14], 0
jne 0x480427
mov eax, dword [esp + 0x3c]
cmp ecx, dword [eax + 4]
jg 0x480437
jmp 0x4805b3
mov ebx, dword [esp + 0x3c]
cmp ebp, dword [ebx]
jge 0x4804b8
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x20]
pop ebp
test edi, edi
jne 0x4806d2
mov ecx, dword [ebx + 0x20]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [0x560644]
mov edx, dword [ebx]
mov eax, dword [edx + 0x194]
mov ecx, ebx
call eax
test eax, eax
je 0x48068b
mov ecx, dword [esp + 0x3c]
push ecx
call dword [0x56063c]
jmp 0x4806bc
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x3c]
jne 0x4804aa
mov ebx, dword [ebx + 4]
cmp ebx, ecx
jl 0x480491
cmp ebx, eax
jle 0x48058f
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
inc eax
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
jl 0x4803a4
jmp 0x480437
mov ebx, dword [ebx]
cmp ebx, edx
jl 0x480491
cmp ebx, ebp
jg 0x480491
mov ebx, dword [esp + 0x3c]
cmp dword [esp + 0x14], 0
je 0x48058f
cmp esi, 0xffffffff
je 0x4804e3
add eax, ecx
cdq
sub eax, edx
sar eax, 1
sub eax, dword [ebx + 4]
cdq
xor eax, edx
sub eax, edx
cmp esi, eax
jle 0x480676
mov eax, dword [esp + 0x30]
mov ebx, dword [ebx + 4]
add eax, ecx
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
mov eax, ecx
sub eax, ebx
cdq
mov esi, eax
xor esi, edx
xor eax, eax
sub esi, edx
cmp ecx, ebx
mov ecx, dword [esp + 0x48]
setl al
mov dword [esp + 0x20], edi
mov dword [ecx], eax
test eax, eax
je 0x480576
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
dec edx
cmp eax, edx
jge 0x48055d
mov ecx, dword [esp + 0x10]
inc eax
push eax
call fcn.00480150
cmp dword [eax + 0x98], 0
jne 0x48055d
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
lea ecx, [eax + 6]
push ecx
mov ecx, dword [esp + 0x44]
push ebp
push eax
push edx
call fcn.004392a0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [edx + 0x14c], ecx
mov ebx, edx
jmp 0x480495
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x40]
push eax
push ebp
add eax, 0xfffffffa
push eax
mov eax, dword [esp + 0x30]
push eax
push ecx
jmp 0x480670
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x40]
lea edx, [eax + 6]
push edx
push ebp
push eax
mov eax, dword [esp + 0x30]
push eax
push ecx
jmp 0x480670
cmp esi, 0xffffffff
je 0x4805b3
lea eax, [edx + ebp]
cdq
sub eax, edx
mov edx, dword [esp + 0x3c]
sar eax, 1
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
cmp esi, eax
jle 0x480676
mov edx, dword [esp + 0x24]
lea eax, [edx + ebp]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x3c]
mov ebx, dword [eax]
sar ecx, 1
mov eax, ecx
sub eax, ebx
cdq
mov esi, eax
xor esi, edx
xor eax, eax
sub esi, edx
cmp ecx, ebx
mov ecx, dword [esp + 0x48]
setl al
mov dword [esp + 0x20], edi
mov dword [ecx], eax
test eax, eax
je 0x480658
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
dec edx
cmp eax, edx
jge 0x480642
mov ecx, dword [esp + 0x10]
lea edi, [eax + 1]
push edi
call fcn.00480150
cmp dword [eax + 0x98], 0
jne 0x480642
push edi
call fcn.00480150
cmp dword [eax + 0x94], 0
jne 0x480642
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
push eax
lea ecx, [ebp + 6]
push ecx
mov ecx, dword [esp + 0x48]
push edx
push ebp
call fcn.004392a0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [edx + 0x14c], ecx
mov ebx, edx
jmp 0x480495
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x40]
push eax
push ebp
push ecx
add ebp, 0xfffffffa
push ebp
push edx
jmp 0x480670
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
lea ecx, [eax + 6]
push ecx
push edx
push eax
mov eax, dword [esp + 0x50]
push eax
call dword [0x5605d0]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [edx + 0x14c], ecx
mov ebx, edx
jmp 0x480495
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
add edx, 0xfffffffe
push edx
mov edx, dword [esp + 0x28]
lea ecx, [eax + 8]
push ecx
add edx, 2
push edx
add eax, 2
push eax
mov eax, dword [esp + 0x4c]
push eax
call dword [0x5605d0]
mov ecx, dword [esp + 0x44]
mov dword [ecx], 1
mov edx, dword [esp + 0x40]
mov dword [edx], 0xffffffff
mov dword [ebx + 0x14c], 0
jmp 0x4806de
mov eax, dword [edi + 0x80]
mov ecx, dword [esp + 0x40]
mov dword [ecx], eax
cmp dword [esp + 0x34], edi
pop edi
pop esi
pop ebx
jne 0x4806f2
mov edx, dword [esp + 0x30]
push edx
call dword [0x56063c]
add esp, 0x24
ret 0x14