Function at 0x40104f
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
nop
mov eax, str.bin_emulators_Arcade.cfg
mov dword [ebp - 4], eax
mov eax, str._Generated_by_Attract_Mode_v2.6.2
mov dword [ebp - 0x30], eax
mov eax, 0x40203c
mov dword [ebp - 0x2c], eax
mov eax, str.executable___bin_retroarch_retroarch.exe__f
mov dword [ebp - 0x28], eax
mov eax, str.args__________L_bin_retroarchcoresmame2003_plus_libretro.dll__romfilename_
mov dword [ebp - 0x24], eax
mov eax, 0x4020b7
mov dword [ebp - 0x20], eax
mov eax, str.rompath______bin_retroarchROMS_
mov dword [ebp - 0x1c], eax
mov eax, str.romext_______.zip_.7z_nsystem_______Arcade
mov dword [ebp - 0x18], eax
mov eax, str.artwork______flyer_____bin_retroarchROMS_snap
mov dword [ebp - 0x14], eax
mov eax, str.artwork______marquee___bin_retroarchROMSmarquee
mov dword [ebp - 0x10], eax
mov eax, str.artwork______snap______bin_retroarchROMS_snap
mov dword [ebp - 0xc], eax
mov eax, str.artwork______wheel_____bin_retroarchROMSwheel
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
push eax
call section..text
add esp, 4
cmp eax, 0
je 0x4010d8
mov eax, 0
jmp 0x401293
mov eax, 0x4021c4
push eax
mov eax, dword [ebp - 4]
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
cmp eax, 0
jne 0x401103
mov eax, 1
jmp 0x401293
mov eax, 0
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
cmp eax, 0xb
jge 0x401185
jmp 0x401127
mov eax, dword [ebp - 0x34]
mov ecx, eax
inc eax
mov dword [ebp - 0x34], eax
jmp 0x40110b
mov eax, dword [ebp - 0x34]
cmp eax, 4
jne 0x401163
lea eax, [ebp - 0x13c]
push eax
mov eax, 0x104
push eax
call sub.kernel32.dll_GetCurrentDirectoryA
lea eax, [ebp - 0x13c]
push eax
mov eax, str.workdir_______s_n
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.msvcrt.dll_fprintf
add esp, 0xc
jmp 0x401183
mov eax, dword [ebp - 0x34]
shl eax, 2
lea ecx, [ebp - 0x30]
add ecx, eax
mov eax, dword [ecx]
push eax
mov eax, 0x4021d7
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.msvcrt.dll_fprintf
add esp, 0xc
jmp 0x40111c
mov eax, dword [ebp - 0x38]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, str.shell32.dll
push eax
call sub.kernel32.dll_LoadLibraryA
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x140]
cmp eax, 0
je 0x401284
mov eax, str.ShellExecuteA
push eax
mov eax, dword [ebp - 0x140]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x144]
cmp eax, 0
je 0x401269
lea eax, [ebp - 0x248]
push eax
mov eax, 0x104
push eax
call sub.kernel32.dll_GetCurrentDirectoryA
mov eax, 0x4021f5
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
cmp eax, 0
je 0x40125a
mov eax, 1
push eax
mov eax, 0
push eax
mov eax, 0
push eax
mov eax, str.attract.exe
push eax
mov eax, str.open
push eax
mov eax, 0
push eax
mov eax, dword [ebp - 0x144]
call eax
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp - 0x24c]
cmp eax, 0x20
jg 0x401249
mov eax, 1
jmp 0x401293
lea eax, [ebp - 0x248]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
jmp 0x401264
mov eax, 1
jmp 0x401293
jmp 0x401273
mov eax, 1
jmp 0x401293
mov eax, dword [ebp - 0x140]
push eax
call sub.kernel32.dll_FreeLibrary
jmp 0x40128e
mov eax, 1
jmp 0x401293
mov eax, 0
leave
ret