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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5594c0
mov eax, dword fs:[0]
push eax
sub esp, 0x88c
mov eax, dword [0x5b4450]
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.005373f0
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x24e]
push ecx
mov word [ebp - 0x250], ax
call fcn.005373f0
xor edx, edx
push 0x32
push edx
lea eax, [ebp - 0x46]
push eax
mov word [ebp - 0x48], dx
call fcn.005373f0
push 0x208
lea ecx, [ebp - 0x660]
push 0
push ecx
mov dword [ebp - 4], 0
call fcn.005373f0
add esp, 0x30
lea esi, [ebp - 0x660]
call fcn.0040b210
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 [0x5ceb38], eax
test eax, eax
je 0x40b9da
xor edx, edx
div dword [0x5ceb34]
mov dword [0x5ceb38], edx
lea ecx, [ebp - 0x458]
call fcn.0040bcf0
test eax, eax
jne 0x40ba04
push 0x5a78ac
lea eax, [ebp - 0x888]
push eax
mov dword [ebp - 0x888], 0x80004005
call fcn.005372e6
mov ecx, dword [0x5ceb38]
push ecx
lea edx, [ebp - 0x458]
push edx
push str._sDebugLog__04d.txt
mov ecx, 0x104
lea ebx, [ebp - 0x250]
call fcn.0040ab70
add esp, 0xc
test eax, eax
jns 0x40ba49
push 0x5a78ac
lea eax, [ebp - 0x894]
push eax
mov dword [ebp - 0x894], 0x80004005
call fcn.005372e6
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 0x40ba90
push 0x5a78ac
lea edx, [ebp - 0x88c]
push edx
mov dword [ebp - 0x88c], 0x80004005
call fcn.005372e6
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 0x40bac4
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 [0x5ceb30], eax
jae 0x40bc12
push 0x200
lea edx, [ebp - 0x860]
push 0
push edx
call fcn.005373f0
mov eax, dword [0x5ceb38]
inc eax
xor edx, edx
div dword [0x5ceb34]
lea eax, [ebp - 0x860]
push edx
push 0x58aca4
push pe_nt_image_headers32
push eax
mov dword [0x5ceb38], edx
call fcn.00535c9d
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 0x40bb57
push 0x5a78ac
lea eax, [ebp - 0x884]
push eax
mov dword [ebp - 0x884], 0x80004005
call fcn.005372e6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x5ceb38]
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.0040ab70
add esp, 0xc
test eax, eax
jns 0x40bbad
push 0x5a78ac
lea eax, [ebp - 0x880]
push eax
mov dword [ebp - 0x880], 0x80004005
call fcn.005372e6
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 0x40bbf4
push 0x5a78ac
lea edx, [ebp - 0x890]
push edx
mov dword [ebp - 0x890], 0x80004005
call fcn.005372e6
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.0040ab70
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 0x58bac0
push esi
call edi
jmp 0x40bcc2
test esi, esi
je 0x40bccd
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.005337cb
mov esp, ebp
pop ebp
ret 8