Function at 0x10059320
Capabilities:
Check for peb beingdebugged flag
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x1009ec98
mov eax, dword fs:[0]
push eax
sub esp, 0x2bc
mov eax, dword [0x100c230c]
xor eax, esp
mov dword [esp + 0x2b8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100c230c]
xor eax, esp
push eax
lea eax, [esp + 0x2d0]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2e0]
mov ebp, dword [esp + 0x2e4]
push 0x206
xor ebx, ebx
lea edx, [esp + 0xca]
xor ecx, ecx
push ebx
push edx
mov dword [esp + 0x40], eax
mov word [esp + 0xd0], cx
call fcn.10079c60
add esp, 0xc
push 0x104
lea eax, [esp + 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor ecx, ecx
lea eax, [esp + 0xc4]
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], ebx
mov word [esp + 0x1c], cx
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x100593c0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xc8]
lea esi, [esp + 0x1c]
call fcn.10007450
mov dword [esp + 0x2d8], ebx
mov edx, esi
push edx
lea eax, [esp + 0x74]
push eax
mov edi, str._ntoskrnl.exe
call fcn.1002d500
add esp, 8
mov byte [esp + 0x2d8], 2
cmp dword [esp + 0x30], 8
jb 0x10059418
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.100755e2
add esp, 4
mov esi, dword [ebp + 0x14]
mov ecx, dword [esi + 4]
lea eax, [esp + 0x70]
push eax
push ecx
xor edx, edx
push esi
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], dx
call fcn.10059d80
mov ecx, ebp
mov edi, eax
call fcn.10059e30
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
cmp dword [esp + 0x88], 8
mov eax, dword [esp + 0x74]
jae 0x10059460
lea eax, [esp + 0x74]
mov ecx, dword [esp + 0x34]
push eax
push ebp
call fcn.10058580
xor edx, edx
lea eax, [esp + 0xc4]
mov word [esp + 0x1c], dx
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], ebx
lea edx, [eax + 2]
jmp 0x10059490
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10059490
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xc8]
lea esi, [esp + 0x1c]
call fcn.10007450
mov byte [esp + 0x2d8], 3
mov eax, esi
push eax
lea ecx, [esp + 0x58]
push ecx
mov edi, str.hal.dll
call fcn.1002d500
add esp, 8
mov byte [esp + 0x2d8], 5
cmp dword [esp + 0x30], 8
jb 0x100594e9
mov edx, dword [esp + 0x1c]
push edx
call fcn.100755e2
add esp, 4
mov esi, dword [ebp + 0x14]
mov edx, dword [esi + 4]
lea ecx, [esp + 0x54]
push ecx
push edx
xor eax, eax
push esi
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], ax
call fcn.10059d80
mov ecx, ebp
mov edi, eax
call fcn.10059e30
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
cmp dword [esp + 0x6c], 8
mov eax, dword [esp + 0x58]
jae 0x1005952e
lea eax, [esp + 0x58]
mov ecx, dword [esp + 0x34]
push eax
push ebp
call fcn.10058580
xor eax, eax
mov word [esp + 0x1c], ax
lea eax, [esp + 0xc4]
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10059556
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xc8]
lea esi, [esp + 0x1c]
call fcn.10007450
mov byte [esp + 0x2d8], 6
mov ecx, esi
push ecx
lea edx, [esp + 0xac]
push edx
mov edi, str.config_system
call fcn.1002d500
add esp, 8
mov byte [esp + 0x2d8], 8
cmp dword [esp + 0x30], 8
jb 0x100595b2
mov eax, dword [esp + 0x1c]
push eax
call fcn.100755e2
add esp, 4
mov esi, dword [ebp + 0x14]
mov eax, dword [esi + 4]
lea edx, [esp + 0xa8]
push edx
push eax
xor ecx, ecx
push esi
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], cx
call fcn.10059d80
mov ecx, ebp
mov edi, eax
call fcn.10059e30
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
xor ecx, ecx
lea eax, [esp + 0xc4]
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], ebx
mov word [esp + 0x3c], cx
lea edx, [eax + 2]
jmp 0x10059610
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10059610
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xc8]
lea esi, [esp + 0x3c]
call fcn.10007450
mov byte [esp + 0x2d8], 9
mov edx, esi
push edx
lea eax, [esp + 0x90]
push eax
mov edi, str.config_software
call fcn.1002d500
add esp, 8
mov byte [esp + 0x2d8], 0xb
cmp dword [esp + 0x50], 8
jb 0x1005966c
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.100755e2
add esp, 4
mov esi, dword [ebp + 0x14]
mov ecx, dword [esi + 4]
lea eax, [esp + 0x8c]
push eax
push ecx
xor edx, edx
push esi
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], dx
call fcn.10059d80
mov ecx, ebp
mov edi, eax
call fcn.10059e30
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov edi, ebp
call fcn.10058fb0
mov edx, dword [esp + 0x34]
push edx
mov ecx, ebp
call fcn.100588c0
mov byte [esp + 0x2d8], 8
mov esi, 8
cmp dword [esp + 0xa4], esi
jb 0x100596de
mov eax, dword [esp + 0x90]
push eax
call fcn.100755e2
add esp, 4
mov edi, 7
xor ecx, ecx
mov dword [esp + 0xa4], edi
mov dword [esp + 0xa0], ebx
mov word [esp + 0x90], cx
mov byte [esp + 0x2d8], 5
cmp dword [esp + 0xc0], esi
jb 0x1005971c
mov edx, dword [esp + 0xac]
push edx
call fcn.100755e2
add esp, 4
xor eax, eax
mov dword [esp + 0xc0], edi
mov dword [esp + 0xbc], ebx
mov word [esp + 0xac], ax
mov byte [esp + 0x2d8], 2
cmp dword [esp + 0x6c], esi
jb 0x1005974f
mov ecx, dword [esp + 0x58]
push ecx
call fcn.100755e2
add esp, 4
xor edx, edx
mov dword [esp + 0x6c], edi
mov dword [esp + 0x68], ebx
mov word [esp + 0x58], dx
mov dword [esp + 0x2d8], 0xffffffff
cmp dword [esp + 0x88], esi
jb 0x1005977f
mov eax, dword [esp + 0x74]
push eax
call fcn.100755e2
add esp, 4
xor ecx, ecx
mov dword [esp + 0x88], edi
mov dword [esp + 0x84], ebx
mov word [esp + 0x74], cx
xor eax, eax
mov ecx, dword [esp + 0x2d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2b8]
xor ecx, esp
call fcn.100755ed
add esp, 0x2c8
ret 8