Function at 0x40cf3d
Capabilities:
Read .ini file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa20
push ebx
push esi
push edi
mov ebx, 0x4fa908
push ebx
push 1
mov edi, str.ReportsMessageBox
push edi
mov esi, 0x44e6b4
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push ebx
push eax
push edi
push esi
mov dword [ebp - 0x1c], eax
call fcn.00426878
push str.stdout
push dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40cfce
call fcn.0040cb20
push eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 1
call dword [sym.imp.KERNEL32.dll_GetFileType]
dec eax
dec eax
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x1c], esi
cmp eax, esi
je 0x40d037
push dword [0x4fd62c]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push dword [0x4fd62c]
push dword [ebp - 4]
call fcn.0040caa0
jmp 0x40d18a
push esi
push esi
push 2
push esi
push 3
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x40d037
push dword [0x4fb1c0]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x40d030
call fcn.0044394a
push eax
lea eax, [ebp - 0x220]
push str._s_writing_report_file
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x30
push 0x44e65c
lea eax, [ebp - 0x220]
push eax
push dword [0x4fb1c0]
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x40d18d
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push dword [0x4fd62c]
mov ebx, 0xfde9
push esi
push ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], esi
mov byte [ebp - 0xc], 0xef
mov byte [ebp - 0xb], 0xbb
mov byte [ebp - 0xa], 0xbf
call edi
cmp eax, esi
mov dword [ebp - 0x20], eax
jle 0x40d0ce
push eax
call fcn.0043ff54
pop ecx
push esi
push esi
push dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
push eax
push 0xffffffffffffffff
push dword [0x4fd62c]
push esi
push ebx
call edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov ebx, eax
lea eax, [ebp - 8]
push eax
push 3
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
call edi
test eax, eax
je 0x40d0bc
push esi
lea eax, [ebp - 8]
push eax
dec ebx
push ebx
push dword [ebp - 0x14]
push dword [ebp - 4]
call edi
test eax, eax
je 0x40d0bc
add dword [ebp - 8], 2
jmp 0x40d0c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x14]
call fcn.0043ffc9
pop ecx
cmp dword [ebp - 0x18], esi
jne 0x40d0dc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], esi
jne 0x40d0fe
cmp dword [ebp - 0x1c], esi
je 0x40d18a
push dword [0x4fb1c0]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x40d18a
cmp dword [0x4fb184], esi
jne 0x40d18a
push 0x40
pop edi
cmp dword [ebp - 0x10], esi
je 0x40d135
push dword [ebp - 0x10]
call fcn.00440b33
push eax
lea eax, [ebp - 0xa20]
push str._s_writing_report_file
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x30
pop edi
jmp 0x40d166
mov eax, dword [ebp - 8]
push dword [ebp + 8]
mov ecx, 0x3e8
cmp eax, ecx
jae 0x40d14c
push eax
push str._u_Bytes_written_to_n_S
jmp 0x40d156
xor edx, edx
div ecx
push eax
push str._u_KB_written_to_n_S
lea eax, [ebp - 0xa20]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push edi
push 0x44e65c
lea eax, [ebp - 0xa20]
push eax
push dword [0x4fb1c0]
call fcn.004475c9
push dword [0x4fb1c0]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 4