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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x372c
call fcn.0055bc20
mov eax, dword [0x5e2ec0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x3720], eax
mov eax, dword [ebp + 0xc]
mov esi, 0xfff
xor ebx, ebx
push esi
mov dword [ebp - 0x3718], eax
lea eax, [ebp - 0x1307]
push ebx
push eax
mov edi, ecx
mov byte [ebp - 0x1308], bl
call fcn.0055bfc0
add esp, 0xc
push 0x1403
lea eax, [ebp - 0x270f]
push ebx
push eax
mov byte [ebp - 0x2710], bl
call fcn.0055bfc0
add esp, 0xc
push esi
lea eax, [ebp - 0x370f]
push ebx
push eax
mov byte [ebp - 0x3710], bl
call fcn.0055bfc0
add esp, 0xc
push 0x2ff
lea eax, [ebp - 0x307]
push ebx
push eax
mov byte [ebp - 0x308], bl
call fcn.0055bfc0
add esp, 0xc
push ebx
lea eax, [ebp - 0x3718]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x3718]
push edi
call fcn.00443427
add esp, 0x14
test eax, eax
jne 0x402765
lea eax, [ebp - 0x2710]
push eax
push ebx
push ebx
push 0x8005
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea esi, [ebp - 0x1308]
call fcn.00404c8d
mov eax, esi
push eax
lea eax, [ebp - 0x2710]
push eax
lea eax, [ebp - 0x308]
push str._s_sdomains.log
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, 0x1000
push edi
mov eax, esi
push ebx
push eax
call fcn.0055bfc0
add esp, 0x1c
push 0x1404
lea eax, [ebp - 0x2710]
push ebx
push eax
call fcn.0055bfc0
add esp, 0xc
lea eax, [ebp - 0x308]
push eax
mov dword [ebp - 0x3728], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push ebx
test eax, eax
push 0x80
lea eax, [ebp - 0x308]
je 0x402575
push 3
push ebx
push ebx
push reloc.WS2_32.dll_connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push eax
mov dword [ebp - 0x3714], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea esi, [eax + 0x2800]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ebx
lea ecx, [ebp - 0x3728]
push ecx
push esi
push eax
push dword [ebp - 0x3714]
mov dword [ebp - 0x371c], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x40259e
push 1
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0x2800
push 0x40
mov dword [ebp - 0x3714], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x371c], eax
mov esi, dword [ebp - 0x3718]
jmp 0x402720
push 2
push esi
call fcn.00422eb7
cmp byte [eax], 0x31
pop ecx
pop ecx
mov dword [ebp - 0x3718], str.TRUE
je 0x4025cc
mov dword [ebp - 0x3718], str.FALSE
push 5
push esi
call fcn.00422df1
cmp eax, edi
pop ecx
pop ecx
mov dword [ebp - 0x3724], eax
jg 0x402720
push eax
push 5
push esi
call fcn.00422dcd
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x3710]
push eax
call fcn.0055bc50
add esp, 0xc
push dword [ebp - 0x3724]
lea edx, [ebp - 0x1308]
lea ecx, [ebp - 0x3710]
call fcn.0040358e
pop ecx
lea eax, [ebp - 0x1308]
push eax
push ecx
push 4
push esi
call fcn.00422eb7
add esp, 0xc
push eax
push 3
push esi
call fcn.00422eb7
pop ecx
pop ecx
push eax
push dword [ebp - 0x3718]
push 1
push esi
call fcn.00422eb7
pop ecx
pop ecx
push eax
push ecx
push ebx
push esi
call fcn.00422eb7
add esp, 0xc
push eax
lea eax, [ebp - 0x2710]
push str._s_tTRUE_t_s_t_s_t_s_t_s_t_s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
push ebx
lea eax, [ebp - 0x372c]
push eax
lea eax, [ebp - 0x2710]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x2710]
push eax
push dword [ebp - 0x3720]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [0x5e9a48]
cmp dword [ebp - 0x3714], 0xffffffff
je 0x4026e9
cmp dword [ebp - 0x371c], ebx
je 0x4026e9
push edi
lea eax, [ebp - 0x1308]
push ebx
push eax
call fcn.0055bfc0
add esp, 0xc
push ebx
push esi
call fcn.00422eb7
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x1308]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp - 0x371c]
lea ecx, [ebp - 0x1308]
push dword [ebp - 0x3714]
call fcn.00402313
pop ecx
pop ecx
push 0x1404
lea eax, [ebp - 0x2710]
push ebx
push eax
call fcn.0055bfc0
add esp, 0xc
push edi
lea eax, [ebp - 0x3710]
push ebx
push eax
call fcn.0055bfc0
add esp, 0xc
push edi
lea eax, [ebp - 0x1308]
push ebx
push eax
call fcn.0055bfc0
add esp, 0xc
push esi
call fcn.00422ae4
pop ecx
cmp eax, 0x64
je 0x4025a9
cmp dword [ebp - 0x3714], 0xffffffff
je 0x402745
push dword [ebp - 0x3714]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x371c], ebx
je 0x402759
push dword [ebp - 0x371c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call fcn.004222e8
xor eax, eax
pop ecx
inc eax
jmp 0x402767
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055a67a
leave
ret