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

Disassembly:
sub esp, 0x424
push ebp
push esi
push edi
mov ebp, ecx
push 0
call fcn.00430cc7
mov edx, dword [ebp + 0x28]
lea ecx, [ebp + 0x28]
add esp, 4
cmp eax, edx
je 0x402c33
push 0x18
push ecx
mov dword [ecx], eax
call fcn.00430cae
add esp, 4
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00430bb0
mov al, byte [ebp + 0x10]
add esp, 0xc
test al, 1
lea edx, [esp + 0x28]
mov edi, 0x442c18
jne 0x402ba3
mov edi, 0x442c14
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [ebp + 5]
and ecx, 3
test al, al
rep movsb byte es:[edi], byte [esi]
je 0x402bd2
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, byte [ebp + 6]
test al, al
je 0x402c03
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
lea eax, [esp + 0x18]
push ecx
push eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
mov al, byte [ebp + 4]
test al, al
je 0x402c33
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x402c33
lea ecx, [esp + 0xc]
push 0
push ecx
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x18]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x434]
mov eax, dword [ebp + 0x20]
mov esi, edx
push ebx
test eax, eax
mov dword [esp + 0x10], esi
je 0x402c6e
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [ebp + 0x24]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebx + 4]
cmp ecx, eax
jbe 0x402c6e
mov edi, dword [ebp + 0x20]
mov ecx, ebx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
lea esi, [ebx + edx]
je 0x402c6e
mov esi, edx
mov ecx, dword [esp + 0x43c]
lea edx, [esp + 0x34]
push ecx
push esi
push 0x3fe
push edx
call fcn.00430b5c
lea edi, [esp + 0x44]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
mov byte [esp + 0x432], 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop ebx
test ecx, ecx
jle 0x402cc2
cmp ecx, 0x3fe
jg 0x402cc2
cmp byte [esp + ecx + 0x2f], 0xa
jne 0x402cc2
mov byte [esp + ecx + 0x2f], 0xd
mov byte [esp + ecx + 0x30], 0xa
mov byte [esp + ecx + 0x31], 0
test byte [ebp + 0x10], 6
je 0x402d6d
lea eax, [esp + 0x30]
push 9
push eax
call fcn.00430aa0
add esp, 8
test eax, eax
je 0x402d6d
mov ecx, dword [ebp + 0x10]
test cl, 2
je 0x402d65
lea esi, [eax + 1]
mov al, byte [ebp + 5]
test al, al
je 0x402cfc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, byte [ebp + 6]
test al, al
je 0x402d27
lea ecx, [esp + 0xc]
push 0
push ecx
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
mov al, byte [ebp + 4]
test al, al
je 0x402de0
mov ebp, dword [ebp + 0x14]
test ebp, ebp
je 0x402de0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
push ecx
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
add esp, 0x424
ret 8
test cl, 4
je 0x402d6d
mov byte [eax], 0x20
mov al, byte [ebp + 5]
test al, al
je 0x402d7f
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, byte [ebp + 6]
test al, al
je 0x402db0
lea ecx, [esp + 0xc]
push 0
push ecx
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x38]
push ecx
push edx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
mov al, byte [ebp + 4]
test al, al
je 0x402de0
mov ebp, dword [ebp + 0x14]
test ebp, ebp
je 0x402de0
lea eax, [esp + 0xc]
push 0
push eax
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x3c]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
add esp, 0x424
ret 8