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

Disassembly:
push 0x80
mov eax, 0x4206d9
call fcn.0040c90a
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x78], eax
test esi, esi
je 0x403ca5
mov eax, esi
call fcn.004072ae
push eax
call fcn.0040b101
pop ecx
test eax, eax
je 0x403ca5
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40395f
mov eax, dword [eax + 0x20]
jmp 0x403961
xor eax, eax
movzx ecx, word [esi + 0x10]
shl ecx, 0xa
mov dword [ebp - 0x88], ecx
test ecx, ecx
je 0x40397a
cmp eax, ecx
jae 0x403ca5
mov eax, esi
call fcn.004072ae
push eax
call fcn.004037b3
mov ecx, ebx
mov dword [ebp - 0x70], eax
call fcn.00403460
mov esi, eax
mov dword [ebp - 0x8c], esi
test edi, edi
jne 0x4039a2
and dword [ebp - 0x7c], edi
jmp 0x4039ac
push edi
call fcn.0040b101
pop ecx
mov dword [ebp - 0x7c], eax
mov eax, dword [esi + 0x10]
xor ecx, ecx
cmp ecx, eax
sbb esi, esi
and esi, eax
mov dword [ebp - 0x6c], esi
cmp dword [ebp - 0x78], ecx
jne 0x4039c4
and dword [ebp - 0x74], ecx
jmp 0x4039d0
push dword [ebp - 0x78]
call fcn.0040b101
pop ecx
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x7c]
add eax, esi
cmp dword [ebp - 0x70], 0xffffffff
lea edi, [eax + ecx + 3]
je 0x403b92
push 2
push 0
push 0
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x88]
test eax, eax
je 0x403a0b
cmp dword [ebp - 0x68], eax
jae 0x403b84
mov ecx, dword [ebp - 0x70]
mov edx, ebx
call fcn.0040381f
add dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x7c]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403a43
push 0
lea ecx, [ebp - 0x6c]
push ecx
add eax, eax
push eax
push dword [ebp - 0x84]
push dword [ebp - 0x70]
call edi
test eax, eax
je 0x403a43
mov eax, dword [ebp - 0x6c]
add dword [ebp - 0x68], eax
test esi, esi
je 0x403a6f
mov eax, dword [ebp - 0x8c]
cmp dword [eax + 0x14], 8
jb 0x403a55
mov eax, dword [eax]
push 0
lea ecx, [ebp - 0x6c]
push ecx
lea ecx, [esi + esi]
push ecx
push eax
push dword [ebp - 0x70]
call edi
test eax, eax
je 0x403a6f
mov eax, dword [ebp - 0x6c]
add dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x403aad
push 0
lea ecx, [ebp - 0x6c]
push ecx
add eax, eax
push eax
push dword [ebp - 0x78]
push dword [ebp - 0x70]
call edi
test eax, eax
je 0x403a91
mov eax, dword [ebp - 0x6c]
add dword [ebp - 0x68], eax
push 0
lea eax, [ebp - 0x6c]
push eax
push 4
push 0x425fb4
push dword [ebp - 0x70]
call edi
test eax, eax
je 0x403aad
mov eax, dword [ebp - 0x6c]
add dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x88]
test eax, eax
je 0x403b72
cmp dword [ebp - 0x68], eax
jb 0x403b72
mov eax, 0x80
lea esi, [ebp - 0x2c]
call fcn.00404f28
and dword [ebp - 4], 0
lea eax, [ebx + 8]
cmp dword [eax + 0x14], 8
jb 0x403ae0
mov eax, dword [eax]
push eax
push str._FILE_SIZE_LIMIT_REACHED__LOGGING_DISABLED_FOR__s_MODULE_
lea esi, [ebx + 0xd4]
push 0x104
push esi
call fcn.0040b58a
mov eax, esi
add esp, 0x10
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x403aff
sub eax, ecx
mov ecx, esi
sar eax, 1
lea esi, [ebp - 0x2c]
call fcn.00401407
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
add eax, eax
cmp dword [ebp - 0x18], 8
mov dword [ebp - 0x6c], eax
jae 0x403b2b
mov ecx, esi
push 0
lea edx, [ebp - 0x6c]
push edx
push eax
push ecx
push dword [ebp - 0x70]
call edi
test eax, eax
je 0x403b42
mov eax, dword [ebp - 0x6c]
add dword [ebp - 0x68], eax
mov edi, dword [ebp - 0x80]
mov eax, dword [edi + 0x10]
test eax, 0x10000
je 0x403b64
test eax, 0x20000
je 0x403b64
mov eax, dword [edi + 0x14]
test eax, eax
je 0x403b64
and dword [ebp - 0x68], 0
mov byte [eax], 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x2c]
call fcn.00401075
jmp 0x403b75
mov edi, dword [ebp - 0x80]
cmp dword [edi + 0x14], 0
je 0x403b84
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp - 0x68]
mov dword [eax + 0x20], ecx
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403ca5
lea eax, [ebp - 0x2c]
call fcn.00401bf0
mov dword [ebp - 4], 1
mov eax, edi
lea ecx, [ebp - 0x2c]
call fcn.00404fcd
cmp dword [ebx + 0x2fc], 0
jne 0x403bde
push str.____Queued_Lines_Start_____r_n
lea esi, [ebp - 0x64]
call fcn.004014ab
mov byte [ebp - 4], 2
lea edi, [ebx + 0x2ec]
mov ebx, eax
call fcn.004051c3
mov byte [ebp - 4], 1
call fcn.00401075
mov esi, dword [ebp - 0x6c]
xor edi, edi
cmp dword [ebp - 0x7c], edi
jbe 0x403bf4
push dword [ebp - 0x84]
lea eax, [ebp - 0x2c]
push eax
call fcn.004053d2
cmp esi, edi
jbe 0x403c0a
push edi
push dword [ebp - 0x8c]
or eax, 0xffffffff
lea esi, [ebp - 0x2c]
call fcn.004055d1
cmp dword [ebp - 0x74], edi
jbe 0x403c1b
push dword [ebp - 0x78]
lea eax, [ebp - 0x2c]
push eax
call fcn.004053d2
mov ebx, 0x425fb4
push ebx
lea eax, [ebp - 0x2c]
push eax
call fcn.004053d2
mov esi, dword [ebp - 0x68]
lea eax, [ebp - 0x2c]
push eax
lea edi, [esi + 0x2ec]
call fcn.0040522a
lea eax, [ebp - 0x48]
call fcn.00401bf0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x48]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, esi
call fcn.00404896
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.Unable_to_open_log_file:_r_n_
call esi
mov eax, dword [ebp - 0x80]
call fcn.004072ae
push eax
call esi
push 0x426030
call esi
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x403c87
lea eax, [ebp - 0x48]
push eax
call esi
push ebx
call esi
mov byte [ebp - 4], 1
lea esi, [ebp - 0x48]
call fcn.00401075
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x2c]
call fcn.00401075
call fcn.0040c98d
ret 8