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

Disassembly:
mov ecx, dword [0x8c8600]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 0x20]
cmp eax, dword [ecx + 8]
jbe 0x505cba
sub esp, 0xa0
mov eax, 0
mov dword [esp + 0x9c], eax
mov byte [esp + 0x33], 0
mov byte [esp + 0xb8], 0
mov eax, dword [esp + 0xa4]
test byte [eax], al
mov dword [esp], eax
call fcn.0048f630
lea eax, [0x505cd0]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x98], eax
lea ecx, [esp + 0x94]
mov dword [esp + 0x9c], ecx
mov byte [esp + 0x33], 1
call fcn.004bc310
lea edi, [esp + 0x3c]
lea esi, [esp]
call fcn.004778be
movzx eax, byte [esp + 0xb4]
test al, al
je 0x5059b7
xor eax, eax
jmp 0x505a29
mov eax, dword [esp + 0xa4]
lea ecx, [eax + 0x18]
mov dword [esp + 0x7c], ecx
lea edi, [esp]
lea esi, [esp + 0x3c]
call fcn.004778be
mov dword [esp + 0x14], 0x7b8a800
mov dword [esp + 0x18], 0xfffffff2
call fcn.004b6af0
lea edi, [esp + 0x50]
lea esi, [esp + 0x1c]
call fcn.004778be
lea edi, [esp + 0x80]
mov esi, dword [esp + 0x7c]
call fcn.004778be
lea edi, [esp]
lea esi, [esp + 0x80]
call fcn.004778be
lea edi, [esp + 0x14]
lea esi, [esp + 0x50]
call fcn.004778be
call fcn.004b5b10
movzx eax, byte [esp + 0x28]
test al, al
jne 0x505b72
mov eax, dword [0x8c88d8]
mov ecx, dword [esp + 0xa4]
lea edi, [ecx + 0x18]
test eax, eax
je 0x505a6e
mov dword [esp + 0x7c], edi
lea eax, [0x6ff700]
mov dword [esp], eax
mov dword [esp + 4], edi
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
call fcn.004120e0
mov ecx, dword [esp + 0xa4]
mov edi, dword [esp + 0x7c]
lea esi, [esp + 0x3c]
call fcn.004778be
mov eax, dword [esp + 0xac]
test eax, eax
je 0x505a8d
mov ecx, eax
mov eax, dword [esp + 0xa8]
jmp 0x505aad
mov dword [esp], 0
call fcn.00506280
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x505b53
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x78], eax
lea edx, [0x6c2fe0]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], 0
call fcn.0046c4a0
mov eax, dword [0x8c88d8]
mov ecx, dword [esp + 0xc]
test eax, eax
jne 0x505ae6
mov eax, dword [esp + 0xa4]
jmp 0x505afa
call fcn.004772f0
mov dword [edi], ecx
mov eax, dword [esp + 0xa4]
mov edx, dword [eax + 0x2c]
mov dword [edi + 4], edx
mov dword [eax + 0x2c], ecx
lea ecx, [0x6c37e0]
mov dword [esp], ecx
mov edx, dword [esp + 0x38]
mov dword [esp + 4], edx
mov dword [esp + 8], 0
call fcn.0046c4a0
mov eax, dword [0x8c88d8]
mov ecx, dword [esp + 0xc]
test eax, eax
jne 0x505b32
mov eax, dword [esp + 0xa4]
jmp 0x505b46
call fcn.004772f0
mov dword [edi], ecx
mov eax, dword [esp + 0xa4]
mov ebx, dword [eax + 0x30]
mov dword [edi + 4], ebx
mov dword [eax + 0x30], ecx
mov ebx, dword [esp + 0x78]
mov ecx, dword [esp + 0x38]
jmp 0x505ba6
mov byte [esp + 0xb8], 0
mov byte [esp + 0x33], 0
mov edx, dword [esp + 0x9c]
mov eax, dword [edx]
call eax
add esp, 0xa0
ret
mov byte [esp + 0xb8], 0
mov byte [esp + 0x33], 0
mov edx, dword [esp + 0x9c]
mov eax, dword [edx]
call eax
add esp, 0xa0
ret
mov ebp, dword [esp + 0x74]
lea ebx, [ebp + 0x20]
mov ebp, dword [esp + 0x38]
lea ecx, [ebp - 1]
mov eax, dword [esp + 0xa4]
test ecx, ecx
jle 0x505c8f
mov dword [esp + 0x38], ecx
mov dword [esp + 0x74], ebx
lea edi, [esp + 0x50]
mov esi, ebx
call fcn.004778a0
mov ecx, dword [eax + 0x2c]
mov edx, dword [esp + 0x58]
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x50]
mov dword [esp + 0x34], esi
lea ebx, [0x6c2fe0]
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebp
call fcn.0046f120
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
mov dword [eax], ecx
mov eax, dword [esp + 0xa4]
mov ecx, dword [eax + 0x30]
mov edx, dword [esp + 0x50]
lea ebx, [0x6c37e0]
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.0046dbd0
movzx eax, byte [esp + 0x10]
test al, al
jne 0x505b91
mov eax, dword [esp + 0xa4]
mov ecx, dword [eax + 0x30]
mov edx, dword [esp + 0x50]
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x34], ebx
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x70], ebp
lea esi, [0x6c37e0]
mov dword [esp], esi
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.0046de00
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x34]
mov dword [eax + 4], ecx
mov ecx, dword [0x8c88d8]
test ecx, ecx
jne 0x505c78
mov ecx, dword [esp + 0x70]
jmp 0x505c88
call fcn.004772f0
mov ecx, dword [esp + 0x70]
mov dword [edi], ecx
mov ebx, dword [eax]
mov dword [edi + 4], ebx
mov dword [eax], ecx
jmp 0x505b91
mov byte [esp + 0xb8], 1
mov byte [esp + 0x33], 0
mov edx, dword [esp + 0x9c]
mov eax, dword [edx]
call eax
add esp, 0xa0
ret
call fcn.00475ee0
jmp fcn.00505920