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

Disassembly:
sub esp, 0x18
push ebp
push esi
mov esi, dword [ebx + 0x50]
test esi, esi
push edi
je 0x49870f
cmp dword [esi + 0x58], 0
je 0x49870f
mov eax, dword [ebx + 4]
xor ebp, ebp
cmp eax, dword [ebx + 8]
je 0x49870f
call fcn.004698f0
cmp eax, 1
jne 0x49870f
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x4984dc
add eax, 0x168
call fcn.00488e80
mov esi, eax
jmp 0x4984de
xor esi, esi
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x4984f7
cmp dword [ebx + 8], 2
jne 0x4984f7
lea eax, [esi + 1]
cdq
sub eax, edx
sar eax, 1
mov ebp, esi
sub ebp, eax
cmp ecx, 2
jne 0x49850e
cmp dword [ebx + 8], 0
jne 0x49850e
lea eax, [esi + 1]
cdq
sub eax, edx
mov ebp, eax
sar ebp, 1
sub ebp, esi
test ebp, ebp
je 0x49870f
cmp dword [ebx + 0x4c], 0
je 0x4986ba
xor edi, edi
mov esi, dword [ebx + 0x4c]
mov ecx, dword [esi + 0x80]
test ecx, ecx
jne 0x498533
xor eax, eax
jmp 0x49853e
mov eax, dword [esi + 0x84]
sub eax, ecx
sar eax, 2
cmp edi, eax
jge 0x49869c
test ecx, ecx
je 0x498559
mov eax, dword [esi + 0x84]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x49855e
call fcn.00500ad0
mov ecx, dword [esi + 0x80]
mov edx, dword [ecx + edi*4]
cmp dword [edx + 0x2c], 0
je 0x49869c
mov esi, dword [ebx + 0x4c]
mov ecx, dword [esi + 0x80]
add esi, 0x7c
test ecx, ecx
je 0x49858d
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x498592
call fcn.00500ad0
mov eax, dword [esi + 4]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x498657
movzx eax, byte [eax]
and eax, 1
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
test eax, eax
je 0x498657
mov eax, dword [ebx + 0x4c]
cmp dword [eax + 0x90], 0
je 0x4985da
lea esi, [eax + 0x7c]
call fcn.00472050
mov edx, dword [eax]
push ebp
push 0
add edx, 0xc
push edx
call dword [0x5313ec]
mov esi, dword [ebx + 0x4c]
mov ecx, dword [esi + 0x80]
add esi, 0x7c
test ecx, ecx
je 0x4985f6
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x4985fb
call fcn.00500ad0
mov eax, dword [esi + 4]
mov ecx, dword [eax + edi*4]
push ebp
push 0
add ecx, 0x1c
push ecx
call dword [0x5313ec]
mov esi, dword [ebx + 0x4c]
mov eax, dword [esi + 0x80]
add esi, 0x7c
test eax, eax
je 0x49862a
mov ecx, dword [esi + 8]
sub ecx, eax
sar ecx, 2
cmp edi, ecx
jb 0x49862f
call fcn.00500ad0
mov edx, dword [esi + 4]
mov eax, dword [edx + edi*4]
test dword [eax], 0x3442100
je 0x498657
mov esi, dword [ebx + 0x4c]
add esi, 0x7c
call fcn.00472050
mov eax, dword [eax]
push ebp
push 0
add eax, 0x4c
push eax
call dword [0x5313ec]
mov esi, dword [ebx + 0x4c]
cmp dword [esi + 0x30], 2
jne 0x498694
mov ecx, dword [esi + 0x80]
test ecx, ecx
je 0x498679
mov eax, dword [esi + 0x84]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x49867e
call fcn.00500ad0
mov ecx, dword [esi + 0x80]
mov edx, dword [ecx + edi*4]
push ebp
push 0
add edx, 0x3c
push edx
call dword [0x5313ec]
add edi, 1
jmp 0x498522
mov eax, dword [ebx + 0x4c]
mov ecx, dword [eax + 0x3e8]
cmp dword [ecx - 0xc], 0
jne 0x4986ba
push ebp
push 0
add eax, 0x3fc
push eax
call dword [0x5313ec]
cmp dword [ebx + 0x98], 0
je 0x49870f
cmp dword [ebx + 0x78], 0
je 0x49870f
mov eax, dword [ebx + 0x6c]
mov edx, dword [ebx + 0x68]
mov ecx, dword [ebx + 0x70]
push ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
mov edx, dword [ebx + 0x74]
push 0
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
call dword [0x5313ec]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x68], ecx
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0x6c], edx
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x74], ecx
pop edi
pop esi
pop ebp
add esp, 0x18
ret