Function at 0x401ed0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x44178b
mov eax, dword fs:[0]
push eax
sub esp, 0x438
mov eax, dword [0x456600]
xor eax, esp
mov dword [esp + 0x430], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x456600]
xor eax, esp
push eax
lea eax, [esp + 0x44c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x45c]
mov esi, edx
xor edx, edx
push 0x206
mov dword [esp + 0x24], eax
push edx
lea eax, [esp + 0x3e]
push eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], ecx
mov word [esp + 0x40], dx
call fcn.0042e640
push esi
lea ecx, [esp + 0x44]
push 0x104
push ecx
call fcn.0042c4ff
mov esi, dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
add esp, 0x18
lea edx, [esp + 0x34]
push edx
call esi
mov ebp, dword [sym.imp.SHLWAPI.dll_StrCatW]
push str.GamePatch
lea eax, [esp + 0x38]
push eax
call ebp
lea ecx, [esp + 0x34]
push ecx
call esi
push str.reg.cfg
lea edx, [esp + 0x38]
push edx
call ebp
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4021fc
push 0x10
call fcn.0040fe58
add esp, 4
mov dword [esp + 0x2c], eax
mov dword [esp + 0x454], 0
test eax, eax
je 0x401fb7
mov ecx, eax
call fcn.004107e7
mov esi, eax
jmp 0x401fb9
xor esi, esi
push 0
mov dword [esp + 0x458], 0xffffffff
mov edx, dword [esi]
mov edx, dword [edx + 0x20]
push 0x10
lea eax, [esp + 0x3c]
push eax
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x30]
mov ecx, esi
call edx
mov edi, eax
mov dword [esp + 0x30], edx
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040fe92
add esp, 4
mov ebx, eax
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
push edi
push ebx
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 4]
push 1
mov ecx, esi
call edx
push ebx
lea ecx, [esp + 0x20]
call fcn.004050b0
mov dword [esp + 0x454], 1
test ebx, ebx
je 0x402044
push ebx
call fcn.0040fe87
add esp, 4
push str.gamepath
lea ecx, [esp + 0x1c]
call fcn.004050b0
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x458], 2
call fcn.004050b0
push 0x449138
push 0x448f18
lea ecx, [esp + 0x1c]
push ecx
mov byte [esp + 0x460], 3
call fcn.004040d0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.004040d0
mov edx, dword [esp + 0x18]
mov edx, dword [edx - 0xc]
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx - 0xc]
sub ecx, edx
imul ecx, eax
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x246]
push eax
lea ebx, [edi + ecx*2]
mov word [esp + 0x248], dx
call fcn.0042e640
mov ecx, dword [esp + 0x2c]
add esp, 0xc
lea edi, [esp + 0x23c]
call fcn.00401000
mov ecx, edi
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov edx, dword [esp + 0x28]
push edx
mov eax, edi
push eax
call ebp
push 0x449140
mov ecx, edi
push ecx
call ebp
push 0x10
call fcn.0040fe58
add esp, 4
mov dword [esp + 0x2c], eax
mov byte [esp + 0x454], 4
test eax, eax
je 0x402120
mov ecx, eax
call fcn.004107e7
mov esi, eax
jmp 0x402122
xor esi, esi
push 0
mov byte [esp + 0x458], 3
mov edx, dword [esi]
mov edx, dword [edx + 0x20]
push 0x1001
lea eax, [esp + 0x244]
push eax
mov ecx, esi
call edx
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi]
mov edx, dword [eax + 0x38]
push ebx
push ecx
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 4]
push 1
mov ecx, esi
call edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x240]
push eax
push str.Convert_succeed:
call fcn.0040b6a0
mov byte [esp + 0x460], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4021a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x454], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4021d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x454], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4021fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x44c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x430]
xor ecx, esp
call fcn.0042c4f0
add esp, 0x444
ret 4