Function at 0x40337e
Capabilities:
Check if file exists

Disassembly:
push 0x174
mov eax, 0x43fc8a
call fcn.004253f8
mov esi, ecx
call fcn.0043d560
push eax
lea ecx, [ebp - 0x134]
call fcn.00402597
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [esi + 0xa4], ebx
je 0x4037e5
call fcn.0043d800
push eax
lea ecx, [esi + 0xa8]
call fcn.00407c83
test eax, eax
jne 0x4037e5
call fcn.0043dae0
push eax
lea ecx, [ebp - 0x130]
call fcn.00402597
mov byte [ebp - 4], 1
cmp byte [esi + 0x9d], bl
je 0x403424
lea edi, [esi + 0xa0]
mov eax, dword [edi]
push dword [eax - 0xc]
mov ecx, edi
call fcn.00401d13
lea ecx, [ebp - 0x118]
mov dl, byte [eax]
inc eax
mov byte [ecx], dl
inc ecx
test dl, dl
jne 0x4033ff
push 0xffffffffffffffff
mov ecx, edi
call fcn.00408d89
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x130]
call fcn.00402715
push str.config_
lea ecx, [ebp - 0x130]
call fcn.00402367
add esi, 0xac
push esi
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x150], esi
call fcn.00408cb1
push str..
lea ecx, [ebp - 0x138]
mov byte [ebp - 4], 2
call fcn.00402367
lea ecx, [ebp - 0x168]
call fcn.0041bc36
mov byte [ebp - 4], 3
mov eax, dword [0x455c10]
push dword [eax*4 + 0x452ac8]
lea ecx, [ebp - 0x128]
call fcn.00402597
push ebx
mov byte [ebp - 4], 4
push dword [ebp - 0x138]
lea ecx, [ebp - 0x168]
call fcn.0041bccb
cmp eax, ebx
je 0x40375c
mov ebx, 0x446580
lea ecx, [ebp - 0x168]
call fcn.0041b93a
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0x168]
call fcn.0041bf05
push ebx
push str._amend.dat
lea eax, [ebp - 0x120]
push eax
mov byte [ebp - 4], 5
call fcn.00407478
test eax, eax
je 0x40373d
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x14c]
push eax
call fcn.00407821
add esp, 0xc
push eax
lea ecx, [ebp - 0x120]
mov byte [ebp - 4], 6
call fcn.00408d3c
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x14c]
add ecx, 0xfffffff0
call fcn.00401c0b
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0x12c]
call fcn.00408cb1
push 0x446a78
push ebx
lea eax, [ebp - 0x12c]
push eax
mov byte [ebp - 4], 7
call fcn.00407478
lea eax, [ebp - 0x13c]
push eax
lea ecx, [ebp - 0x168]
call fcn.0041be79
lea ecx, [ebp - 0x180]
mov byte [ebp - 4], 8
call fcn.0041bc36
push 0
mov byte [ebp - 4], 9
push dword [ebp - 0x12c]
lea ecx, [ebp - 0x180]
call fcn.0041bccb
test eax, eax
je 0x403707
push str._ncstudio.fmt
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x124]
push eax
call fcn.00407878
add esp, 0xc
mov byte [ebp - 4], 0xa
push dword [ebp - 0x124]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x4035e1
call fcn.0043dae0
push eax
lea ecx, [ebp - 0x124]
call fcn.00402715
push str.ncstudio.fmt
lea ecx, [ebp - 0x124]
call fcn.00402367
push dword [ebp - 0x124]
mov ecx, dword [ebp - 0x120]
push dword [ebp - 0x13c]
call fcn.004063c7
pop ecx
pop ecx
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0x11c]
call fcn.00408cb1
mov byte [ebp - 4], 0xb
push 0x5c
push dword [ebp - 0x11c]
call fcn.004226bd
pop ecx
pop ecx
test eax, eax
jne 0x403628
or eax, 0xffffffff
jmp 0x40362e
sub eax, dword [ebp - 0x11c]
push eax
lea eax, [ebp - 0x144]
push eax
lea ecx, [ebp - 0x11c]
call fcn.004077e3
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 0xc
call fcn.00408d3c
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x144]
add ecx, 0xfffffff0
call fcn.00401c0b
mov esi, dword [ebp - 0x11c]
push 0x5c
push esi
call fcn.004226bd
pop ecx
pop ecx
test eax, eax
jne 0x40367c
or ecx, 0xffffffff
jmp 0x403680
sub eax, esi
mov ecx, eax
mov eax, dword [esi - 0xc]
sub eax, ecx
push eax
lea eax, [ebp - 0x148]
push eax
lea ecx, [ebp - 0x11c]
call fcn.0040779d
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 0xd
call fcn.00408d3c
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x148]
add ecx, 0xfffffff0
call fcn.00401c0b
lea edi, [ebp - 0x11c]
call fcn.0040772b
mov esi, dword [ebp - 0x11c]
push dword [esi - 0xc]
lea ecx, [ebp - 0x128]
push esi
call fcn.0040239f
push 0xa
lea ecx, [ebp - 0x128]
call fcn.00408c77
lea ecx, [esi - 0x10]
call fcn.00401c0b
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x124]
add ecx, 0xfffffff0
call fcn.00401c0b
mov esi, dword [ebp - 0x150]
lea ecx, [ebp - 0x180]
call fcn.0041b854
lea ecx, [ebp - 0x180]
mov byte [ebp - 4], 8
call fcn.0041bc5c
mov ecx, dword [ebp - 0x13c]
add ecx, 0xfffffff0
call fcn.00401c0b
mov ecx, dword [ebp - 0x12c]
add ecx, 0xfffffff0
call fcn.00401c0b
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x120]
add ecx, 0xfffffff0
call fcn.00401c0b
cmp dword [ebp - 0x140], 0
jne 0x4034a9
lea ecx, [ebp - 0x168]
call fcn.0041b854
push 0x4465b8
call fcn.0040230c
pop ecx
push dword [esi]
call fcn.0043d000
mov eax, dword [0x455c10]
pop ecx
push dword [eax*4 + 0x452ac8]
lea ecx, [ebp - 0x128]
call fcn.00407c83
test eax, eax
je 0x4037ac
mov eax, dword [0x455c10]
push dword [eax*4 + 0x452ac0]
lea ecx, [ebp - 0x128]
call fcn.00402367
mov ecx, dword [ebp - 0x128]
add ecx, 0xfffffff0
call fcn.00401c0b
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 2
call fcn.0041bc5c
mov ecx, dword [ebp - 0x138]
add ecx, 0xfffffff0
call fcn.00401c0b
mov ecx, dword [ebp - 0x130]
add ecx, 0xfffffff0
call fcn.00401c0b
mov ecx, dword [ebp - 0x134]
add ecx, 0xfffffff0
call fcn.00401c0b
call fcn.0042547b
ret