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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x18d4
call fcn.0100ee80
mov eax, dword [0x1012288]
mov dword [ebp - 4], eax
mov eax, dword [0x1011028]
lea ecx, [eax + 0x1180]
push ebx
mov dword [ebp - 0x18d4], ecx
lea ecx, [eax + 0x1224]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x18d0], ecx
lea ecx, [eax + 0x136c]
add eax, 0x12c8
cmp dword [0x1011070], edi
mov dword [ebp - 0x18b8], edi
mov dword [ebp - 0x18cc], ecx
mov dword [ebp - 0x18c8], eax
jne 0x1003e07
cmp dword [0x1011074], edi
jne 0x1003e07
mov dword [ebp - 0x18b8], 0x320
jmp 0x100497b
lea eax, [ebp - 0x14a4]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1003e37
push esi
lea eax, [ebp - 0x87c]
push eax
mov word [ebp - 0x129e], di
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x1003e46
mov dword [ebp - 0x18b8], 0x321
jmp 0x100497b
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x10014e0
mov word [ebp - 0x676], di
call esi
mov ebx, 0x10014d8
push ebx
mov edi, eax
call esi
lea edi, [edi + eax + 3]
lea eax, [ebp - 0x87c]
push eax
call esi
mov ecx, 0x208
sub ecx, eax
cmp ecx, edi
jge 0x1003e8b
mov dword [ebp - 0x18b8], 0x322
jmp 0x100497b
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
mov edi, 0x1001b64
push edi
lea eax, [ebp - 0x87c]
push eax
call esi
push ebx
lea eax, [ebp - 0x87c]
push eax
call esi
lea eax, [ebp - 0x87c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x87c]
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
lea eax, [ebp - 0x214]
push eax
call esi
push 0x10014e0
lea eax, [ebp - 0x214]
push eax
call esi
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1003f04
mov dword [ebp - 0x18b8], 0x32e
jmp 0x1004965
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x4e4]
push eax
mov ebx, 0x1001774
push ebx
push 0x1001594
mov edi, 0x10014f8
push edi
call esi
mov ecx, dword [0x1011028]
lea eax, [ebp - 0x4e4]
push eax
call fcn.0100cb96
test eax, eax
jge 0x1003f55
mov dword [ebp - 0x18b8], 0x32c
jmp 0x1004965
lea eax, [ebp - 0x214]
push eax
mov eax, dword [0x1011030]
push 0x64
add eax, 0x1950
push eax
push ebx
push 0x1001604
push 0x1001518
call esi
lea eax, [ebp - 0x214]
push eax
mov eax, dword [0x1011028]
push 0x96
add eax, 0x1050
push eax
push ebx
push 0x1001580
push edi
call esi
test eax, eax
mov eax, dword [0x1011028]
je 0x1003fb9
push 0x1001b5c
add eax, 0x1050
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1003fd5
mov eax, dword [0x1011028]
push 0x96
add eax, 0x1050
push eax
push 0x1f4
push dword [0x10122a8]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x18b4]
push eax
push ebx
push 0x10015ac
push edi
call esi
test eax, eax
jne 0x1004004
mov dword [ebp - 0x18b8], 0x32d
jmp 0x1004965
lea eax, [ebp - 0x18b4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1003ff5
lea eax, [ebp - 0x18b4]
push eax
lea eax, [ebp - 0x87c]
push eax
mov eax, dword [0x1011028]
add eax, 8
push 0x1001b40
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x4e4]
push eax
push ebx
push 0x10015c8
push edi
call esi
test eax, eax
je 0x1004075
mov ecx, dword [0x1011028]
lea eax, [ebp - 0x4e4]
push eax
call fcn.0100cc14
test eax, eax
jl 0x1003f46
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x16ac]
push eax
push ebx
push 0x1001624
mov edi, 0x1001528
push edi
call esi
test eax, eax
je 0x100416d
push 0x1001b38
lea eax, [ebp - 0x16ac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
mov eax, dword [0x1011030]
je 0x1004163
add eax, 0x1ae0
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x10040e1
mov dword [ebp - 0x18b8], 0x321
jmp 0x1004965
mov eax, dword [0x1011030]
and word [eax + 0x1ce6], 0
mov eax, dword [0x1011030]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 0x1ae0
push eax
call edi
mov ecx, 0x208
sub ecx, eax
mov eax, dword [0x1011030]
add eax, 0x1ae0
push eax
mov dword [ebp - 0xc], ecx
call edi
mov ecx, dword [ebp - 0xc]
inc eax
inc eax
cmp ecx, eax
jge 0x1004130
mov dword [ebp - 0x18b8], 0x322
jmp 0x1004965
mov eax, dword [0x1011030]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x1001b64
add eax, 0x1ae0
push eax
call edi
lea eax, [ebp - 0x16ac]
push eax
mov eax, dword [0x1011030]
add eax, 0x1ae0
push eax
call edi
mov edi, 0x1001528
jmp 0x100416d
mov dword [eax + 0x1cf4], 1
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x10015f8
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [0x1011030]
mov dword [ecx + 0x1ce8], eax
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x2dc]
push eax
push ebx
push 0x1001604
push edi
call esi
test eax, eax
je 0x10041c4
lea eax, [ebp - 0x2dc]
push eax
call fcn.010034c1
pop ecx
mov ecx, dword [0x1011028]
mov dword [ecx + 0x117c], eax
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0xc8c]
push eax
push 0x1001b1c
push 0x1001638
mov edi, 0x1001508
push edi
call esi
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x2dc]
push eax
push ebx
push 0x1001678
push edi
call esi
lea eax, [ebp - 0x214]
push eax
push 8
push 0x100164c
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x18c0], eax
lea eax, [ebp - 0x214]
push eax
push 0x2bc
push 0x1001660
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x18bc], eax
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x10015f0
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x10015f8
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov edi, eax
lea eax, [ebp - 0x2dc]
push eax
call fcn.010034c1
pop ecx
mov ecx, dword [0x1011028]
push eax
push dword [ebp - 0x18bc]
lea eax, [ebp - 0xc8c]
push dword [ebp - 0x18c0]
push eax
push edi
push dword [ebp - 0xc]
call fcn.0100de21
test eax, eax
jge 0x10042ad
mov dword [ebp - 0x18b8], 0x327
jmp 0x1004965
xor edi, edi
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x129c]
push eax
push ebx
push 0x100168c
push dword [edi + 0x1001b0c]
call esi
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x1094]
push eax
push ebx
push 0x10016a4
push dword [edi + 0x1001b0c]
call esi
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0xc8c]
push eax
push ebx
push 0x1001638
push dword [edi + 0x1001b0c]
call esi
test eax, eax
je 0x1004615
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x10015f8
push dword [edi + 0x1001b0c]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x1004624
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x100164c
push dword [edi + 0x1001b0c]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebp - 0x18c0], eax
je 0x1004633
lea eax, [ebp - 0x214]
push eax
push 0
push 0x1001660
push dword [edi + 0x1001b0c]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x18bc], eax
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x2dc]
push eax
push ebx
push 0x1001678
push dword [edi + 0x1001b0c]
call esi
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x5ac]
push eax
push ebx
push 0x10016c0
push dword [edi + 0x1001b0c]
call esi
test eax, eax
je 0x1004642
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x674]
push eax
push ebx
push 0x10016e4
push dword [edi + 0x1001b0c]
call esi
test eax, eax
je 0x10043fe
lea eax, [ebp - 0x674]
push eax
call fcn.010034c1
pop ecx
jmp 0x1004406
push 0x11
call dword [sym.imp.USER32.dll_GetSysColor]
mov dword [ebp - 0x18c4], eax
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x4e4]
push eax
push ebx
push 0x1001700
push dword [edi + 0x1001b0c]
call esi
test eax, eax
je 0x1004480
push 0x1001b04
lea eax, [ebp - 0x4e4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1004483
push 0x1001af4
lea eax, [ebp - 0x4e4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1004462
push 4
pop eax
jmp 0x1004483
push 0x1001ae4
lea eax, [ebp - 0x4e4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
neg eax
sbb eax, eax
and eax, 0xfffffff7
add eax, 8
jmp 0x1004483
or eax, 0xffffffff
push eax
push dword [ebp - 0x18c4]
lea eax, [ebp - 0x5ac]
push eax
call fcn.010034c1
pop ecx
push eax
lea eax, [ebp - 0x2dc]
push eax
call fcn.010034c1
pop ecx
mov ecx, dword [ebp + edi - 0x18d4]
push eax
push dword [ebp - 0x18bc]
lea eax, [ebp - 0xc8c]
push dword [ebp - 0x18c0]
push eax
lea eax, [ebp - 0x1094]
push eax
lea eax, [ebp - 0x129c]
push eax
push dword [ebp - 0xc]
call fcn.0100e398
test eax, eax
jl 0x1004651
add edi, 4
cmp edi, 0x10
jb 0x10042af
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x129c]
push eax
push ebx
push 0x100168c
mov edi, 0x100156c
push edi
call esi
test eax, eax
je 0x1004862
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x1094]
push eax
push ebx
push 0x10016a4
push edi
call esi
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0xc8c]
push eax
push ebx
push 0x1001638
push edi
call esi
test eax, eax
je 0x1004615
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x10015f8
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x1004624
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x100164c
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0xffffffff
mov dword [ebp - 0x18c0], eax
je 0x1004633
lea eax, [ebp - 0x214]
push eax
push 0
push 0x1001660
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x18bc], eax
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x2dc]
push eax
push ebx
push 0x1001678
push edi
call esi
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x5ac]
push eax
push ebx
push 0x10016c0
push edi
call esi
test eax, eax
je 0x1004642
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x674]
push eax
push ebx
push 0x10016e4
push edi
call esi
test eax, eax
je 0x1004660
lea eax, [ebp - 0x674]
push eax
call fcn.010034c1
pop ecx
jmp 0x1004668
mov dword [ebp - 0x18b8], 0x326
jmp 0x1004965
mov dword [ebp - 0x18b8], 0x325
jmp 0x1004965
mov dword [ebp - 0x18b8], 0x324
jmp 0x1004965
mov dword [ebp - 0x18b8], 0x323
jmp 0x1004965
mov dword [ebp - 0x18b8], 0x328
jmp 0x1004965
push 0x11
call dword [sym.imp.USER32.dll_GetSysColor]
mov dword [ebp - 0x18c4], eax
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x4e4]
push eax
push ebx
push 0x1001700
push edi
call esi
test eax, eax
je 0x10046dd
push 0x1001b04
lea eax, [ebp - 0x4e4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10046e0
push 0x1001af4
lea eax, [ebp - 0x4e4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x10046bf
push 4
pop eax
jmp 0x10046e0
push 0x1001ae4
lea eax, [ebp - 0x4e4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
neg eax
sbb eax, eax
and eax, 0xfffffff7
add eax, 8
jmp 0x10046e0
or eax, 0xffffffff
push eax
push dword [ebp - 0x18c4]
lea eax, [ebp - 0x5ac]
push eax
call fcn.010034c1
pop ecx
push eax
lea eax, [ebp - 0x2dc]
push eax
call fcn.010034c1
pop ecx
mov ecx, dword [0x1011028]
push eax
push dword [ebp - 0x18bc]
lea eax, [ebp - 0xc8c]
push dword [ebp - 0x18c0]
add ecx, 0x1410
push eax
lea eax, [ebp - 0x1094]
push eax
lea eax, [ebp - 0x129c]
push eax
push dword [ebp - 0xc]
call fcn.0100e398
test eax, eax
jl 0x1004651
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x4e4]
push eax
push ebx
push 0x1001710
push edi
call esi
test eax, eax
je 0x1004817
lea eax, [ebp - 0x4e4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
test eax, eax
je 0x1004803
xor edx, edx
xor eax, eax
push 0x7f
pop ecx
mov dword [ebp - 0xc], edx
lea edi, [ebp - 8]
stosw word es:[edi], ax
mov dword [ebp - 0xe8c], edx
lea edi, [ebp - 0xe88]
rep stosd dword es:[edi], eax
push edx
mov dword [ebp - 0xa84], edx
mov ecx, 0x81
lea edi, [ebp - 0xa80]
rep stosd dword es:[edi], eax
push edx
lea eax, [ebp - 0xe8c]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.msvcrt.dll__wsplitpath]
add esp, 0x14
push 0x104
lea eax, [ebp - 0x4e4]
push eax
lea eax, [ebp - 0xa84]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0
lea eax, [ebp - 0xa84]
push eax
lea eax, [ebp - 0xe8c]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x4e4]
push eax
call dword [sym.imp.msvcrt.dll__wmakepath]
add esp, 0x14
lea eax, [ebp - 0x4e4]
mov ecx, dword [0x10122b0]
push eax
call fcn.01002c35
jmp 0x100486e
lea eax, [ebp - 0x214]
push eax
push 0x104
lea eax, [ebp - 0x4e4]
push eax
push ebx
push 0x1001728
push edi
call esi
test eax, eax
je 0x100486e
lea eax, [ebp - 0x4e4]
push eax
lea eax, [ebp - 0x87c]
push eax
lea eax, [ebp - 0xa84]
push 0x1001ac4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0xa84]
jmp 0x1004809
mov eax, dword [0x1011028]
and dword [eax + 0x14b0], 0
mov ecx, dword [0x1011028]
call fcn.0100c624
cmp eax, 0xffffffff
jne 0x100488d
mov dword [ebp - 0x18b8], 0x329
jmp 0x1004965
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x10015f0
mov edi, 0x1001518
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [0x1011028]
push eax
call fcn.0100cc84
test eax, eax
jge 0x10048c6
mov dword [ebp - 0x18b8], 0x32a
jmp 0x1004965
lea eax, [ebp - 0x214]
push eax
push 0xffffffffffffffff
push 0x10015f8
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [0x1011028]
push eax
call fcn.0100ccc8
test eax, eax
jge 0x10048f7
mov dword [ebp - 0x18b8], 0x32b
jmp 0x1004965
lea eax, [ebp - 0x214]
push eax
push 0x64
lea eax, [ebp - 0x2dc]
push eax
push ebx
push 0x1001678
push edi
call esi
test eax, eax
je 0x100493b
lea eax, [ebp - 0x2dc]
push eax
mov eax, dword [0x1011030]
add eax, 0x1a18
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x2dc]
push eax
call fcn.010034c1
pop ecx
jmp 0x1004959
mov eax, dword [0x1011030]
push 0x1001aac
add eax, 0x1a18
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 8
call dword [sym.imp.USER32.dll_GetSysColor]
mov ecx, dword [0x1011030]
mov dword [ecx + 0x1cec], eax
lea eax, [ebp - 0x14a4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ebp - 0x18b8], 0
je 0x1004994
cmp dword [0x1011094], 0
je 0x1004990
push dword [ebp - 0x18b8]
call fcn.0100350c
pop ecx
xor eax, eax
jmp 0x1004997
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100ecf8
leave
ret