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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x5c2b80]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
mov esi, ecx
push edi
movsx edi, word [esi + 0x4c]
mov eax, dword [esi]
mov dword [esp + 0xc], eax
mov dword [esp + 0x24], edi
mov ecx, dword [esi + edi*4 + 0x78]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
mov ax, word [esi + edi*2 + 0x4e]
cmp ax, word [ecx + 0x12]
jae 0x49766e
cmp byte [esi + 0x49], 1
jne 0x49766e
movzx edx, ax
mov eax, dword [ecx + 0x40]
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
movzx ebx, byte [eax + edx*2]
movzx eax, byte [eax + edx*2 + 1]
shl ebx, 8
or ebx, eax
movzx eax, word [ecx + 0x14]
and ebx, eax
add ebx, dword [ecx + 0x38]
cmp byte [ecx + 5], 0
jne 0x4974a4
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0
push eax
push esi
call fcn.00493d70
add esp, 8
test eax, eax
jne 0x497673
mov edx, dword [esi + 0x3c]
mov ecx, dword [esp + 0x14]
push esi
call fcn.0048f2b0
add esp, 4
test eax, eax
jne 0x497673
cmp dword [esi + 0x10], eax
jne 0x4974f0
mov eax, dword [esp + 0xc]
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x4974f0
test byte [eax + 0x48], 0x10
je 0x4974e9
cmp dword [eax + 0x18], ecx
jne 0x4974e9
cmp dword [eax + 0x1c], edx
jne 0x4974e9
mov byte [eax + 0x49], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x4974d5
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x44]
mov ecx, dword [edx + 0x10]
mov eax, dword [ecx + 0x94]
cmp eax, dword [ecx + 0x98]
mov ecx, edx
jbe 0x497511
call fcn.0048b240
jmp 0x497516
call fcn.0048b090
test eax, eax
jne 0x497673
lea eax, [esp + 0xc]
mov edx, ebx
mov ebx, dword [esp + 0x10]
mov ecx, ebx
push eax
call fcn.004949e0
mov edx, dword [esp + 0x1c]
add esp, 4
mov dword [esp + 0x28], eax
mov ecx, ebx
lea eax, [esp + 0x28]
push eax
movzx eax, word [esp + 0x10]
push eax
call fcn.00494f60
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
jne 0x497673
cmp byte [ebx + 5], al
jne 0x49760b
movsx eax, word [esi + 0x4c]
mov ebx, dword [esi + eax*4 + 0x78]
mov eax, dword [esi + edi*4 + 0x7c]
mov dword [esp + 0xc], ebx
movzx ecx, word [ebx + 0x12]
mov eax, dword [eax + 0x48]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x40]
movzx edx, byte [eax + ecx*2 - 2]
movzx eax, byte [eax + ecx*2 - 1]
mov ecx, ebx
shl edx, 8
or edx, eax
movzx eax, word [ebx + 0x14]
and edx, eax
add edx, dword [ebx + 0x38]
mov dword [esp + 0x20], edx
call fcn.0048f930
mov ecx, dword [esp + 0xc]
movzx ebx, ax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + 0x44]
mov edi, dword [eax + 0x50]
call fcn.0048b4f0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x20]
lea eax, [ebx + 4]
push edi
push eax
mov eax, dword [esp + 0x30]
add eax, 0xfffffffc
push eax
call fcn.00495090
add esp, 0x14
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x10]
mov ecx, eax
push ebx
movzx edx, word [eax + 0x12]
dec edx
call fcn.00494f60
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
jne 0x497673
mov edi, dword [esp + 0x24]
mov ecx, esi
call fcn.00496ff0
mov ebx, eax
test ebx, ebx
jne 0x49765a
movsx ecx, word [esi + 0x4c]
cmp ecx, edi
jle 0x497653
movzx ecx, word [esi + 0x4c]
movsx eax, cx
mov edx, dword [esi + eax*4 + 0x78]
lea eax, [ecx - 1]
mov word [esi + 0x4c], ax
test edx, edx
je 0x49763e
mov ecx, dword [edx + 0x44]
call fcn.0048ae10
movsx eax, word [esi + 0x4c]
cmp eax, edi
jg 0x497620
mov ecx, esi
call fcn.00496ff0
mov ebx, eax
test ebx, ebx
jne 0x49765a
mov ecx, esi
call fcn.004932f0
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.0052ab62
mov esp, ebp
pop ebp
ret
mov eax, 1
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0052ab62
mov esp, ebp
pop ebp
ret