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

Disassembly:
jmp 0x5932e0
sub esp, 0x318
push ebx
mov ebx, dword [esp + 0x320]
push ebp
push esi
push edi
push ebx
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0xff
lea ebp, [esp + 0x228]
mov dword [esp + 0x10], ebp
jbe 0x59332b
push 0xffffffffffffffff
add eax, eax
push 0
push eax
call fcn.0057e8b2
add esp, 0xc
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
mov ebp, eax
push 0xa
push ebx
mov byte [ebp], 0
mov esi, ebx
call fcn.0057b081
add esp, 8
test eax, eax
je 0x5933af
cmp ebx, eax
je 0x59334a
cmp byte [eax - 1], 0xd
je 0x5933af
mov edx, eax
sub edx, esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], edx
cld
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
rep movsb byte es:[edi], byte [esi]
add ebp, edx
mov byte [ebp], 0xd
mov byte [ebp + 1], 0xa
mov byte [ebp + 2], 0
lea esi, [eax + 1]
add ebp, 2
cmp byte [esi], 0
mov edi, esi
je 0x5933af
mov ecx, dword [0x8fe334]
push ecx
push edi
call fcn.0057d00c
add esp, 8
cmp eax, 1
jne 0x59339e
add edi, 2
jmp 0x5933aa
cmp byte [edi], 0xa
je 0x59352a
add edi, 1
cmp byte [edi], 0
jne 0x593384
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push ebp
call edi
cmp dword [0x8f26bc], 0
jne 0x593531
cmp dword [0x8f3074], 0
jne 0x59353c
cmp byte [0x8f2d70], 0
je 0x59353c
push 0x8f2d70
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push esi
lea edx, [esp + 0x2c]
push 0x8f2d70
push edx
call fcn.0057d3e0
add esp, 0xc
cmp byte [esp + esi + 0x27], 0x5c
je 0x59340f
mov byte [esp + esi + 0x28], 0x5c
add esi, 1
push 0x8f307c
lea eax, [esp + esi + 0x2c]
push eax
call edi
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
lea ecx, [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x59353c
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x8f28f8], 0
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jne 0x5934f0
cmp dword [0x8f28fc], 0
jne 0x5934b2
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [0x8fd174]
lea edx, [esp + 0x28]
push eax
push 0x87a30c
push edx
call fcn.0057a7a3
add esp, 0xc
push 0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea edx, [esp + 0x34]
push edx
push esi
call ebp
lea eax, [esp + 0x28]
push eax
call ebx
mov edi, dword [0x8f28f4]
test edi, edi
je 0x5934f0
xor eax, eax
test edi, edi
jle 0x5934d4
push edi
lea ecx, [esp + 0x2c]
push 9
push ecx
call fcn.0057c927
add esp, 0xc
mov eax, edi
push 0
lea edx, [esp + 0x18]
push edx
mov byte [esp + eax + 0x30], 0
push edi
lea eax, [esp + 0x34]
push eax
push esi
call ebp
lea ecx, [esp + 0x28]
push ecx
call ebx
mov edi, dword [esp + 0x10]
push 0
lea edx, [esp + 0x18]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
push esi
call ebp
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
xor ecx, ecx
cmp byte [eax + edi - 1], 0xa
push esi
setne cl
mov dword [0x8f28f8], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x59353c
mov eax, edi
jmp 0x593340
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x18]
test eax, eax
pop edi
pop esi
pop ebp
pop ebx
je 0x593551
push eax
call fcn.0057cf76
add esp, 4
or eax, 0xffffffff
add esp, 0x318
ret