Function at 0x401da0
Capabilities:
Get file size
Read .ini file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x562bf0
mov eax, dword fs:[0]
push eax
sub esp, 0x88c
mov eax, dword [0x5c0490]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x456]
push edx
mov dword [ebp - 0x898], eax
mov dword [ebp - 0x878], 4
mov dword [ebp - 0x87c], 0xffffffff
mov word [ebp - 0x458], cx
call fcn.00541d20
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x24e]
push ecx
mov word [ebp - 0x250], ax
call fcn.00541d20
xor edx, edx
push 0x32
push edx
lea eax, [ebp - 0x46]
push eax
mov word [ebp - 0x48], dx
call fcn.00541d20
push 0x208
lea ecx, [ebp - 0x660]
push 0
push ecx
mov dword [ebp - 4], 0
call fcn.00541d20
add esp, 0x30
lea esi, [ebp - 0x660]
call fcn.004016e0
mov edx, esi
push edx
push 0
push str.LOG_USEFILE_CURCOUNT
push str.Debug_Info
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [0x5ddd98], eax
test eax, eax
je 0x401e8a
xor edx, edx
div dword [0x5ddd94]
mov dword [0x5ddd98], edx
lea ecx, [ebp - 0x458]
call fcn.004021a0
test eax, eax
jne 0x401eb4
push 0x5b25ec
lea eax, [ebp - 0x888]
push eax
mov dword [ebp - 0x888], 0x80004005
call fcn.005406c6
mov ecx, dword [0x5ddd98]
push ecx
lea edx, [ebp - 0x458]
push edx
push str._sDebugLog__04d.txt
mov ecx, 0x104
lea ebx, [ebp - 0x250]
call fcn.00401090
add esp, 0xc
test eax, eax
jns 0x401ef9
push 0x5b25ec
lea eax, [ebp - 0x894]
push eax
mov dword [ebp - 0x894], 0x80004005
call fcn.005406c6
push 0
push 0x80
push 4
push 0
push 2
push 0x40000000
lea ecx, [ebp - 0x250]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x87c], esi
cmp esi, 0xffffffff
jne 0x401f40
push 0x5b25ec
lea edx, [ebp - 0x88c]
push edx
mov dword [ebp - 0x88c], 0x80004005
call fcn.005406c6
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401f74
push eax
lea eax, [ebp - 0x878]
push eax
push 2
lea ecx, [ebp - 0x874]
push ecx
push esi
mov word [ebp - 0x874], 0xfeff
call edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [0x5ddd90], eax
jae 0x4020c2
push 0x200
lea edx, [ebp - 0x860]
push 0
push edx
call fcn.00541d20
mov eax, dword [0x5ddd98]
inc eax
xor edx, edx
div dword [0x5ddd94]
lea eax, [ebp - 0x860]
push edx
push 0x5949e4
push pe_nt_image_headers32
push eax
mov dword [0x5ddd98], edx
call fcn.0053ca82
add esp, 0x1c
lea ecx, [ebp - 0x660]
push ecx
lea edx, [ebp - 0x860]
push edx
push str.LOG_USEFILE_CURCOUNT
push str.Debug_Info
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
je 0x402007
push 0x5b25ec
lea eax, [ebp - 0x884]
push eax
mov dword [ebp - 0x884], 0x80004005
call fcn.005406c6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x5ddd98]
push ecx
lea edx, [ebp - 0x458]
push edx
push str._sDebugLog__04d.txt
mov ecx, 0x104
lea ebx, [ebp - 0x250]
mov dword [ebp - 0x87c], 0xffffffff
call fcn.00401090
add esp, 0xc
test eax, eax
jns 0x40205d
push 0x5b25ec
lea eax, [ebp - 0x880]
push eax
mov dword [ebp - 0x880], 0x80004005
call fcn.005406c6
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
lea ecx, [ebp - 0x250]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x87c], esi
cmp esi, 0xffffffff
jne 0x4020a4
push 0x5b25ec
lea edx, [ebp - 0x890]
push edx
mov dword [ebp - 0x890], 0x80004005
call fcn.005406c6
push 0
lea eax, [ebp - 0x878]
push eax
push 2
lea ecx, [ebp - 0x874]
push ecx
push esi
mov word [ebp - 0x874], 0xfeff
call edi
lea edx, [ebp - 0x870]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x862]
movzx ecx, word [ebp - 0x864]
movzx edx, word [ebp - 0x866]
push eax
movzx eax, word [ebp - 0x868]
push ecx
movzx ecx, word [ebp - 0x86a]
push edx
movzx edx, word [ebp - 0x86e]
push eax
movzx eax, word [ebp - 0x870]
push ecx
push edx
push eax
push str._04d__02d__02d__02d:_02d:_02d:_04d
mov ecx, 0x1a
lea ebx, [ebp - 0x48]
call fcn.00401090
add esp, 0x20
push 0
lea ecx, [ebp - 0x878]
push ecx
push 0x32
mov edx, ebx
push edx
push esi
mov dword [ebp - 0x878], 0
call edi
mov ecx, dword [ebp + 0xc]
push 0
lea eax, [ebp - 0x878]
push eax
mov eax, dword [ebp - 0x898]
lea edx, [ecx + ecx]
push edx
push eax
push esi
call edi
push 0
lea ecx, [ebp - 0x878]
push ecx
push 2
push 0x594d20
push esi
call edi
jmp 0x402172
test esi, esi
je 0x40217d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0053ca73
mov esp, ebp
pop ebp
ret 8