Function at 0x509500
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x72cce8
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x83e264]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x26c], edi
xor eax, eax
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
xor ecx, ecx
mov dword [edi + 0x18], eax
mov dword [ebp - 4], eax
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 7
mov word [edi + 0x18], cx
mov dword [edi + 0x30], ecx
mov dword [edi + 0x40], ecx
mov dword [edi + 0x44], 7
mov word [edi + 0x30], cx
mov dword [edi + 0x48], ecx
mov dword [edi + 0x58], ecx
mov dword [edi + 0x5c], 0xf
mov byte [edi + 0x48], cl
mov dword [edi + 0x60], ecx
mov dword [edi + 0x70], ecx
mov dword [edi + 0x74], 7
mov word [edi + 0x60], cx
mov dword [edi + 0x78], ecx
mov dword [edi + 0x88], ecx
mov dword [edi + 0x8c], 0xf
mov byte [edi + 0x78], cl
push 0x104
push ecx
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 5
push eax
call fcn.00520480
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5095f0
sub ecx, edx
mov dword [ebp - 0x250], 0
sar ecx, 1
lea eax, [ebp - 0x218]
push ecx
push eax
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
call fcn.00481410
lea eax, [ebp - 0x250]
mov ecx, edi
push eax
call fcn.00490700
mov edx, dword [ebp - 0x23c]
cmp edx, 8
jb 0x50967e
mov ecx, dword [ebp - 0x250]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x509674
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d3e
push edx
push ecx
call fcn.0051def4
add esp, 8
cmp dword [edi + 0x14], 8
mov ebx, edi
mov eax, dword [edi + 0x10]
jb 0x50968b
mov ebx, dword [edi]
lea esi, [ebx + eax*2]
push esi
push ebx
call fcn.0049a8f0
add esp, 8
cmp eax, esi
je 0x5096e6
nop dword [eax]
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x5096ad
cmp ecx, 0x2f
jne 0x5096b6
add eax, 2
cmp eax, esi
jne 0x5096a0
jmp 0x5096e6
movzx ecx, word [esi - 2]
cmp ecx, 0x5c
je 0x5096cd
cmp ecx, 0x2f
je 0x5096cd
add esi, 0xfffffffe
cmp eax, esi
jne 0x5096b6
jmp 0x5096e6
cmp eax, esi
je 0x5096e6
movzx ecx, word [esi - 2]
cmp ecx, 0x5c
je 0x5096df
cmp ecx, 0x2f
jne 0x5096e6
add esi, 0xfffffffe
cmp eax, esi
jne 0x5096d1
sub esi, ebx
mov dword [ebp - 0x250], 0
sar esi, 1
lea ecx, [ebp - 0x250]
push esi
push ebx
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
call fcn.00481410
lea eax, [ebp - 0x250]
push eax
lea ecx, [edi + 0x18]
call fcn.00490700
mov edx, dword [ebp - 0x23c]
cmp edx, 8
jb 0x509764
mov ecx, dword [ebp - 0x250]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x50975a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d3e
push edx
push ecx
call fcn.0051def4
add esp, 8
cmp dword [edi + 0x14], 8
mov eax, edi
mov ecx, dword [edi + 0x10]
jb 0x509771
mov eax, dword [edi]
lea esi, [eax + ecx*2]
push esi
push eax
call fcn.004a6e50
add esp, 8
mov dword [ebp - 0x238], 0
sub esi, eax
mov dword [ebp - 0x228], 0
xor ecx, ecx
sar esi, 1
mov word [ebp - 0x238], cx
lea ecx, [ebp - 0x238]
push esi
push eax
mov dword [ebp - 0x224], 7
call fcn.00481410
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x268]
call fcn.00482720
lea eax, [ebp - 0x268]
push eax
lea ecx, [edi + 0x30]
call fcn.00490700
mov edx, dword [ebp - 0x254]
cmp edx, 8
jb 0x50981b
mov ecx, dword [ebp - 0x268]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x509811
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d3e
push edx
push ecx
call fcn.0051def4
add esp, 8
mov edx, dword [ebp - 0x224]
mov byte [ebp - 4], 5
cmp edx, 8
jb 0x50985f
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x509855
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d3e
push edx
push ecx
call fcn.0051def4
add esp, 8
cmp dword [edi + 0x14], 8
mov eax, edi
mov ecx, dword [edi + 0x10]
jb 0x50986c
mov eax, dword [edi]
lea esi, [eax + ecx*2]
push esi
push eax
call fcn.004a6e50
add esp, 8
mov dword [ebp - 0x238], 0
sub esi, eax
mov dword [ebp - 0x228], 0
xor ecx, ecx
sar esi, 1
mov word [ebp - 0x238], cx
lea ecx, [ebp - 0x238]
push esi
push eax
mov dword [ebp - 0x224], 7
call fcn.00481410
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x21d]
push ecx
push dword [ebp - 0x228]
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 7
cmovae eax, dword [ebp - 0x238]
push eax
call fcn.0051bc33
push eax
lea eax, [ebp - 0x250]
push eax
call fcn.0049b070
add esp, 0x14
lea eax, [ebp - 0x250]
lea ecx, [edi + 0x48]
push eax
call fcn.00490ed0
mov edx, dword [ebp - 0x23c]
cmp edx, 0x10
jb 0x509935
mov ecx, dword [ebp - 0x250]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x50992b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d43
push edx
push ecx
call fcn.0051def4
add esp, 8
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0xf
mov byte [ebp - 0x250], 0
mov byte [ebp - 4], 5
cmp edx, 8
jb 0x509994
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x50998a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d43
push edx
push ecx
call fcn.0051def4
add esp, 8
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5099a0
sub ecx, edx
mov dword [ebp - 0x250], 0
xor eax, eax
sar ecx, 1
mov word [ebp - 0x250], ax
lea eax, [ebp - 0x218]
push ecx
push eax
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
call fcn.00481410
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 8
call fcn.00509fd0
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x509a03
mov eax, dword [eax]
lea esi, [eax + ecx*2]
push esi
push eax
call fcn.004a6e50
add esp, 8
mov dword [ebp - 0x238], 0
sub esi, eax
mov dword [ebp - 0x228], 0
xor ecx, ecx
sar esi, 1
mov word [ebp - 0x238], cx
lea ecx, [ebp - 0x238]
push esi
push eax
mov dword [ebp - 0x224], 7
call fcn.00481410
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x268]
call fcn.00482720
lea eax, [ebp - 0x268]
push eax
lea ecx, [edi + 0x60]
call fcn.00490700
mov edx, dword [ebp - 0x254]
cmp edx, 8
jb 0x509aad
mov ecx, dword [ebp - 0x268]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x509aa3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d48
push edx
push ecx
call fcn.0051def4
add esp, 8
mov edx, dword [ebp - 0x224]
mov byte [ebp - 4], 8
cmp edx, 8
jb 0x509af1
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x509ae7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d48
push edx
push ecx
call fcn.0051def4
add esp, 8
mov edx, dword [ebp - 0x23c]
mov byte [ebp - 4], 5
cmp edx, 8
jb 0x509b35
mov ecx, dword [ebp - 0x250]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x509b2b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d48
push edx
push ecx
call fcn.0051def4
add esp, 8
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x509b40
sub ecx, edx
mov dword [ebp - 0x250], 0
xor eax, eax
sar ecx, 1
mov word [ebp - 0x250], ax
lea eax, [ebp - 0x218]
push ecx
push eax
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
call fcn.00481410
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 0xa
call fcn.00509fd0
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x509ba3
mov eax, dword [eax]
lea esi, [eax + ecx*2]
push esi
push eax
call fcn.004a6e50
add esp, 8
mov dword [ebp - 0x238], 0
sub esi, eax
mov dword [ebp - 0x228], 0
xor ecx, ecx
sar esi, 1
mov word [ebp - 0x238], cx
lea ecx, [ebp - 0x238]
push esi
push eax
mov dword [ebp - 0x224], 7
call fcn.00481410
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x21d]
push ecx
push dword [ebp - 0x228]
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 0xb
cmovae eax, dword [ebp - 0x238]
push eax
call fcn.0051bc33
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.0049b070
add esp, 0x14
lea eax, [ebp - 0x268]
lea ecx, [edi + 0x78]
push eax
call fcn.00490ed0
mov edx, dword [ebp - 0x254]
cmp edx, 0x10
jb 0x509c6c
mov ecx, dword [ebp - 0x268]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x509c62
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d4d
push edx
push ecx
call fcn.0051def4
add esp, 8
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 0xf
mov byte [ebp - 0x268], 0
cmp edx, 8
jb 0x509cc7
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x509cbd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d4d
push edx
push ecx
call fcn.0051def4
add esp, 8
mov edx, dword [ebp - 0x23c]
xor eax, eax
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
cmp edx, 8
jb 0x509d20
mov ecx, dword [ebp - 0x250]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x509d16
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x509d4d
push edx
push ecx
call fcn.0051def4
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051deb6
mov esp, ebp
pop ebp
ret
call fcn.0052981f
call fcn.0052981f
call fcn.0052981f
call fcn.0052981f
int3