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

Disassembly:
sub esp, 0x88
push ebx
push ebp
push esi
push edi
or edi, 0xffffffff
mov esi, ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov ebp, edi
call fcn.004c5590
mov ecx, esi
mov dword [esp + 0x1c], eax
mov ebx, edx
call fcn.004c57a0
cmp ebx, edx
jg 0x51f8f3
jl 0x51f630
cmp dword [esp + 0x1c], eax
jae 0x51f8f3
nop
mov eax, dword [esi + 0xa0]
cmp eax, 1
je 0x51f796
cmp eax, 3
je 0x51f796
cmp eax, 2
jne 0x51f74b
push 1
lea eax, [esp + 0x48]
push eax
mov ecx, esi
call fcn.00574070
test al, al
je 0x51f85e
mov ecx, esi
call fcn.004c5590
mov edi, eax
sub edi, 4
mov ebp, edx
sbb ebp, 0
test byte [esp + 0x48], 8
je 0x51f733
test byte [esp + 0x45], 2
je 0x51f733
mov eax, dword [esp + 0x46]
and eax, 0x1fff
cmp ax, 0x10
jb 0x51f733
cmp ax, 0x1fff
jae 0x51f733
xor eax, eax
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov word [esp + 0x80], ax
call fcn.00572170
test al, al
je 0x51f733
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x5c]
push eax
mov ecx, esi
call fcn.00572610
test al, al
je 0x51f733
test byte [esp + 0x5a], 4
je 0x51f733
mov ecx, esi
call fcn.004c5590
mov edx, dword [esp + 0x18]
mov ecx, edi
sub ecx, eax
add ecx, dword [esp + 0x4b]
mov eax, dword [esp + 0x46]
push ecx
push edx
and eax, 0x1fff
push eax
mov ecx, esi
call fcn.0051ebe0
cmp eax, dword [esp + 0x9c]
je 0x51f888
mov eax, dword [esp + 0x53]
mov ecx, dword [esp + 0x4f]
mov edx, dword [esi]
mov edx, dword [edx + 8]
push eax
push ecx
mov ecx, esi
call edx
jmp 0x51f85e
cmp eax, 4
jne 0x51f85e
push 1
lea eax, [esp + 0x84]
push eax
mov ecx, esi
call fcn.005745f0
test al, al
je 0x51f85e
test byte [esp + 0x85], 8
je 0x51f85e
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
jmp 0x51f8aa
push 0
push 0x10000
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
call fcn.00572170
test al, al
je 0x51f8aa
mov ecx, esi
call fcn.004c5590
mov ecx, dword [esp + 0x18]
mov edi, eax
mov ebp, edx
sub edi, 4
sbb ebp, 0
mov dl, cl
add dl, 0x43
cmp dl, 0x32
ja 0x51f85e
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov word [esp + 0x40], ax
push ecx
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.00572610
test al, al
je 0x51f85e
cmp word [esp + 0x24], 0
je 0x51f85e
mov ecx, esi
call fcn.004c5590
test byte [esp + 0x26], 4
mov ebx, eax
mov dword [esp + 0x94], edx
je 0x51f844
movzx ecx, word [esp + 0x24]
mov edx, dword [esp + 0x18]
push ecx
push edx
push 0
mov ecx, esi
call fcn.0051ebe0
cmp eax, dword [esp + 0x9c]
je 0x51f89a
movzx eax, word [esp + 0x24]
cdq
add eax, ebx
adc edx, dword [esp + 0x94]
mov ecx, esi
push edx
push eax
mov eax, dword [esi]
mov eax, dword [eax + 8]
call eax
mov ecx, esi
call fcn.004c5590
mov ecx, esi
mov dword [esp + 0x78], eax
mov ebx, edx
call fcn.004c57a0
cmp ebx, edx
jl 0x51f630
jg 0x51f8aa
cmp dword [esp + 0x78], eax
jb 0x51f630
jmp 0x51f8aa
mov ecx, dword [esp + 0x5b]
mov edx, dword [esp + 0x5f]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
jmp 0x51f8aa
mov edx, dword [esp + 0x27]
mov eax, dword [esp + 0x2b]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
test ebp, ebp
jl 0x51f8bf
jg 0x51f8b4
test edi, edi
jb 0x51f8bf
mov edx, dword [esi]
mov eax, dword [edx + 8]
push ebp
push edi
mov ecx, esi
call eax
mov edx, dword [esp + 0x14]
test edx, edx
jl 0x51f8f7
jg 0x51f8d0
cmp dword [esp + 0x10], 0
jb 0x51f8f7
mov ecx, dword [esi + 0xa8]
mov eax, dword [esi + 0xac]
sub dword [esp + 0x10], ecx
pop edi
pop esi
pop ebp
sbb edx, eax
mov eax, dword [esp + 4]
pop ebx
add esp, 0x88
ret 4
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x88
ret 4