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

Disassembly:
push 0xffffffffffffffff
push 0x5953c0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x5e173c]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e173c]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x4c]
xorps xmm0, xmm0
movq qword [esp + 0x28], xmm0
mov dword [esp + 0x30], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x44], 0
movq qword [esp + 0x1c], xmm0
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov byte [esp + 0x44], 1
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.00509980
push dword [esp + 0x18]
mov edx, dword [ebp + 4]
push ecx
mov ecx, dword [ebp]
call fcn.0040d3f0
mov eax, dword [ebp]
add esp, 8
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
sub ecx, ebx
mov dword [ebp + 4], eax
mov eax, 0x81848da9
imul ecx
add edx, ecx
sar edx, 9
mov edi, edx
shr edi, 0x1f
add edi, edx
je 0x509d31
lea esi, [ebx + 0x78]
lea esp, [esp]
push esi
mov ecx, ebp
call fcn.0040be40
add esi, 0x3f4
dec edi
jne 0x509d20
mov ecx, dword [esp + 0x20]
mov eax, 0x92492493
mov esi, dword [esp + 0x1c]
sub ecx, esi
imul ecx
add edx, ecx
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
je 0x509d61
add esi, 0x18
push esi
mov ecx, ebp
call fcn.0040be40
add esi, 0x38
dec edi
jne 0x509d53
mov ecx, dword [ebp]
mov esi, dword [ebp + 4]
cmp ecx, esi
je 0x509eeb
mov edx, esi
mov byte [esp + 0x18], 0
push dword [esp + 0x18]
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, esi
push eax
call fcn.0050b780
mov edx, dword [ebp + 4]
mov ecx, dword [ebp]
mov byte [esp + 0x20], 0
push dword [esp + 0x20]
call fcn.0050b8c0
mov ecx, eax
add esp, 0xc
sub ecx, dword [ebp]
mov eax, 0x2aaaaaab
imul ecx
mov ecx, ebp
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
call fcn.0050a570
mov esi, dword [ebp]
cmp esi, dword [ebp + 4]
je 0x509eeb
jmp 0x509de0
mov ebx, dword [esi + 0x10]
test ebx, ebx
je 0x509e8c
cmp dword [esi + 0x14], 8
jb 0x509df5
mov ecx, dword [esi]
jmp 0x509df7
mov ecx, esi
mov edi, 0xc
cmp ebx, edi
cmovb edi, ebx
test edi, edi
je 0x509e21
mov edx, str.000000000000
lea ebx, [ebx]
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x509e31
add ecx, 2
add edx, 2
dec edi
jne 0x509e10
xor eax, eax
test eax, eax
jne 0x509e49
cmp ebx, 0xc
jae 0x509e3f
or eax, 0xffffffff
jmp 0x509e47
movzx eax, word [ecx]
cmp ax, word [edx]
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x509e23
xor eax, eax
cmp ebx, 0xc
setne al
test eax, eax
sete al
test al, al
jne 0x509e8c
xor edi, edi
test ebx, ebx
je 0x509e87
cmp dword [esi + 0x14], 8
jb 0x509e60
mov eax, dword [esi]
jmp 0x509e62
mov eax, esi
movzx eax, word [eax + edi*2]
push eax
call fcn.00568bcc
add esp, 4
movzx ecx, ax
cmp dword [esi + 0x14], 8
jb 0x509e7c
mov eax, dword [esi]
jmp 0x509e7e
mov eax, esi
mov word [eax + edi*2], cx
inc edi
cmp edi, ebx
jb 0x509e56
add esi, 0x18
jmp 0x509ede
push dword [esp + 0x18]
mov edx, dword [ebp + 4]
lea ecx, [esi + 0x18]
push esi
call fcn.00506aa0
mov ebx, dword [ebp + 4]
add esp, 8
lea edi, [ebx - 0x18]
cmp edi, ebx
je 0x509eda
lea esp, [esp]
cmp dword [edi + 0x14], 8
jb 0x509ec0
push dword [edi]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
add edi, 0x18
cmp edi, ebx
jne 0x509eb0
add dword [ebp + 4], 0xffffffe8
cmp esi, dword [ebp + 4]
jne 0x509de0
mov ebx, dword [esp + 0x28]
mov byte [esp + 0x44], 0
mov ebp, dword [esp + 0x1c]
test ebp, ebp
je 0x509f29
push dword [esp + 0x18]
mov edx, dword [esp + 0x24]
push ecx
mov ecx, ebp
call fcn.0050b290
push ebp
call fcn.00564de3
add esp, 0xc
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x44], 0xffffffff
test ebx, ebx
je 0x509f72
mov ebp, dword [esp + 0x2c]
mov esi, ebx
cmp ebx, ebp
je 0x509f51
nop
mov ecx, esi
call fcn.00510160
add esi, 0x3f4
cmp esi, ebp
jne 0x509f40
push ebx
call fcn.00564de3
add esp, 4
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00564de8
add esp, 0x34
ret 4