Function at 0x40c7f0
Capabilities:
Manipulate console buffer
Read .ini file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x93c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push esi
push edi
mov edi, 0x4f9890
push edi
push 1
push str.ReportsMessageBox
mov esi, 0x44d58c
push esi
call ebx
push edi
push 1
push str.ReportsAsUnicode
push esi
mov dword [ebp - 0x18], eax
call ebx
push edi
push dword [ebp - 0x18]
mov dword [ebp - 4], eax
push str.ReportsMessageBox
push esi
call fcn.00426504
push edi
push dword [ebp - 4]
push str.ReportsAsUnicode
push esi
call fcn.00426504
push str.stdout
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40c962
call fcn.0040c70a
push eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], 1
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, eax
dec esi
dec esi
neg esi
sbb esi, esi
inc esi
mov dword [ebp - 0x18], ebx
push dword [0x4fc5b8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
cmp esi, ebx
je 0x40c9ce
push 0x44d4d8
push dword [0x4fc5b8]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
add edi, 2
push edi
push dword [0x4fc5b8]
push dword [ebp - 8]
call fcn.0040c68a
xor eax, eax
mov dword [ebp - 0x24], 8
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
mov edi, dword [ebp - 8]
lea eax, [ebp - 0x24]
push eax
push edi
mov dword [ebp - 0x20], 1
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
cmp word [0x4af868], bx
je 0x40ca61
lea eax, [ebp - 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x40ca61
movsx ecx, word [0x492068]
movsx eax, word [ebp - 0x36]
lea edx, [ecx + 1]
cmp eax, edx
jne 0x40c91a
mov eax, ecx
mov word [ebp - 0x12], ax
lea eax, [ebp - 4]
xor ecx, ecx
push eax
mov word [ebp - 0x14], cx
push dword [ebp - 0x14]
mov esi, 0x4af868
push esi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
test eax, eax
je 0x40ca61
mov ax, word [ebp - 4]
mov word [ebp - 0x14], ax
push dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x40ca61
push ebx
push ebx
push 2
push ebx
push 3
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x40c885
push dword [0x4fa140]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x40c9c7
call fcn.00443016
push eax
lea eax, [ebp - 0x13c]
push str._s_writing_report_file
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x30
push 0x44d534
lea eax, [ebp - 0x13c]
push eax
push dword [0x4fa140]
call fcn.00446a6c
xor eax, eax
jmp 0x40cb20
cmp dword [ebp - 4], ebx
je 0x40ca1d
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 0xc]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
mov dword [ebp - 4], 0xfeff
call esi
test eax, eax
je 0x40ca12
push ebx
lea eax, [ebp - 0xc]
push eax
lea eax, [edi + edi]
push eax
push dword [0x4fc5b8]
push dword [ebp - 8]
call esi
test eax, eax
je 0x40ca12
add dword [ebp - 0xc], 2
jmp 0x40ca61
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
jmp 0x40ca61
lea esi, [edi + edi]
push esi
call fcn.0043f641
pop ecx
push ebx
push ebx
push esi
mov edi, eax
push edi
push 0xffffffffffffffff
push dword [0x4fc5b8]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
lea ecx, [ebp - 0xc]
push ecx
push eax
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40ca5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push edi
call fcn.0043f6b6
pop ecx
cmp dword [ebp - 0x1c], ebx
jne 0x40ca6f
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], ebx
jne 0x40ca91
cmp dword [ebp - 0x18], ebx
je 0x40cb1d
push dword [0x4fa140]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x40cb1d
cmp dword [0x4fa104], ebx
jne 0x40cb1d
push 0x40
pop esi
cmp dword [ebp - 0x10], ebx
je 0x40cac8
push dword [ebp - 0x10]
call fcn.00440220
push eax
lea eax, [ebp - 0x93c]
push str._s_writing_report_file
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x30
pop esi
jmp 0x40caf9
mov eax, dword [ebp - 0xc]
push dword [ebp + 8]
mov ecx, 0x3e8
cmp eax, ecx
jae 0x40cadf
push eax
push str._u_Bytes_written_to_n_S
jmp 0x40cae9
xor edx, edx
div ecx
push eax
push str._u_KB_written_to_n_S
lea eax, [ebp - 0x93c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push esi
push 0x44d534
lea eax, [ebp - 0x93c]
push eax
push dword [0x4fa140]
call fcn.00446ab6
push dword [0x4fa140]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 4