Function at 0x551210
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c4435
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x6218c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x6c], esi
cmp byte [esi + 0x98], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x5c], eax
je 0x551254
call dword [sym.imp.KERNEL32.dll_AllocConsole]
xor eax, eax
cmp byte [esi + 0x99], al
sete al
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
cmp edi, 0xffffffff
jne 0x551288
push 0
push str.Win32ConsoleAppender::append__Unable_to_get_STD_OUTPUT_HANDLE.
call fcn.00528240
mov ecx, eax
call fcn.0053fbc0
jmp 0x55152c
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x5512b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5512b8
push 0
push str.Win32ConsoleAppender::append__Error_retrieving_handle_type.
call fcn.00528240
mov ecx, eax
call fcn.0053fbc0
jmp 0x55152c
push dword [ebp - 0x5c]
mov ecx, esi
call fcn.0053efe0
mov esi, eax
mov dword [ebp - 0x68], eax
cmp dword [esi + 0x14], 7
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x64], eax
jbe 0x5512d8
mov esi, dword [esi]
mov dword [ebp - 0x68], esi
cmp dword [ebp - 0x60], 2
jne 0x5513ea
lea eax, [ebp - 0x70]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x5513e7
mov eax, dword [ebp - 0x6c]
xor esi, esi
mov dword [ebp - 0x60], esi
cmp dword [eax + 0x9c], esi
je 0x55135e
lea eax, [ebp - 0x58]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x55132f
push eax
push str.Win32ConsoleAppender::write_console:_GetConsoleScreenBufferInfo_failed
call fcn.00528240
mov ecx, eax
call fcn.0053fbc0
mov dword [ebp - 0x60], 7
jmp 0x55135e
movzx eax, word [ebp - 0x50]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x6c]
movzx eax, word [eax + 0x9c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x55135e
push eax
push str.Win32ConsoleAppender::write_console:_SetConsoleTextAttribute_failed
call fcn.00528240
mov ecx, eax
call fcn.0053fbc0
mov eax, dword [ebp - 0x64]
mov ecx, eax
mov dword [ebp - 0x5c], 0
push 0
lea eax, [ebp - 0x5c]
sub ecx, esi
push eax
mov eax, 0xffff
cmp ecx, eax
cmovb eax, ecx
push eax
mov eax, dword [ebp - 0x68]
lea eax, [eax + esi*2]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x55139b
add esi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x64]
cmp esi, eax
jne 0x551361
jmp 0x5513ae
push 0
push str.Win32ConsoleAppender::write_console__WriteConsole_has_failed.
call fcn.00528240
mov ecx, eax
call fcn.0053fbc0
mov eax, dword [ebp - 0x6c]
cmp dword [eax + 0x9c], 0
je 0x55152c
push dword [ebp - 0x60]
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x55152c
push eax
push str.Win32ConsoleAppender::write_console:_SetConsoleTextAttribute_failed
call fcn.00528240
mov ecx, eax
call fcn.0053fbc0
jmp 0x55152c
mov eax, dword [ebp - 0x64]
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x40], xmm0
call fcn.004794e0
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00544ef0
add esp, 8
cmp dword [ebp - 0x14], 0xf
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x18]
cmova ecx, dword [ebp - 0x28]
xor esi, esi
mov byte [ebp - 4], 1
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x5c], eax
nop word [eax + eax]
push 0
lea edx, [ebp - 0x68]
mov dword [ebp - 0x68], 0
push edx
sub eax, esi
push eax
lea eax, [ecx + esi]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5514e4
add esi, dword [ebp - 0x68]
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x64]
cmp esi, eax
jne 0x551440
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x5514a4
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x55149a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x551549
push ecx
push edx
call fcn.005702d9
add esp, 8
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp ecx, 7
jbe 0x55152c
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x551522
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x551549
jmp 0x551522
push 0
push str.Win32ConsoleAppender::write_handle__WriteFile_has_failed.
call fcn.00528240
mov ecx, eax
call fcn.0053fbc0
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x5514a4
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x55149a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x551549
jmp 0x55149a
push ecx
push edx
call fcn.005702d9
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0057029b
mov esp, ebp
pop ebp
ret 4
call fcn.00584b21
int3