Function at 0x4094b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x38]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x4094db
mov eax, 3
jmp 0x4096a1
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x38]
add ecx, 4
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x409514
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x38]
call fcn.00409380
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x409514
mov eax, dword [ebp - 0xc]
jmp 0x4096a1
mov dword [ebp - 8], 0
mov edx, dword [ebp + 0x14]
movzx eax, byte [edx]
test eax, eax
je 0x409672
cmp dword [ebp - 4], 0
je 0x409672
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x38]
call fcn.00409230
test eax, eax
jne 0x409562
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x409653
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00401000
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40959e
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
push ecx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
jmp 0x4096a1
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x24]
lea ecx, [eax + eax + 2]
mov dword [ebp - 0x1c], ecx
xor ecx, ecx
mov eax, dword [ebp - 0x1c]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
add esp, 4
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call fcn.004063a0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call fcn.004063f0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call fcn.004063f0
mov ecx, dword [ebp - 0x38]
add ecx, 4
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
push eax
push 0x40e4fc
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
push edx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
push ecx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
jmp 0x409670
mov edx, dword [ebp - 0x38]
add edx, 4
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0x40e50c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov dword [ebp - 8], eax
jmp 0x40968f
mov edx, dword [ebp - 0x38]
add edx, 4
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0x40e51c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40969e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 0x10