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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push 0xffffffffffffffff
push 0x5a6923
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x60f520]
xor eax, esp
mov dword [esp + 0x64], eax
push esi
push edi
mov eax, dword [0x60f520]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov dword [esp + 0x1c], edx
mov edi, ecx
mov dword [esp + 0x2c], edi
xorps xmm0, xmm0
movdqa xmmword [esp + 0x54], xmm0
psrldq xmm0, 8
movd eax, xmm0
push 8
mov dword [esp + 0x64], 0
and eax, 0xfffffe06
or eax, 6
mov dword [esp + 0x60], eax
call fcn.00551c81
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
mov dword [esp + 0x80], 0
test esi, esi
je 0x5094ab
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004e7880
mov dword [esi], eax
jmp 0x5094ad
xor esi, esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x80], 1
xor ecx, ecx
mov eax, dword [edi]
mov dword [esp + 0x20], ecx
mov esi, dword [eax]
cmp esi, eax
je 0x509643
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
jmp 0x5094e0
and dword [esp + 0x4c], 0xfffffe00
mov dword [esp + 0x50], 0
push ecx
lea ecx, [esp + 0x58]
mov byte [esp + 0x84], 3
call fcn.004e68f0
mov edi, eax
lea ecx, [esp + 0xc]
lea eax, [esp + 0x44]
mov dword [esp + 0x24], edi
push eax
call fcn.004e62d0
movsx ecx, byte [edi + 8]
mov edx, dword [esp + 0x14]
mov eax, edx
mov byte [edi + 8], dl
xor eax, ecx
mov ecx, dword [edi]
and eax, 0xff
xor edx, eax
mov eax, dword [esp + 0xc]
mov dword [edi], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], edx
mov edx, dword [edi + 4]
mov dword [edi + 4], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 8]
mov edx, ecx
mov edi, dword [esp + 0x30]
mov eax, ecx
shl edx, 0x17
xor eax, edi
sar edx, 0x1f
and eax, 0x100
xor eax, ecx
shl edx, 8
mov ecx, dword [esp + 0x24]
xor edx, edi
and edx, 0x100
xor edi, edx
mov dword [esp + 0x14], edi
mov dword [ecx + 8], eax
lea ecx, [esp + 0xc]
call fcn.004e6420
lea ecx, [esp + 0x44]
mov byte [esp + 0x80], 1
call fcn.004e6420
push dword [esp + 0x20]
lea ecx, [esp + 0x58]
call fcn.004e68f0
mov edx, dword [esp + 0x28]
mov ecx, dword [esi + 0x10]
and edx, 0xffffff02
or edx, 2
mov dword [esp + 0x40], 0
mov dword [esp + 0x28], edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x80], 4
push ecx
mov ecx, eax
call fcn.004e64d0
lea ecx, [esp + 0x34]
mov byte [esp + 0x80], 1
call fcn.004e6420
mov ecx, dword [esp + 0x20]
inc ecx
cmp byte [esi + 0xd], 0
mov dword [esp + 0x20], ecx
jne 0x509637
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x50961c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x509637
mov edi, edi
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x509610
jmp 0x509637
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x509635
cmp esi, dword [eax + 8]
jne 0x509635
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x509625
mov esi, eax
mov eax, dword [esp + 0x2c]
cmp esi, dword [eax]
jne 0x5094e0
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x10]
call fcn.004e62d0
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov eax, edx
movsx ecx, byte [edi + 8]
mov byte [edi + 8], dl
xor eax, ecx
mov ecx, dword [edi]
and eax, 0xff
xor edx, eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], edx
mov edx, dword [edi + 4]
mov esi, dword [esp + 0x1c]
mov dword [edi], eax
mov eax, dword [esp + 0x10]
mov dword [edi + 4], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 8]
mov edx, ecx
shl edx, 0x17
mov eax, ecx
sar edx, 0x1f
xor eax, esi
shl edx, 8
and eax, 0x100
xor edx, esi
xor eax, ecx
and edx, 0x100
mov dword [edi + 8], eax
xor esi, edx
lea ecx, [esp + 0xc]
mov dword [esp + 0x14], esi
call fcn.004e6420
lea ecx, [esp + 0x54]
mov dword [esp + 0x80], 0xffffffff
call fcn.004e6420
mov eax, 1
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.0055199a
mov esp, ebp
pop ebp
ret