Function at 0x405ec0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc4
mov eax, dword [0x4a3300]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x257
lea eax, [ebp - 0x70f]
mov byte [ebp - 0x710], 0
push 0
push eax
call fcn.00453200
add esp, 0xc
lea eax, [ebp - 0x710]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x406308
lea edi, [ebp - 0x710]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x405f17
mov ax, word [0x481cd0]
lea ecx, [ebp - 0x710]
mov word [edi], ax
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405f31
mov eax, dword [str.iGameDX]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov dword [ecx], eax
mov eax, dword [0x481cd8]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x710]
push eax
call ebx
test eax, eax
jne 0x405f6b
push eax
lea eax, [ebp - 0x710]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x710]
push eax
call ebx
test eax, eax
je 0x406308
push 0x257
lea eax, [ebp - 0x25f]
mov byte [ebp - 0x260], 0
push 0
push eax
call fcn.00453200
lea edi, [ebp - 0x260]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x405fa0
mov ax, word [0x481cd0]
mov edx, 0x72770c
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x405fc0
lea edi, [ebp - 0x260]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405fd0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x260]
dec ecx
lea ecx, [ecx]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405ff0
mov eax, dword [str..exe]
mov dword [ecx], eax
mov al, byte [0x481ce0]
push 0x257
mov byte [ecx + 4], al
lea eax, [ebp - 0x4b7]
push 0
push eax
mov byte [ebp - 0x4b8], 0
call fcn.00453200
lea edx, [ebp - 0x710]
add esp, 0xc
mov esi, edx
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x406030
lea edi, [ebp - 0x4b8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406040
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x4b8]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x406060
mov ax, word [0x481cd0]
mov edx, 0x727624
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x406080
lea edi, [ebp - 0x4b8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406090
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x258
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
push 0x7287f4
call fcn.00453200
lea edx, [ebp - 0x4b8]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4060c2
mov edi, 0x7287f4
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4060d1
mov ecx, edx
lea eax, [ebp - 0x4b8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
test eax, eax
jne 0x406102
push eax
lea eax, [ebp - 0x4b8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x4b8]
push eax
call ebx
test eax, eax
je 0x406308
push 0x257
lea eax, [ebp - 0x967]
mov byte [ebp - 0x968], 0
push 0
push eax
call fcn.00453200
lea edx, [ebp - 0x710]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x406138
lea edi, [ebp - 0x968]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406148
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x968]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x406165
mov ax, word [0x481cd0]
mov edx, 0x727624
mov word [edi], ax
mov esi, edx
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x406180
lea edi, [ebp - 0x968]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406190
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x260]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, edx
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x4061b0
lea edi, [ebp - 0x968]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4061c0
mov ecx, edx
mov byte [ebp - 0xbc0], al
shr ecx, 2
lea eax, [ebp - 0xbbf]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x257
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00453200
add esp, 0xc
lea eax, [ebp - 0xbc0]
push 0x258
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x258
push 0
push 0x4a78b0
call fcn.00453200
lea ebx, [ebp - 0x4b8]
add esp, 0xc
mov esi, ebx
mov al, byte [ebx]
inc ebx
test al, al
jne 0x406222
mov edx, 0x4a78b0
sub ebx, esi
lea edi, [edx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406233
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [edx - 1]
lea esp, [esp]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x406250
mov ax, word [0x481cd0]
dec edx
mov word [edi], ax
mov al, byte [edx + 1]
lea edx, [edx + 1]
test al, al
jne 0x406264
cmp dword [0x727620], 1
mov eax, dword [str.iGameDX.ini]
mov dword [edx], eax
mov eax, dword [0x481ce8]
mov dword [edx + 4], eax
mov eax, dword [0x481cec]
mov dword [edx + 8], eax
jne 0x40631b
push 0x257
lea eax, [ebp - 0x25f]
mov byte [ebp - 0x260], 0
push 0
push eax
call fcn.00453200
add esp, 0xc
lea eax, [ebp - 0x260]
push 0x258
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x260]
push 0x5c
push eax
call fcn.00458540
add esp, 8
test eax, eax
je 0x4062ec
lea eax, [ebp - 0x260]
push 0x5c
push eax
call fcn.00458540
add esp, 8
mov byte [eax], 0
push 0x4a78b0
lea eax, [ebp - 0x260]
push eax
push str.Start
push str.PATH
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004524fc
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x968]
push eax
lea eax, [ebp - 0xbc0]
push eax
call fcn.004581f3
add esp, 8
test eax, eax
je 0x406308
lea ecx, [ebp - 0x4b8]
call fcn.00405b40
lea eax, [ebp - 0x968]
push eax
lea ecx, [ebp - 0xbc0]
call fcn.00405c50
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 1
pop edi
pop esi
pop ebx
call fcn.004524fc
mov esp, ebp
pop ebp
ret