Function at 0x1005a560
Capabilities:
Check for peb ntglobalflag flag
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10083c94
mov eax, dword fs:[0]
push eax
mov eax, 0x1060
call fcn.100790e0
mov eax, dword [0x100a5c90]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x106c], ebx
xor eax, eax
mov dword [ebp - 4], eax
mov ecx, 7
xor edx, edx
mov dword [ebx + 0x14], ecx
mov dword [ebx + 0x10], eax
mov word [ebx], dx
mov dword [ebx + 0x30], ecx
mov dword [ebx + 0x2c], eax
mov word [ebx + 0x1c], dx
mov dword [ebx + 0x4c], ecx
mov dword [ebx + 0x48], eax
mov word [ebx + 0x38], dx
mov dword [ebx + 0x68], ecx
mov dword [ebx + 0x64], eax
mov word [ebx + 0x54], dx
mov dword [ebx + 0x84], ecx
mov dword [ebx + 0x80], eax
mov word [ebx + 0x70], dx
mov dword [ebx + 0xa0], ecx
xor ecx, ecx
mov dword [ebx + 0x9c], eax
mov word [ebx + 0x8c], cx
mov byte [ebp - 4], 6
push eax
lea edx, [ebp + 8]
mov dword [ebx + 0xa8], eax
mov esi, 1
push edx
or eax, 0xffffffff
mov ecx, ebx
mov dword [ebx + 0xac], esi
call fcn.10003850
mov dword [ebx + 0xb0], esi
lea esp, [esp]
push esi
push 0x10093f58
lea eax, [ebp + 8]
push eax
xor eax, eax
call fcn.100109a0
cmp eax, 0xffffffff
je 0x1005a642
push esi
push eax
lea eax, [ebp + 8]
call fcn.10021460
jmp 0x1005a620
lea edx, [ebp + 8]
lea esi, [ebp - 0x102c]
call fcn.10021160
mov edi, eax
lea esi, [ebx + 0x1c]
mov byte [ebp - 4], 7
call fcn.100037e0
mov esi, 8
mov byte [ebp - 4], 6
cmp dword [ebp - 0x1018], esi
jb 0x1005a67e
mov ecx, dword [ebp - 0x102c]
push ecx
call fcn.10066b10
add esp, 4
lea eax, [ebp + 8]
call fcn.1005a980
mov dword [ebx + 0xa8], eax
test eax, eax
je 0x1005a94a
cmp eax, 1
jne 0x1005a909
push eax
lea edx, [ebp - 0x1068]
push edx
lea eax, [ebp + 8]
push eax
xor eax, eax
mov dword [ebp - 0x1068], 0x7e
call fcn.100109a0
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
mov eax, ecx
mov dword [ebx + 0xac], eax
test eax, eax
jne 0x1005a798
xor edx, edx
push 0xffe
push edx
lea eax, [ebp - 0x100e]
push eax
mov word [ebp - 0x1010], dx
call fcn.1006b580
mov eax, dword [ebp + 8]
add esp, 0xc
cmp dword [ebp + 0x1c], esi
jae 0x1005a6fb
lea eax, [ebp + 8]
push 0x800
lea ecx, [ebp - 0x1010]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x1005a745
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1005a72c
mov dword [ebx + 0xb0], 0
jmp 0x1005a94a
push 0
push 0x10097ef8
push 0x10097f08
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1005a94a
lea eax, [ebp - 0x1010]
lea ecx, [ebp - 0x1048]
call fcn.100036d0
lea edx, [ebp - 0x1048]
lea esi, [ebp - 0x1064]
mov byte [ebp - 4], 8
call fcn.10021160
mov edi, eax
lea esi, [ebx + 0x8c]
mov byte [ebp - 4], 9
call fcn.100037e0
lea ecx, [ebp - 0x1064]
call fcn.10003710
lea ecx, [ebp - 0x1048]
mov byte [ebp - 4], 6
call fcn.10003710
jmp 0x1005a7ac
push 0
lea edx, [ebp + 8]
push edx
or eax, 0xffffffff
lea ecx, [ebx + 0x8c]
call fcn.10003850
cmp dword [ebx + 0x9c], 0
lea edi, [ebx + 0x8c]
ja 0x1005a7c5
push str.invalid_string_position
call fcn.1005f003
cmp dword [edi + 0x14], 8
jb 0x1005a7cf
mov eax, dword [edi]
jmp 0x1005a7d1
mov eax, edi
movzx eax, word [eax]
push eax
lea esi, [ebx + 0x38]
call fcn.1005acb0
xor ecx, ecx
mov dword [ebp - 0x1018], 7
mov dword [ebp - 0x101c], 0
mov word [ebp - 0x102c], cx
lea edx, [ebp - 0x1068]
push edx
push edi
lea edi, [ecx + 1]
mov byte [ebp - 4], 0xa
or ecx, 0xffffffff
mov dword [ebp - 0x1068], 0x5c
call fcn.1000a090
cmp eax, 0xffffffff
je 0x1005a94a
push 0xffffffffffffffff
lea ecx, [eax + 1]
lea esi, [ebp - 0x1048]
lea edx, [ebx + 0x8c]
call fcn.10009bd0
mov edi, eax
lea esi, [ebp - 0x102c]
mov byte [ebp - 4], 0xb
call fcn.100037e0
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0x1034], 8
jb 0x1005a867
mov eax, dword [ebp - 0x1048]
push eax
call fcn.10066b10
add esp, 4
push 1
lea ecx, [ebp - 0x1068]
push ecx
lea edx, [ebp - 0x102c]
push edx
xor eax, eax
mov dword [ebp - 0x1068], 0x2e
call fcn.100109a0
mov dword [ebp - 0x1068], eax
cmp eax, 0xffffffff
je 0x1005a8f7
push eax
xor ecx, ecx
lea esi, [ebp - 0x1064]
lea edx, [ebp - 0x102c]
call fcn.10009bd0
mov edi, eax
lea esi, [ebx + 0x54]
mov byte [ebp - 4], 0xc
call fcn.100037e0
lea ecx, [ebp - 0x1064]
mov byte [ebp - 4], 0xa
call fcn.10003710
mov ecx, dword [ebp - 0x1068]
push 0xffffffffffffffff
inc ecx
lea esi, [ebp - 0x1064]
lea edx, [ebp - 0x102c]
call fcn.10009bd0
mov edi, eax
lea esi, [ebx + 0x70]
mov byte [ebp - 4], 0xd
call fcn.100037e0
lea ecx, [ebp - 0x1064]
call fcn.10003710
cmp dword [ebp - 0x1018], 8
jb 0x1005a94a
mov eax, dword [ebp - 0x102c]
push eax
jmp 0x1005a942
lea edx, [ebp + 8]
lea esi, [ebp - 0x1048]
mov dword [ebx + 0xac], 1
call fcn.10021160
mov edi, eax
lea esi, [ebx + 0x8c]
mov byte [ebp - 4], 0xe
call fcn.100037e0
cmp dword [ebp - 0x1034], 8
jb 0x1005a94a
mov ecx, dword [ebp - 0x1048]
push ecx
call fcn.10066b10
add esp, 4
cmp dword [ebp + 0x1c], 8
jb 0x1005a95c
mov edx, dword [ebp + 8]
push edx
call fcn.10066b10
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10066b1b
mov esp, ebp
pop ebp
ret 0x1c