Function at 0x1004330
Capabilities:
Check if file exists
Get common file path
Get file attributes
Read .ini file
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18e4
call fcn.0100cb50
mov eax, dword [0x100e010]
xor ecx, ecx
push ebx
push esi
lea edx, [eax + 0x1180]
push edi
mov dword [ebp - 0x3c], edx
lea edx, [eax + 0x1224]
mov dword [ebp - 0x38], edx
lea edx, [eax + 0x136c]
add eax, 0x12c8
cmp dword [0x100e05c], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x2c], 0x1001560
mov dword [ebp - 0x28], 0x1001570
mov dword [ebp - 0x24], 0x1001580
mov dword [ebp - 0x20], 0x1001590
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], eax
jne 0x10043a3
cmp dword [0x100e060], ecx
jne 0x10043a3
mov eax, 0x320
jmp 0x1004e9f
lea eax, [ebp - 0x18e4]
mov esi, 0x208
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x10043cc
lea eax, [ebp - 0x8ac]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x10043d6
mov eax, 0x321
jmp 0x1004e9f
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x1001508
call esi
mov ebx, 0x1001500
mov edi, eax
push ebx
call esi
lea edi, [edi + eax + 3]
lea eax, [ebp - 0x8ac]
push eax
call esi
mov ecx, 0x208
sub ecx, eax
cmp ecx, edi
jge 0x100440f
mov eax, 0x322
jmp 0x1004e9f
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
mov edi, 0x10017cc
lea eax, [ebp - 0x8ac]
push edi
push eax
call esi
lea eax, [ebp - 0x8ac]
push ebx
push eax
call esi
lea eax, [ebp - 0x8ac]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x8ac]
push eax
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x244]
push edi
push eax
call esi
lea eax, [ebp - 0x244]
push 0x1001508
push eax
call esi
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1004485
mov dword [ebp - 4], 0x32e
jmp 0x1004e8f
lea eax, [ebp - 0x244]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push eax
lea eax, [ebp - 0x514]
push 0x208
mov ebx, 0x1001804
push eax
push ebx
mov edi, 0x1001520
push 0x10015d0
push edi
call esi
mov ecx, dword [0x100e010]
lea eax, [ebp - 0x514]
push eax
call fcn.0100be2c
test eax, eax
jl 0x10045e7
lea eax, [ebp - 0x244]
push eax
mov eax, dword [0x100e018]
add eax, 0x1950
push 0xc8
push eax
push ebx
push 0x1001648
push 0x1001540
call esi
lea eax, [ebp - 0x244]
push eax
mov eax, dword [0x100e010]
add eax, 0x1050
push 0x12c
push eax
push ebx
push 0x10015b8
push edi
call esi
test eax, eax
je 0x100452d
mov eax, dword [0x100e010]
push 0x1001e20
add eax, 0x1050
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x100454e
mov eax, dword [0x100e010]
push 0x12c
add eax, 0x1050
push eax
push 0x1f4
push dword [0x100f270]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x14d4]
push 0x208
push eax
push ebx
push 0x10015e8
push edi
call esi
test eax, eax
je 0x1004580
lea eax, [ebp - 0x14d4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x100458c
mov dword [ebp - 4], 0x32d
jmp 0x1004e8f
lea eax, [ebp - 0x14d4]
push eax
lea eax, [ebp - 0x8ac]
push eax
mov eax, dword [0x100e010]
add eax, 8
push 0x1001e04
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x514]
push 0x208
push eax
push ebx
push 0x1001608
push edi
call esi
test eax, eax
je 0x10045f3
mov ecx, dword [0x100e010]
lea eax, [ebp - 0x514]
push eax
call fcn.0100bea3
test eax, eax
jge 0x10045f3
mov dword [ebp - 4], 0x32c
jmp 0x1004e8f
lea eax, [ebp - 0x244]
mov edi, 0x1001550
push eax
lea eax, [ebp - 0x16dc]
push 0x208
push eax
push ebx
push 0x1001668
push edi
call esi
test eax, eax
je 0x10046d8
lea eax, [ebp - 0x16dc]
push 0x1001dfc
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
mov eax, dword [0x100e018]
je 0x10046ce
add eax, 0x1ae0
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x100465c
mov dword [ebp - 4], 0x321
jmp 0x1004e8f
mov eax, dword [0x100e018]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 0x1ae0
push eax
call edi
mov edx, 0x208
sub edx, eax
mov eax, dword [0x100e018]
add eax, 0x1ae0
mov dword [ebp - 8], edx
push eax
call edi
mov ecx, dword [ebp - 8]
inc eax
inc eax
cmp ecx, eax
jge 0x100469b
mov dword [ebp - 4], 0x322
jmp 0x1004e8f
mov eax, dword [0x100e018]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
add eax, 0x1ae0
push 0x10017cc
push eax
call edi
lea eax, [ebp - 0x16dc]
push eax
mov eax, dword [0x100e018]
add eax, 0x1ae0
push eax
call edi
mov edi, 0x1001550
jmp 0x10046d8
mov dword [eax + 0x1cf4], 1
lea eax, [ebp - 0x244]
push eax
push 0xffffffffffffffff
push 0x1001638
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [0x100e018]
mov dword [ecx + 0x1ce8], eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x30c]
push 0xc8
push eax
push ebx
push 0x1001648
push edi
call esi
test eax, eax
je 0x1004732
lea eax, [ebp - 0x30c]
push eax
call fcn.0100425f
pop ecx
mov ecx, dword [0x100e010]
mov dword [ecx + 0x117c], eax
lea eax, [ebp - 0x244]
mov edi, 0x1001530
push eax
lea eax, [ebp - 0xcbc]
push 0x208
push eax
push 0x1001de0
push 0x1001680
push edi
call esi
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x30c]
push 0xc8
push eax
push ebx
push 0x10016c8
push edi
call esi
lea eax, [ebp - 0x244]
push eax
push 8
push 0x1001698
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x244]
push eax
push 0x2bc
push 0x10016b0
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x244]
push eax
push 0xffffffffffffffff
push 0x1001630
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x244]
push eax
push 0xffffffffffffffff
push 0x1001638
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov edi, eax
lea eax, [ebp - 0x30c]
push eax
call fcn.0100425f
pop ecx
push eax
mov ecx, dword [0x100e010]
push dword [ebp - 0x10]
lea eax, [ebp - 0xcbc]
push dword [ebp - 0x14]
push eax
push edi
push dword [ebp - 8]
call fcn.0100bf0c
test eax, eax
jge 0x100480f
mov dword [ebp - 4], 0x327
jmp 0x1004e8f
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp + eax - 0x2c]
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x10cc]
push 0x208
push eax
push ebx
push 0x10016e0
push edi
call esi
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0xec4]
push 0x208
push eax
push ebx
push 0x10016f8
push edi
call esi
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0xcbc]
push 0x208
push eax
push ebx
push 0x1001680
push edi
call esi
test eax, eax
je 0x1004a7a
lea eax, [ebp - 0x244]
push eax
push 0xffffffffffffffff
push 0x1001638
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x1004aa3
lea eax, [ebp - 0x244]
push eax
push 0xffffffffffffffff
push 0x1001698
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x1004acc
lea eax, [ebp - 0x244]
push eax
push 0
push 0x10016b0
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x30c]
push 0xc8
push eax
push ebx
push 0x10016c8
push edi
call esi
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x5dc]
push 0xc8
push eax
push ebx
push 0x1001718
push edi
call esi
test eax, eax
je 0x1004b2c
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x6a4]
push 0xc8
push eax
push ebx
push 0x1001740
push edi
call esi
test eax, eax
je 0x100493f
lea eax, [ebp - 0x6a4]
push eax
call fcn.0100425f
pop ecx
jmp 0x1004947
push 0x11
call dword [sym.imp.USER32.dll_GetSysColor]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x514]
push 0x208
push eax
push ebx
push 0x1001760
push edi
call esi
test eax, eax
je 0x10049b2
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea eax, [ebp - 0x514]
push 0x1001dd8
push eax
call edi
test eax, eax
je 0x10049b5
lea eax, [ebp - 0x514]
push 0x1001dc8
push eax
call edi
test eax, eax
jne 0x1004999
push 4
pop eax
jmp 0x10049b5
lea eax, [ebp - 0x514]
push 0x1001db8
push eax
call edi
neg eax
sbb eax, eax
and al, 0xf7
add eax, 8
jmp 0x10049b5
or eax, 0xffffffff
push eax
lea eax, [ebp - 0x5dc]
push dword [ebp - 0x1c]
push eax
call fcn.0100425f
pop ecx
push eax
lea eax, [ebp - 0x30c]
push eax
call fcn.0100425f
pop ecx
push eax
lea eax, [ebp - 0xcbc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push eax
lea eax, [ebp - 0xec4]
push eax
lea eax, [ebp - 0x10cc]
push eax
mov eax, dword [ebp - 0x18]
push dword [ebp - 8]
mov ecx, dword [ebp + eax - 0x3c]
call fcn.0100c0f0
test eax, eax
jl 0x1004c35
add dword [ebp - 0x18], 4
cmp dword [ebp - 0x18], 0x10
jb 0x1004813
lea eax, [ebp - 0x244]
mov edi, 0x10015a0
push eax
lea eax, [ebp - 0x10cc]
push 0x208
push eax
push ebx
push 0x10016e0
push edi
call esi
test eax, eax
je 0x1004d92
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0xec4]
push 0x208
push eax
push ebx
push 0x10016f8
push edi
call esi
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0xcbc]
push 0x208
push eax
push ebx
push 0x1001680
push edi
call esi
test eax, eax
jne 0x1004a86
mov dword [ebp - 4], 0x326
jmp 0x1004e8f
lea eax, [ebp - 0x244]
push eax
push 0xffffffffffffffff
push 0x1001638
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
jne 0x1004aaf
mov dword [ebp - 4], 0x325
jmp 0x1004e8f
lea eax, [ebp - 0x244]
push eax
push 0xffffffffffffffff
push 0x1001698
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x1004ad8
mov dword [ebp - 4], 0x324
jmp 0x1004e8f
lea eax, [ebp - 0x244]
push eax
push 0
push 0x10016b0
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x30c]
push 0xc8
push eax
push ebx
push 0x10016c8
push edi
call esi
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x5dc]
push 0xc8
push eax
push ebx
push 0x1001718
push edi
call esi
test eax, eax
jne 0x1004b38
mov dword [ebp - 4], 0x323
jmp 0x1004e8f
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x6a4]
push 0xc8
push eax
push ebx
push 0x1001740
push edi
call esi
test eax, eax
je 0x1004b67
lea eax, [ebp - 0x6a4]
push eax
call fcn.0100425f
pop ecx
jmp 0x1004b6f
push 0x11
call dword [sym.imp.USER32.dll_GetSysColor]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x514]
push 0x208
push eax
push ebx
push 0x1001760
push edi
call esi
test eax, eax
je 0x1004be0
lea eax, [ebp - 0x514]
push 0x1001dd8
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1004be3
lea eax, [ebp - 0x514]
push 0x1001dc8
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1004bc3
push 4
pop eax
jmp 0x1004be3
lea eax, [ebp - 0x514]
push 0x1001db8
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
neg eax
sbb eax, eax
and al, 0xf7
add eax, 8
jmp 0x1004be3
or eax, 0xffffffff
push eax
lea eax, [ebp - 0x5dc]
push dword [ebp - 0x1c]
push eax
call fcn.0100425f
pop ecx
push eax
lea eax, [ebp - 0x30c]
push eax
call fcn.0100425f
pop ecx
push eax
lea eax, [ebp - 0xcbc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push eax
lea eax, [ebp - 0xec4]
push eax
lea eax, [ebp - 0x10cc]
push eax
mov eax, dword [0x100e010]
push dword [ebp - 8]
lea ecx, [eax + 0x1410]
call fcn.0100c0f0
test eax, eax
jge 0x1004c41
mov dword [ebp - 4], 0x328
jmp 0x1004e8f
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x514]
push 0x208
push eax
push ebx
push 0x1001770
push edi
call esi
test eax, eax
je 0x1004d28
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
test eax, eax
je 0x1004d08
mov edx, dword [0x10017dc]
xor eax, eax
lea edi, [ebp - 8]
mov dword [ebp - 0xc], edx
stosw word es:[edi], ax
push 0x7f
lea edi, [ebp - 0x12c8]
pop ecx
mov dword [ebp - 0x12cc], edx
rep stosd dword es:[edi], eax
mov ecx, 0x81
lea edi, [ebp - 0xab0]
mov dword [ebp - 0xab4], edx
push eax
rep stosd dword es:[edi], eax
push eax
lea eax, [ebp - 0x12cc]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.MSVCRT.dll__wsplitpath]
add esp, 0x14
lea eax, [ebp - 0x514]
push 0x208
push eax
lea eax, [ebp - 0xab4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0xab4]
push 0
push eax
lea eax, [ebp - 0x12cc]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.MSVCRT.dll__wmakepath]
add esp, 0x14
mov eax, dword [0x100f280]
lea ecx, [ebp - 0x514]
test ecx, ecx
je 0x1004d9e
push 0x618
lea ecx, [ebp - 0x514]
jmp 0x1004d85
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x514]
push 0x208
push eax
push ebx
push 0x1001788
push edi
call esi
test eax, eax
je 0x1004d9e
lea eax, [ebp - 0x514]
push eax
lea eax, [ebp - 0x8ac]
push eax
lea eax, [ebp - 0xab4]
push 0x1001d98
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [0x100f280]
lea ecx, [ebp - 0xab4]
add esp, 0x10
test ecx, ecx
je 0x1004d9e
push 0x618
lea ecx, [ebp - 0xab4]
add eax, 0x54
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x1004d9e
mov eax, dword [0x100e010]
and dword [eax + 0x14b0], 0
mov ecx, dword [0x100e010]
call fcn.0100ad36
cmp eax, 0xffffffff
jne 0x1004dba
mov dword [ebp - 4], 0x329
jmp 0x1004e8f
lea eax, [ebp - 0x244]
mov edi, 0x1001540
push eax
push 0xffffffffffffffff
push 0x1001630
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [0x100e010]
push eax
call fcn.0100c03d
test eax, eax
jge 0x1004df0
mov dword [ebp - 4], 0x32a
jmp 0x1004e8f
lea eax, [ebp - 0x244]
push eax
push 0xffffffffffffffff
push 0x1001638
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [0x100e010]
push eax
call fcn.0100c077
test eax, eax
jge 0x1004e1e
mov dword [ebp - 4], 0x32b
jmp 0x1004e8f
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x30c]
push 0xc8
push eax
push ebx
push 0x10016c8
push edi
call esi
test eax, eax
je 0x1004e65
lea eax, [ebp - 0x30c]
push eax
mov eax, dword [0x100e018]
add eax, 0x1a18
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x30c]
push eax
call fcn.0100425f
pop ecx
jmp 0x1004e83
mov eax, dword [0x100e018]
push 0x1001d80
add eax, 0x1a18
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 8
call dword [sym.imp.USER32.dll_GetSysColor]
mov ecx, dword [0x100e018]
mov dword [ecx + 0x1cec], eax
lea eax, [ebp - 0x18e4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [ebp - 4]
test eax, eax
je 0x1004eb7
cmp dword [0x100e07c], 0
je 0x1004eb3
push eax
call fcn.010042a3
pop ecx
xor eax, eax
jmp 0x1004eba
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret