Function at 0x4077c7
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push 0x70
mov eax, 0x553f5b
call fcn.00534d23
mov esi, ecx
mov dword [ebp - 0x64], esi
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x70], eax
test ebx, ebx
je 0x407ba1
mov ecx, ebx
call fcn.0040a892
push eax
call fcn.00534589
pop ecx
test eax, eax
jne 0x40780d
cmp dword [esi + 0x2e8], eax
je 0x407ba1
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x407819
mov eax, dword [eax + 0x1c]
jmp 0x40781b
xor eax, eax
movzx esi, word [ebx + 0x10]
shl esi, 0xa
test esi, esi
je 0x40782e
cmp eax, esi
jae 0x407ba1
push ecx
mov ecx, ebx
call fcn.0040a892
push eax
call fcn.00407685
mov ecx, dword [ebp - 0x64]
mov edi, eax
mov dword [ebp - 0x60], edi
call fcn.00407302
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x68], eax
test ecx, ecx
jne 0x407858
and dword [ebp - 0x74], ecx
jmp 0x407865
push ecx
call fcn.00534589
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x68]
pop ecx
mov edx, dword [ebp - 0x70]
xor ecx, ecx
cmp ecx, dword [eax + 0x10]
sbb ecx, ecx
and ecx, dword [eax + 0x10]
mov dword [ebp - 0x78], ecx
test edx, edx
je 0x407888
push edx
call fcn.00534589
pop ecx
mov ecx, dword [ebp - 0x78]
mov edx, eax
mov eax, dword [ebp - 0x68]
add ecx, edx
mov dword [ebp - 0x7c], edx
mov edx, dword [ebp - 0x74]
add edx, 3
add ecx, edx
mov dword [ebp - 0x5c], ecx
mov ecx, dword [ebp - 0x64]
mov ecx, dword [ecx + 0x2e8]
test ecx, ecx
je 0x4078bc
cmp dword [eax + 0x14], 8
jb 0x4078af
mov edx, dword [eax]
jmp 0x4078b1
mov edx, eax
push dword [ebp - 0x70]
mov eax, dword [ecx]
push edx
push dword [ebp - 0x6c]
call dword [eax]
cmp edi, 0xffffffff
je 0x407a3f
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
test esi, esi
je 0x4078e0
cmp edi, esi
jae 0x407a31
push ecx
push dword [ebp - 0x60]
mov ecx, dword [ebp - 0x64]
call fcn.004076f2
add edi, eax
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x407911
push 0
lea ecx, [ebp - 0x5c]
add eax, eax
push ecx
push eax
push dword [ebp - 0x6c]
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407911
add edi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x40793d
mov ecx, dword [ebp - 0x68]
cmp dword [ecx + 0x14], 8
jb 0x407923
mov ecx, dword [ecx]
push 0
lea edx, [ebp - 0x5c]
add eax, eax
push edx
push eax
push ecx
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40793d
add edi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x40797d
push 0
lea ecx, [ebp - 0x5c]
add eax, eax
push ecx
push eax
push dword [ebp - 0x70]
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407960
add edi, dword [ebp - 0x5c]
push 0
lea eax, [ebp - 0x5c]
push eax
push 4
push 0x59a870
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40797d
add edi, dword [ebp - 0x5c]
test esi, esi
je 0x407a27
cmp edi, esi
jb 0x407a27
push 0
push 0x80
lea ecx, [ebp - 0x28]
call fcn.00408f0c
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x64]
lea eax, [ecx + 8]
cmp dword [eax + 0x14], 8
jb 0x4079ae
mov eax, dword [eax]
push eax
push str._FILE_SIZE_LIMIT_REACHED__LOGGING_DISABLED_FOR__s_MODULE_
lea esi, [ecx + 0xbc]
push 0x104
push esi
call fcn.00534b22
add esp, 0x10
lea ecx, [ebp - 0x28]
push esi
call fcn.00404830
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x5c]
cmp dword [ebp - 0x14], 8
push 0
push edx
lea ecx, [eax + eax]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x5c], ecx
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4079fd
add edi, dword [ebp - 0x5c]
test dword [ebx + 0x10], 0x10000
je 0x407a1b
test dword [ebx + 0x10], 0x20000
je 0x407a1b
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x407a1b
mov byte [eax], 1
xor edi, edi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00404190
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x407a31
mov dword [eax + 0x1c], edi
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407ba1
and dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x40]
and dword [ebp - 0x30], 0
push 0
mov dword [ebp - 0x2c], 7
call fcn.004046d0
xor ecx, ecx
inc ecx
mov dword [ebp - 4], ecx
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x5c]
cmp esi, eax
ja 0x407a84
cmp dword [ebp - 0x2c], eax
je 0x407a84
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.004045f0
test al, al
je 0x407a84
push esi
lea ecx, [ebp - 0x40]
call fcn.004046d0
mov esi, dword [ebp - 0x64]
cmp dword [esi + 0x2e4], 0
jne 0x407ab9
push str.____Queued_Lines_Start_____r_n
lea ecx, [ebp - 0x58]
call fcn.00404880
mov byte [ebp - 4], 2
lea ecx, [esi + 0x2d4]
push eax
call fcn.004091a4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
call fcn.00404190
cmp dword [ebp - 0x74], 0
jbe 0x407ad3
mov edi, dword [ebp - 0x6c]
push edi
call fcn.00404800
pop ecx
push eax
push edi
lea ecx, [ebp - 0x40]
call fcn.0040557a
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x407aea
mov ecx, dword [ebp - 0x68]
push 0xffffffffffffffff
push 0
push ecx
lea ecx, [ebp - 0x40]
call fcn.0040566e
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x407b05
mov edi, dword [ebp - 0x70]
push edi
call fcn.00404800
pop ecx
push eax
push edi
lea ecx, [ebp - 0x40]
call fcn.0040557a
mov edi, 0x59a870
push edi
call fcn.00404800
pop ecx
push eax
push edi
lea ecx, [ebp - 0x40]
call fcn.0040557a
lea eax, [ebp - 0x40]
push eax
lea ecx, [esi + 0x2d4]
call fcn.0040921d
xor eax, eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], eax
push eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 7
call fcn.004046d0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x28]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.0040884a
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.Unable_to_open_log_file:_r_n_
call esi
mov ecx, ebx
call fcn.0040a892
push eax
call esi
push 0x59a8ec
call esi
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call esi
push edi
call esi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.00404190
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00404190
call fcn.00534cd2
ret 0xc