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

Disassembly:
mov ecx, dword [0x78bd58]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x50547b
sub esp, 0x5c
mov eax, 0
mov dword [esp + 0x58], eax
mov byte [esp + 0x23], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
mov eax, dword [esp + 0x70]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x60]
mov dword [esp], eax
mov ecx, dword [esp + 0x64]
mov dword [esp + 4], ecx
call fcn.004edea0
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x5052ec
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov eax, dword [eax + 0x10]
mov dword [esp], ecx
call eax
movzx eax, byte [esp + 4]
test al, al
je 0x5052e8
nop
mov eax, dword [esp + 0x60]
mov dword [esp], eax
mov ecx, dword [esp + 0x64]
mov dword [esp + 4], ecx
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
call fcn.004ebf20
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x5052e4
mov eax, dword [esp + 0x10]
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
lea ecx, [0x505490]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x58], ecx
mov byte [esp + 0x23], 1
mov dword [esp], eax
mov dword [esp + 4], 0xffffffff
call fcn.004e85a0
mov eax, dword [esp + 8]
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x10]
nop
nop
lea ebx, [0x621df0]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
call fcn.0048a410
xor eax, eax
jmp 0x5052f7
add esp, 0x5c
ret
add esp, 0x5c
ret
add esp, 0x5c
ret
mov ecx, dword [esp + 0x30]
lea eax, [ecx + 1]
mov ecx, dword [esp + 0x28]
cmp eax, ecx
jge 0x505461
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x38]
lea edx, [ecx + eax*8]
mov ebx, dword [edx]
mov dword [esp + 0x3c], ebx
mov edx, dword [edx + 4]
mov dword [esp + 0x2c], edx
mov ebp, dword [esp + 0x68]
mov dword [esp], ebp
mov esi, dword [esp + 0x6c]
mov dword [esp + 4], esi
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edx
call fcn.00504540
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x50543e
movzx eax, byte [esp + 0x10]
test al, al
je 0x5052f0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov eax, dword [esp + 0x64]
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x40], ecx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x48], edx
lea edx, [esp + 0x40]
mov dword [esp], edx
mov dword [esp + 4], 2
mov dword [esp + 8], 2
call fcn.005069f0
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x80]
inc ecx
mov edx, dword [esp + 0x7c]
mov ebx, dword [esp + 0xc]
mov ebp, dword [esp + 0x10]
cmp eax, ecx
jae 0x505410
mov dword [esp + 0x24], ebp
mov dword [esp + 0x34], ebx
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
lea eax, [0x5b1e40]
mov dword [esp + 0x10], eax
call fcn.004544e0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x84], eax
mov dword [esp + 0x7c], edx
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x80], ecx
lea eax, [edx + ecx*8 - 4]
mov dword [eax], ebp
mov eax, dword [0x78be40]
lea ecx, [edx + ecx*8 - 8]
test eax, eax
je 0x505437
call fcn.0046fef0
mov dword [edi], ebx
mov eax, dword [ecx]
mov dword [edi + 4], eax
mov dword [ecx], ebx
jmp 0x5052f0
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
mov byte [esp + 0x23], 0
mov edx, dword [esp + 0x58]
mov eax, dword [edx]
call eax
add esp, 0x5c
ret
mov byte [esp + 0x23], 0
mov edx, dword [esp + 0x58]
mov eax, dword [edx]
call eax
add esp, 0x5c
ret
call fcn.0046eae0
jmp fcn.00505190