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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc4
mov eax, dword [0x4a4300]
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.004523e0
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 0x4038f8
lea edi, [ebp - 0x710]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x4034f7
mov ax, word [0x482998]
lea ecx, [ebp - 0x710]
mov word [edi], ax
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x403511
mov eax, dword [str.iGameDX]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov dword [ecx], eax
mov eax, dword [0x4829a0]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x710]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40354e
push 0
lea eax, [ebp - 0x710]
push eax
call ebx
lea eax, [ebp - 0x710]
push eax
call esi
test eax, eax
je 0x4038f8
push 0x257
lea eax, [ebp - 0x25f]
mov byte [ebp - 0x260], 0
push 0
push eax
call fcn.004523e0
lea edi, [ebp - 0x260]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x403583
mov ax, word [0x482998]
mov edx, 0x6b07ac
mov word [edi], ax
mov esi, edx
lea ecx, [ecx]
mov al, byte [edx]
inc edx
test al, al
jne 0x4035a0
lea edi, [ebp - 0x260]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4035b0
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 0x4035d0
mov eax, dword [str..exe]
mov dword [ecx], eax
mov al, byte [0x4829a8]
push 0x257
mov byte [ecx + 4], al
lea eax, [ebp - 0x4b7]
push 0
push eax
mov byte [ebp - 0x4b8], 0
call fcn.004523e0
lea edx, [ebp - 0x710]
add esp, 0xc
mov esi, edx
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x403610
lea edi, [ebp - 0x4b8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403620
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 0x403640
mov ax, word [0x482998]
mov edx, 0x6b06c4
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x403660
lea edi, [ebp - 0x4b8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403670
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 0x6b1894
call fcn.004523e0
lea edx, [ebp - 0x4b8]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4036a2
mov edi, 0x6b1894
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4036b1
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]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push eax
call esi
test eax, eax
jne 0x4036e4
push eax
lea eax, [ebp - 0x4b8]
push eax
call ebx
lea eax, [ebp - 0x4b8]
push eax
call esi
test eax, eax
je 0x4038f8
push 0x257
lea eax, [ebp - 0x967]
mov byte [ebp - 0x968], 0
push 0
push eax
call fcn.004523e0
lea edx, [ebp - 0x710]
add esp, 0xc
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x403720
lea edi, [ebp - 0x968]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403730
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
lea ecx, [ecx]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x403750
mov ax, word [0x482998]
mov edx, 0x6b06c4
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x403770
lea edi, [ebp - 0x968]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403780
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 0x4037a0
lea edi, [ebp - 0x968]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4037b0
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.004523e0
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 0x4a8890
call fcn.004523e0
lea ebx, [ebp - 0x4b8]
add esp, 0xc
mov esi, ebx
mov al, byte [ebx]
inc ebx
test al, al
jne 0x403812
mov edx, 0x4a8890
sub ebx, esi
lea edi, [edx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403823
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 0x403840
mov ax, word [0x482998]
dec edx
mov word [edi], ax
mov al, byte [edx + 1]
lea edx, [edx + 1]
test al, al
jne 0x403854
cmp dword [0x6b06c0], 1
mov eax, dword [str.iGameDX.ini]
mov dword [edx], eax
mov eax, dword [0x4829b0]
mov dword [edx + 4], eax
mov eax, dword [0x4829b4]
mov dword [edx + 8], eax
jne 0x40390b
push 0x257
lea eax, [ebp - 0x25f]
mov byte [ebp - 0x260], 0
push 0
push eax
call fcn.004523e0
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.004578c0
add esp, 8
test eax, eax
je 0x4038dc
lea eax, [ebp - 0x260]
push 0x5c
push eax
call fcn.004578c0
add esp, 8
mov byte [eax], 0
push 0x4a8890
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.004516e1
mov esp, ebp
pop ebp
ret
push 0x4a8890
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x403925
lea ecx, [ebp - 0x4b8]
call fcn.00403120
lea eax, [ebp - 0x968]
push eax
lea eax, [ebp - 0xbc0]
push eax
call fcn.00457453
add esp, 8
test eax, eax
je 0x4038f8
lea eax, [ebp - 0x968]
push eax
lea ecx, [ebp - 0xbc0]
call fcn.00403230
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 1
pop edi
pop esi
pop ebx
call fcn.004516e1
mov esp, ebp
pop ebp
ret