Function at 0x509830
Capabilities:
Access peb ldr_data

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x551f35
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xa0
mov eax, dword [0x5ba200]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xac], ecx
mov esi, dword [ebx + 0xc]
mov edi, dword [ebx + 8]
mov dword [ebp - 0xa8], edi
mov dword [ebp - 0x9c], esi
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x509898
mov edx, dword [edi + 0x230]
jmp 0x5098c3
cmp eax, 0xffffffff
jne 0x5098a0
mov eax, dword [edi + 0x40]
mov edx, dword [edi + 0x3c]
test edx, edx
je 0x5098c1
cmp eax, 1
jl 0x5098c1
cmp eax, dword [edi + 0x40]
jg 0x5098c1
lea eax, [eax + eax*8]
cmp dword [edx + eax*8 + 0xc], 0
je 0x5098c1
mov edx, dword [edx + eax*8 + 4]
jmp 0x5098c3
xor edx, edx
mov eax, dword [esi + 0x44]
mov dword [ebp - 0xa4], edx
test eax, eax
jne 0x5098de
mov esi, dword [edi + 0x230]
mov dword [ebp - 0xa0], esi
jmp 0x509917
cmp eax, 0xffffffff
jne 0x5098e6
mov eax, dword [edi + 0x40]
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x50990d
cmp eax, 1
jl 0x50990d
cmp eax, dword [edi + 0x40]
jg 0x50990d
lea eax, [eax + eax*8]
cmp dword [ecx + eax*8 + 0xc], 0
je 0x50990d
mov esi, dword [ecx + eax*8 + 4]
mov dword [ebp - 0xa0], esi
jmp 0x509917
mov dword [ebp - 0xa0], 0
push 0
push 0
push 0x1004
push edx
call dword [0x553580]
test eax, eax
je 0x50995f
lea esi, [eax - 1]
test esi, esi
js 0x50995f
mov eax, dword [ebp - 0x9c]
mov ecx, edi
push esi
push dword [eax + 0x30]
call fcn.00437b60
cmp eax, 1
jne 0x50995a
mov eax, dword [ebp - 0x9c]
push ecx
push esi
mov ecx, edi
push dword [eax + 0x30]
call fcn.00437840
sub esi, 1
jns 0x509932
push 0
push 0
push 0x1004
push dword [ebp - 0xa0]
call dword [0x553580]
test eax, eax
je 0x5099ad
lea esi, [eax - 1]
test esi, esi
js 0x5099ad
nop
mov eax, dword [ebp - 0x9c]
mov ecx, edi
push esi
push dword [eax + 0x44]
call fcn.00437b60
cmp eax, 1
jne 0x5099a8
mov eax, dword [ebp - 0x9c]
push ecx
push esi
mov ecx, edi
push dword [eax + 0x44]
call fcn.00437840
sub esi, 1
jns 0x509980
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0
movq qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x24], 1
mov dword [ebp - 4], 0
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x18], 1
mov ecx, dword [ebp - 0xac]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 1
push eax
push dword [ebx + 0x10]
call fcn.00509e30
test eax, eax
je 0x509dde
mov eax, dword [ebp - 0x2c]
xorps xmm0, xmm0
movq qword [ebp - 0x4c], xmm0
movups xmmword [ebp - 0x5c], xmm0
test eax, eax
jne 0x509a40
push 2
call fcn.0053659c
add esp, 4
mov dword [ebp - 0x2c], eax
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], ecx
mov byte [ebp - 0x24], 1
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x50], 0
mov byte [ebp - 0x48], 1
push 0
push 0x5740a8
push eax
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.00405b80
mov byte [ebp - 4], 4
xorps xmm0, xmm0
mov eax, dword [ebp - 0x20]
movq qword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
test eax, eax
jne 0x509aae
push 2
call fcn.0053659c
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 0x18], 1
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x30], 1
push 0
push 0x5740a8
push eax
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 6
call fcn.00405b80
mov byte [ebp - 4], 7
xor edi, edi
mov esi, dword [ebp - 0x5c]
test esi, esi
je 0x509bb8
nop
test esi, esi
je 0x509baf
cmp edi, esi
jb 0x509b21
lea ecx, [esi - 1]
cmp esi, ecx
ja 0x509b19
lea esi, [ecx + 1]
mov dword [ebp - 0x5c], esi
mov edx, dword [ebp - 0x54]
mov ecx, dword [edx + ecx*4]
jmp 0x509b27
mov edx, dword [ebp - 0x54]
mov ecx, dword [edx + edi*4]
test ecx, ecx
je 0x509baf
xor eax, eax
cmp word [ecx], ax
je 0x509baf
inc eax
cmp word [ecx + eax*2], 0
jne 0x509b36
test eax, eax
je 0x509baf
test esi, esi
jne 0x509b4a
xor eax, eax
jmp 0x509b63
cmp edi, esi
jb 0x509b60
lea eax, [esi - 1]
cmp esi, eax
ja 0x509b5b
lea esi, [eax + 1]
mov dword [ebp - 0x5c], esi
mov eax, dword [edx + eax*4]
jmp 0x509b63
mov eax, dword [edx + edi*4]
mov dword [ebp - 0x84], eax
lea eax, [ebp - 0x98]
push eax
push 0
push 0x104d
push dword [ebp - 0xa4]
mov dword [ebp - 0x70], 1
mov dword [ebp - 0x98], 0x103
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x94], 0x2710
mov dword [ebp - 0x90], 0
call dword [0x553580]
inc edi
cmp edi, esi
jb 0x509b00
mov esi, dword [ebp - 0x44]
xor edi, edi
test esi, esi
je 0x509c82
test esi, esi
je 0x509c79
cmp edi, esi
jb 0x509be6
lea ecx, [esi - 1]
cmp esi, ecx
ja 0x509bde
lea esi, [ecx + 1]
mov dword [ebp - 0x44], esi
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx + ecx*4]
jmp 0x509bec
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx + edi*4]
test ecx, ecx
je 0x509c79
xor eax, eax
cmp word [ecx], ax
je 0x509c79
nop dword [eax + eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x509c00
test eax, eax
je 0x509c79
test esi, esi
jne 0x509c14
xor eax, eax
jmp 0x509c2d
cmp edi, esi
jb 0x509c2a
lea eax, [esi - 1]
cmp esi, eax
ja 0x509c25
lea esi, [eax + 1]
mov dword [ebp - 0x44], esi
mov eax, dword [edx + eax*4]
jmp 0x509c2d
mov eax, dword [edx + edi*4]
mov dword [ebp - 0x84], eax
lea eax, [ebp - 0x98]
push eax
push 0
push 0x104d
push dword [ebp - 0xa0]
mov dword [ebp - 0x70], 1
mov dword [ebp - 0x98], 0x103
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x94], 0x2710
mov dword [ebp - 0x90], 0
call dword [0x553580]
inc edi
cmp edi, esi
jb 0x509bc5
mov edi, dword [ebp - 0x9c]
mov esi, dword [ebp - 0xa8]
mov eax, dword [edi + 0x30]
cmp eax, 0xffffffff
jne 0x509c99
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x509cfe
cmp eax, 1
jl 0x509cfe
cmp eax, dword [esi + 0x40]
jg 0x509cfe
lea eax, [eax + eax*8]
cmp dword [ecx + eax*8 + 0xc], 0
je 0x509cfe
cmp dword [ecx + eax*8], 0xf
jne 0x509cfe
push 2
push 0xffffffffffffffff
push 0x100c
push dword [ecx + eax*8 + 4]
call dword [0x553580]
test eax, eax
js 0x509cfe
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x88], 3
push ecx
push eax
push 0x102b
push dword [ebp - 0xa4]
mov dword [ebp - 0x8c], 0
call dword [0x553580]
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
jne 0x509d09
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x509d6e
cmp eax, 1
jl 0x509d6e
cmp eax, dword [esi + 0x40]
jg 0x509d6e
lea eax, [eax + eax*8]
cmp dword [ecx + eax*8 + 0xc], 0
je 0x509d6e
cmp dword [ecx + eax*8], 0xf
jne 0x509d6e
push 2
push 0xffffffffffffffff
push 0x100c
push dword [ecx + eax*8 + 4]
call dword [0x553580]
test eax, eax
js 0x509d6e
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x88], 3
push ecx
push eax
push 0x102b
push dword [ebp - 0xa0]
mov dword [ebp - 0x8c], 0
call dword [0x553580]
push 0x40
push dword [edi + 0x34]
mov ecx, esi
call fcn.00435500
push 0x40
push dword [edi + 0x38]
mov ecx, esi
call fcn.00435500
push 0x40
push dword [edi + 0x48]
mov ecx, esi
call fcn.00435500
push 0x40
push dword [edi + 0x4c]
mov ecx, esi
call fcn.00435500
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x509dae
push eax
call fcn.00535f93
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x509dbe
push eax
call fcn.00535f93
add esp, 4
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x509dce
push eax
call fcn.00535f93
add esp, 4
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x509dde
push eax
call fcn.00535f93
add esp, 4
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x509dee
push eax
call fcn.00535f93
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x509dfe
push eax
call fcn.00535f93
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00535f85
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc