Function at 0x40b575
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x524
push ebx
push esi
mov ebx, 0x104
push edi
lea eax, [ebp - 0x420]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x420]
push str.SYSTEM.INI
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x31c]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x31c]
push str.GLBS383.TMP
push eax
call edi
lea ecx, [ebp - 0x31c]
sub ecx, 0xa
add eax, ecx
push eax
call esi
lea eax, [ebp - 0x420]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40b7e5
lea eax, [ebp - 0x31c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x40b61e
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x40b7e5
xor eax, eax
push 0x4000
push eax
mov dword [ebp - 8], eax
push dword [0x4177b8]
mov dword [ebp - 0x10], eax
call fcn.0040ce50
and dword [0x417be8], 0
and dword [0x4178bc], 0
add esp, 0xc
lea eax, [ebp - 0x114]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x114]
push eax
call edi
cmp byte [ebp + eax - 0x115], 0x5c
je 0x40b67b
lea eax, [ebp - 0x114]
push 0x4140ec
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push eax
call edi
push eax
lea eax, [ebp - 0x114]
push dword [ebp + 8]
push eax
call fcn.00411110
add esp, 0xc
test eax, eax
jne 0x40b6aa
lea eax, [ebp - 0x114]
push eax
call edi
add eax, dword [ebp + 8]
push eax
jmp 0x40b6ad
push dword [ebp + 8]
lea eax, [ebp - 0x114]
push eax
call esi
push 1
push dword [ebp - 4]
push ebx
lea eax, [ebp - 0x218]
push eax
call fcn.004071cb
add esp, 0x10
test eax, eax
je 0x40b7ea
mov al, byte [ebp - 0x218]
lea ebx, [ebp - 0x218]
test al, al
je 0x40b6f1
cmp al, 0x20
je 0x40b6eb
cmp al, 9
jne 0x40b6f1
mov al, byte [ebx + 1]
inc ebx
jmp 0x40b6df
cmp dword [ebp - 8], 0
je 0x40b76c
cmp byte [ebx], 0x5b
jne 0x40b705
and dword [ebp - 8], 0
jmp 0x40b787
push 7
push str.device
push ebx
call fcn.00411110
add esp, 0xc
test eax, eax
jne 0x40b787
lea eax, [ebp - 0x114]
add ebx, 7
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40b73c
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40b787
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x524]
push eax
call esi
lea eax, [ebp - 0x524]
mov byte [ebp - 0x218], 0x3b
push eax
lea eax, [ebp - 0x217]
push eax
call esi
mov dword [ebp - 0x10], 1
jmp 0x40b787
push 8
push str._386Enh_
push ebx
call fcn.00411110
add esp, 0xc
test eax, eax
jne 0x40b787
mov dword [ebp - 8], 1
lea eax, [ebp - 0x218]
push 0x41483c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x218]
push eax
call edi
mov ebx, eax
lea eax, [ebp - 0x218]
push ebx
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp eax, ebx
jne 0x40b7c8
push 1
push dword [ebp - 4]
push 0x104
jmp 0x40b6bc
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll__lclose]
call esi
push dword [ebp - 0xc]
call esi
lea eax, [ebp - 0x31c]
push eax
call fcn.0040acb8
pop ecx
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll__lclose]
call esi
push dword [ebp - 0xc]
call esi
cmp dword [ebp - 0x10], 0
je 0x40b7d8
lea eax, [ebp - 0x420]
push eax
call fcn.0040acb8
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x31c]
push eax
call fcn.0040d6f8
add esp, 0xc
jmp 0x40b7e5