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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebx*4 + 0x5cdfc0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x100]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x10]
lea edi, [ebp - 0x100]
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
lea eax, [ebp + ecx - 0x100]
push eax
call fcn.005682e0
mov eax, dword [0x5cdf54]
add esp, 0xc
test eax, eax
je 0x558458
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
movzx cx, byte [ebx + 0x5cdf60]
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov esi, eax
push ecx
push esi
call ebx
lea edi, [ebp - 0x100]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
lea eax, [ebp - 0x100]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
jne 0x558435
lea ecx, [ebp + 0x10]
push eax
push ecx
lea edi, [ebp - 0x100]
or ecx, 0xffffffff
lea edx, [ebp - 0x100]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
movzx ax, byte [0x5cdf60]
push eax
push esi
call ebx
lea ecx, [ebp + 0x10]
push 0
push ecx
push 1
push 0x5ce000
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [ebp + 8]
mov edi, dword [0x711abc]
test edi, edi
je 0x5584d9
xor eax, eax
cmp ebx, 1
setl al
lea esi, [edi + 0xa0]
mov ecx, 0x3c0
dec eax
mov edx, 0x50
rep movsd dword es:[edi], dword [esi]
mov esi, dword [0x711abc]
and eax, 0x800
add eax, 0x700
cmp byte [ebp - 0x100], 0
lea ecx, [ebp - 0x100]
lea edi, [esi + 0xf00]
je 0x5584b9
test edx, edx
je 0x5584b9
movsx si, byte [ecx]
or esi, eax
mov word [edi], si
add edi, 2
inc ecx
dec edx
cmp byte [ecx], 0
jne 0x5584a2
mov ecx, edx
dec edx
test ecx, ecx
je 0x5584d9
or al, 0x20
lea ecx, [edx + 1]
mov dx, ax
shl edx, 0x10
mov dx, ax
mov eax, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
lea edi, [ebp - 0x100]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ax, word [0x5ce004]
mov word [edi - 1], ax
mov eax, dword [0x5cdf58]
test eax, eax
je 0x55850b
lea ecx, [ebp - 0x100]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x558596
mov edx, dword [0x5cdf4c]
cmp edx, 0xffffffff
je 0x558554
lea edi, [ebp - 0x100]
or ecx, 0xffffffff
xor eax, eax
push 0
repne scasb al, byte es:[edi]
mov ax, word [0x5ce008]
lea ecx, [ebp + 8]
mov word [edi - 1], ax
push ecx
lea edi, [ebp - 0x100]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebp - 0x100]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x558596
mov edx, dword [0x5cdf50]
cmp edx, 0xffffffff
je 0x558596
lea ecx, [ebp + 8]
push 0
push ecx
lea edi, [ebp - 0x100]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebp - 0x100]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp ebx, 3
jl 0x5585b6
mov ecx, dword [0x5cdf50]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 3
jne 0x5585b6
push 0
push 0
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
push 1
call fcn.005697c0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 4
jne 0x5585cf
push 0
push 0
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
mov dword [0], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret