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

Disassembly:
mov ecx, dword [0x9ec7ac]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x51cc0a
sub esp, 0x48
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
mov ecx, dword [esp + 0x60]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x64]
mov dword [esp + 8], edx
call fcn.0051e090
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x51cbe5
mov eax, dword [esp + 0xc]
mov dword [esp + 0x2c], eax
mov dword [esp], eax
mov ecx, dword [esp + 0x5c]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x60]
mov dword [esp + 8], edx
movzx ebx, byte [esp + 0x68]
mov byte [esp + 0xc], bl
call fcn.0051e2f0
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x51cb9f
nop
mov eax, dword [esp + 0x60]
cmp eax, 2
je 0x51c8e6
cmp eax, 3
setne cl
jmp 0x51c8e8
xor ecx, ecx
mov byte [esp + 0x2b], cl
lea eax, [0x714ac0]
mov dword [esp], eax
call fcn.0040c5b0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x10], ecx
mov ecx, dword [esp + 0x60]
cmp ecx, 1
sete dl
mov byte [eax + 0x12d], dl
movzx edx, byte [esp + 0x2b]
mov byte [eax + 0x12e], dl
mov edx, dword [esp + 0x5c]
mov dword [eax + 0x134], edx
mov dword [eax + 0x138], ecx
mov edx, dword [esp + 0x58]
mov dword [eax + 0x144], edx
mov edx, dword [0x9eca70]
test edx, edx
jne 0x51c94a
mov edx, dword [esp + 0x54]
jmp 0x51c95e
call fcn.00468460
mov edx, dword [esp + 0x54]
mov dword [edi], edx
mov ebx, dword [eax + 0x140]
mov dword [edi + 4], ebx
mov dword [esp + 0x30], eax
mov dword [eax + 0x140], edx
mov edx, dword [esp + 0x6c]
test edx, edx
je 0x51caf5
mov ebx, dword [esp + 0x74]
test ebx, ebx
jne 0x51caf9
cmp ecx, 1
je 0x51c997
cmp ecx, 2
je 0x51ca5b
cmp ecx, 5
jne 0x51caf9
lea eax, [0x9ecac0]
mov dword [esp], eax
lea eax, [0x758d58]
mov dword [esp + 4], eax
call fcn.004721b0
mov eax, dword [0x9ecacc]
mov ecx, dword [esp + 0x30]
mov dword [esp], ecx
mov edx, dword [esp + 0x4c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x6c]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x18], eax
call fcn.0051d5e0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x51ca36
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x3c], ecx
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.0050f100
mov dword [esp + 0x80], 0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x88], eax
add esp, 0x48
ret
mov eax, dword [esp + 0x30]
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
add esp, 0x48
ret
mov dword [esp], eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x14], ecx
call fcn.0051dab0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x51cad0
mov eax, dword [esp + 0x18]
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.0050f100
mov dword [esp + 0x80], 0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x88], eax
add esp, 0x48
ret
mov eax, dword [esp + 0x30]
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
add esp, 0x48
ret
mov ebx, dword [esp + 0x74]
mov dword [esp], eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x1c], ecx
call fcn.0051cc20
mov eax, dword [esp + 0x20]
test eax, eax
je 0x51cb7a
mov eax, dword [esp + 0x20]
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x34], ecx
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.0050f100
mov dword [esp + 0x80], 0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x88], eax
add esp, 0x48
ret
mov eax, dword [esp + 0x30]
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
add esp, 0x48
ret
mov edx, dword [0x9a3874]
mov eax, dword [edx]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x44], ecx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x40], ebx
mov ebp, dword [esp + 0x2c]
mov dword [esp], ebp
call eax
mov dword [esp + 0x80], 0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x88], eax
add esp, 0x48
ret
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], ecx
add esp, 0x48
ret
call fcn.00467050
jmp fcn.0051c860