Function at 0x401880
Capabilities:
Check if file exists
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41feea
mov eax, dword fs:[0]
push eax
sub esp, 0x524
mov eax, dword [0x4282d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x530], eax
xor ebx, ebx
push 0x103
lea ecx, [ebp - 0x113]
push ebx
mov dword [ebp - 4], ebx
push ecx
mov byte [ebp - 0x114], bl
call fcn.00410020
add esp, 0xc
push ebx
push 0x1c
lea edx, [ebp - 0x114]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x51c], eax
lea eax, [ebp - 0x114]
mov byte [ebp - 4], 1
test eax, 0xffff0000
jne 0x401933
mov ecx, eax
movzx esi, cx
push esi
call fcn.00402bb0
add esp, 4
cmp eax, ebx
je 0x40195b
push eax
mov eax, esi
lea edi, [ebp - 0x51c]
call fcn.004026d0
jmp 0x40195b
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401940
sub eax, edx
lea edx, [ebp - 0x114]
push edx
lea ebx, [ebp - 0x51c]
call fcn.004024d0
push str.GoogleChromeUser_DataDefaultPreferences
mov eax, 0x2c
lea ebx, [ebp - 0x51c]
mov byte [ebp - 4], 2
call fcn.00402310
mov edi, dword [ebp - 0x51c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401c24
cmp dword [edi - 4], 1
jle 0x4019a1
mov eax, dword [edi - 0xc]
push eax
mov ecx, ebx
push ecx
call fcn.004023d0
mov edi, dword [ebp - 0x51c]
push 0x4238b0
push edi
call fcn.0040d657
mov esi, eax
mov eax, dword [edi - 8]
push eax
push edi
call fcn.0040dc2b
xor ebx, ebx
add esp, 0x10
cmp eax, ebx
jl 0x401c86
cmp eax, dword [edi - 8]
jg 0x401c86
mov dword [edi - 0xc], eax
mov byte [eax + edi], bl
cmp esi, ebx
je 0x401c24
push 0x400
lea edx, [ebp - 0x517]
push ebx
push edx
mov byte [ebp - 0x518], bl
call fcn.00410020
add esp, 0xc
lea eax, [ebp - 0x528]
push eax
mov ecx, 0x4238b2
call fcn.00401ca0
lea ecx, [ebp - 0x520]
push ecx
mov ecx, 0x4238b2
mov byte [ebp - 4], 3
call fcn.00401ca0
push esi
push 0x400
lea edx, [ebp - 0x518]
push 1
mov byte [ebp - 4], 4
push edx
mov dword [ebp - 0x52c], ebx
call fcn.0040d8b8
add esp, 0x10
cmp eax, ebx
jle 0x401a99
lea eax, [ebp - 0x518]
lea edx, [eax + 1]
jmp 0x401a50
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401a50
lea ecx, [ebp - 0x518]
sub eax, edx
push ecx
lea ebx, [ebp - 0x528]
call fcn.00402310
push 0x401
lea edx, [ebp - 0x518]
push 0
push edx
call fcn.00410020
push esi
push 0x400
lea eax, [ebp - 0x518]
push 1
push eax
call fcn.0040d8b8
add esp, 0x1c
test eax, eax
jg 0x401a42
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x52c]
push ecx
lea edx, [ebp - 0x528]
push edx
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x524], esp
mov edi, esp
call fcn.004025e0
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x524]
push eax
call section..text
add esp, 0x10
mov byte [ebp - 4], 5
mov ecx, dword [eax]
mov eax, dword [ecx - 0xc]
push ecx
lea ebx, [ebp - 0x520]
call fcn.00402310
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x524]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401b0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call fcn.0040d942
mov ebx, 1
add esp, 4
cmp dword [ebp - 0x52c], ebx
jne 0x401bd2
lea ecx, [ebp - 0x524]
push ecx
mov ecx, 0x4238b4
call fcn.00401fe0
mov edx, dword [ebp - 0x530]
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x51c]
mov dword [edx], ebx
cmp dword [eax - 4], ebx
jle 0x401b62
mov eax, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x51c]
push ecx
call fcn.004023d0
mov eax, dword [ebp - 0x51c]
push 0x4238e0
push eax
call fcn.0040d657
mov esi, eax
add esp, 8
test esi, esi
je 0x401ba3
mov eax, dword [ebp - 0x520]
mov edi, dword [eax - 0xc]
cmp dword [eax - 4], ebx
jle 0x401b97
push edi
lea eax, [ebp - 0x520]
push eax
call fcn.004023d0
mov eax, dword [ebp - 0x520]
push esi
push edi
push ebx
push eax
call fcn.0040db0d
add esp, 0x10
push esi
call fcn.0040d942
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x524]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401bd2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x520]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401bf8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x528]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401c1e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x51c]
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401c44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401c6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040d58c
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00402e70
int3