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

Disassembly:
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 + 0x14], ebp
jbe 0x4e16eb
push 0xffffffffffffffff
add eax, eax
push 0
push eax
call fcn.004e0530
add esp, 0xc
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov ebp, eax
push 0xa
push ebx
mov byte [ebp], 0
mov edi, ebx
call fcn.004dbfa0
add esp, 8
test eax, eax
je 0x4e1771
cmp ebx, eax
je 0x4e170a
cmp byte [eax - 1], 0xd
je 0x4e1771
mov edx, eax
sub edx, edi
je 0x4e172b
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], edi
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 edi, [eax + 1]
add ebp, 2
cmp byte [edi], 0
mov esi, edi
je 0x4e1771
mov ecx, dword [0x71567c]
push ecx
push esi
call fcn.0050a300
add esp, 8
cmp eax, 1
jne 0x4e1760
add esi, 2
jmp 0x4e176c
cmp byte [esi], 0xa
je 0x4e18fc
add esi, 1
cmp byte [esi], 0
jne 0x4e1746
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebp
call edi
cmp dword [0x70a2b0], 0
jne 0x4e18dd
cmp byte [0x70a2b4], 0
je 0x4e18dd
push 0x70a2b4
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push esi
lea edx, [esp + 0x2c]
push 0x70a2b4
push edx
call fcn.004dbf50
add esp, 0xc
cmp byte [esp + esi + 0x27], 0x5c
je 0x4e17c4
mov byte [esp + esi + 0x28], 0x5c
add esi, 1
push 0x70a3bc
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 0x4e18dd
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x709b34], 0
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jne 0x4e18a5
cmp dword [0x709b38], 0
jne 0x4e1867
call dword [0x7090b0]
sub eax, dword [0x7144bc]
lea edx, [esp + 0x28]
push eax
push 0x6a1690
push edx
call fcn.0052b650
add esp, 0xc
push 0
lea eax, [esp + 0x14]
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 [0x709b30]
test edi, edi
je 0x4e18a5
xor eax, eax
test edi, edi
jle 0x4e1889
push edi
lea ecx, [esp + 0x2c]
push 9
push ecx
call fcn.004cb810
add esp, 0xc
mov eax, edi
push 0
lea edx, [esp + 0x14]
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 + 0x14]
push 0
lea edx, [esp + 0x14]
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 [0x709b34], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
test eax, eax
pop edi
pop esi
pop ebp
pop ebx
je 0x4e18f2
push eax
call fcn.004e0760
add esp, 4
or eax, 0xffffffff
add esp, 0x318
ret
mov eax, esi
jmp 0x4e1700