Function at 0x408520
Capabilities:
Create directory
Delete file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [0x45c040]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [0x45e368]
push ebx
push esi
push edi
mov edi, dword [0x45f698]
mov dword [ebp - 0x278], eax
mov eax, dword [0x45eb4c]
push 0x208
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x214]
push 0
push eax
call fcn.0041f350
add esp, 0xc
lea eax, [ebp - 0x214]
push 0x45e8f0
push str._sCredentialsNew.ini
push 0xffffffffffffffff
push 0x104
push eax
call fcn.00401640
add esp, 0x14
push 0
push 0x45e8f0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4085b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
nop
cmp eax, 0xb7
jne 0x4089ae
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 1
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x270], ebx
cmp ebx, 0xffffffff
je 0x4089ae
push 0x2002
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x20a
call fcn.0041b556
add esp, 4
mov esi, eax
mov dword [ebp - 0x274], esi
push 0x208
push 0
push esi
call fcn.0041f350
add esp, 0xc
mov byte [esi + 0x208], 0
lea eax, [ebp - 0x214]
push eax
push 0x104
push esi
call fcn.00429d55
add esp, 0xc
test eax, eax
jne 0x40864b
mov byte [esi + 0x208], 1
cmp byte [esi + 0x208], 0
je 0x4086f8
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x80
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x274], eax
test eax, eax
je 0x4086f8
push eax
call fcn.0041b33f
add esp, 4
mov dword [ebp - 0x26c], eax
push dword [ebp - 0x274]
push 0
push eax
call fcn.0041f350
add esp, 0xc
push 0
push 0
push dword [ebp - 0x274]
push dword [ebp - 0x26c]
push 0xffffffffffffffff
push esi
push 0x80
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push dword ds:[ebp - 0x26c]
push dword [ebp - 0x278]
push dword [ebp - 0x25c]
push str.Steam
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push dword [ebp - 0x26c]
test eax, eax
jne 0x40870f
call fcn.0041b33a
add esp, 4
push 0x20a
push esi
mov byte [esi + 0x208], 0
call fcn.0041b836
add esp, 8
jmp 0x40874e
call fcn.0041b33a
add esp, 4
mov byte [esi + 0x208], 0
push 0x20a
push esi
call fcn.0041b836
push 0x34
lea eax, [ebp - 0x250]
push 0
push eax
call fcn.0041f350
add esp, 0x14
lea eax, [ebp - 0x250]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x408779
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, ds:[ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041b32c
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x228], 1
jne 0x408987
mov esi, dword [ebp - 0x22c]
test esi, esi
je 0x408987
cmp dword ds:[ebp - 0x230], 0
jne 0x408987
push esi
call fcn.0041b33f
add esp, 4
mov ebx, eax
push esi
push 0
push ebx
call fcn.0041f350
mov esi, dword ds:[ebp - 0x270]
lea eax, [ebp - 0x218]
add esp, 0xc
mov dword [ebp - 0x218], 0
push 0
push eax
push dword [ebp - 0x22c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x408981
mov eax, dword ds:[ebp - 0x22c]
nop dword [eax]
cmp dword [ebp - 0x218], eax
jne 0x408981
mov ecx, edi
mov dword [ebp - 0x264], ebx
xorps xmm0, xmm0
mov dword [ebp - 0x268], eax
movlpd qword [ebp - 0x258], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408828
sub ecx, edx
je 0x4088bc
mov dword [ebp - 0x25c], edi
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x408840
sub edi, ecx
lea eax, [edi + 1]
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x258]
push eax
push 1
push 0
push 0
lea eax, [ebp - 0x260]
push eax
mov esi, dword [0x45eaf8]
lea eax, [ebp - 0x268]
push 0
push eax
mov ecx, esi
call dword [0x442244]
call esi
nop
test eax, eax
jne 0x4088cd
push dword [ebp - 0x270]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x22c]
push 0
push ebx
call fcn.00440bb0
add esp, 0xc
push ebx
call fcn.0041b33a
add esp, 4
jmp 0x40899b
lea eax, [ebp - 0x258]
push eax
push 1
push 0
push 0
push 0
jmp 0x408866
mov edi, dword ds:[ebp - 0x270]
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0
push eax
push dword [ebp - 0x258]
push dword [ebp - 0x254]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword ds:[ebp - 0x22c]
push 0
push ebx
call fcn.00440bb0
add esp, 0xc
push dword [ebp - 0x258]
push 0
push dword [ebp - 0x254]
call fcn.00440bb0
add esp, 0xc
lea eax, [ebp - 0x250]
push 0x34
push 0
push eax
call fcn.00440bb0
add esp, 0xc
push ebx
call fcn.0041b33a
add esp, 4
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x408755
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041b32c
mov esp, ebp
pop ebp
ret
push esi
jmp 0x40888a
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x34
lea eax, [ebp - 0x250]
push 0
push eax
call fcn.00440bb0
add esp, 0xc
mov ecx, dword [ebp - 8]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041b32c
mov esp, ebp
pop ebp
ret