Function at 0x4034e0
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.00452270
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 0x403928
lea edi, [ebp - 0x710]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x403537
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 0x403551
mov eax, dword [str.iGameDX]
mov ebx, 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 ebx
test eax, eax
jne 0x40358b
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 0x403928
push 0x257
lea eax, [ebp - 0x25f]
mov byte [ebp - 0x260], 0
push 0
push eax
call fcn.00452270
lea edi, [ebp - 0x260]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x4035c0
mov ax, word [0x482998]
mov edx, 0x6b054c
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x4035e0
lea edi, [ebp - 0x260]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4035f0
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 0x403610
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.00452270
lea edx, [ebp - 0x710]
add esp, 0xc
mov esi, edx
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x403650
lea edi, [ebp - 0x4b8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403660
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 0x403680
mov ax, word [0x482998]
mov edx, 0x6b0464
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x4036a0
lea edi, [ebp - 0x4b8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4036b0
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 0x6b1634
call fcn.00452270
lea edx, [ebp - 0x4b8]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4036e2
mov edi, 0x6b1634
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4036f1
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 0x403722
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 0x403928
push 0x257
lea eax, [ebp - 0x967]
mov byte [ebp - 0x968], 0
push 0
push eax
call fcn.00452270
lea edx, [ebp - 0x710]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x403758
lea edi, [ebp - 0x968]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403768
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 0x403785
mov ax, word [0x482998]
mov edx, 0x6b0464
mov word [edi], ax
mov esi, edx
nop
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
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 0x4037d0
lea edi, [ebp - 0x968]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4037e0
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.00452270
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.00452270
lea ebx, [ebp - 0x4b8]
add esp, 0xc
mov esi, ebx
mov al, byte [ebx]
inc ebx
test al, al
jne 0x403842
mov edx, 0x4a8890
sub ebx, esi
lea edi, [edx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403853
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 0x403870
mov ax, word [0x482998]
dec edx
mov word [edi], ax
mov al, byte [edx + 1]
lea edx, [edx + 1]
test al, al
jne 0x403884
cmp dword [0x6b0460], 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 0x40393b
push 0x257
lea eax, [ebp - 0x25f]
mov byte [ebp - 0x260], 0
push 0
push eax
call fcn.00452270
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.00457750
add esp, 8
test eax, eax
je 0x40390c
lea eax, [ebp - 0x260]
push 0x5c
push eax
call fcn.00457750
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.00451570
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x968]
push eax
lea eax, [ebp - 0xbc0]
push eax
call fcn.004572e3
add esp, 8
test eax, eax
je 0x403928
lea ecx, [ebp - 0x4b8]
call fcn.00403160
lea eax, [ebp - 0x968]
push eax
lea ecx, [ebp - 0xbc0]
call fcn.00403270
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 1
pop edi
pop esi
pop ebx
call fcn.00451570
mov esp, ebp
pop ebp
ret