Function at 0x52c1e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59e195
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x5f88c0]
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 0x52c224
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 0x52c258
push 0
push str.Win32ConsoleAppender::append__Unable_to_get_STD_OUTPUT_HANDLE.
call fcn.00503240
mov ecx, eax
call fcn.0051aba0
jmp 0x52c4fc
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x52c288
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x52c288
push 0
push str.Win32ConsoleAppender::append__Error_retrieving_handle_type.
call fcn.00503240
mov ecx, eax
call fcn.0051aba0
jmp 0x52c4fc
push dword [ebp - 0x5c]
mov ecx, esi
call fcn.00519fc0
mov esi, eax
mov dword [ebp - 0x68], eax
cmp dword [esi + 0x14], 7
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x64], eax
jbe 0x52c2a8
mov esi, dword [esi]
mov dword [ebp - 0x68], esi
cmp dword [ebp - 0x60], 2
jne 0x52c3ba
lea eax, [ebp - 0x70]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x52c3b7
mov eax, dword [ebp - 0x6c]
xor esi, esi
mov dword [ebp - 0x60], esi
cmp dword [eax + 0x9c], esi
je 0x52c32e
lea eax, [ebp - 0x58]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x52c2ff
push eax
push str.Win32ConsoleAppender::write_console:_GetConsoleScreenBufferInfo_failed
call fcn.00503240
mov ecx, eax
call fcn.0051aba0
mov dword [ebp - 0x60], 7
jmp 0x52c32e
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 0x52c32e
push eax
push str.Win32ConsoleAppender::write_console:_SetConsoleTextAttribute_failed
call fcn.00503240
mov ecx, eax
call fcn.0051aba0
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 0x52c36b
add esi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x64]
cmp esi, eax
jne 0x52c331
jmp 0x52c37e
push 0
push str.Win32ConsoleAppender::write_console__WriteConsole_has_failed.
call fcn.00503240
mov ecx, eax
call fcn.0051aba0
mov eax, dword [ebp - 0x6c]
cmp dword [eax + 0x9c], 0
je 0x52c4fc
push dword [ebp - 0x60]
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x52c4fc
push eax
push str.Win32ConsoleAppender::write_console:_SetConsoleTextAttribute_failed
call fcn.00503240
mov ecx, eax
call fcn.0051aba0
jmp 0x52c4fc
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.004530d0
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0051fec0
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 0x52c4b4
add esi, dword [ebp - 0x68]
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x64]
cmp esi, eax
jne 0x52c410
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x52c474
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x52c46a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x52c519
push ecx
push edx
call fcn.0054b2c7
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 0x52c4fc
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x52c4f2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x52c519
jmp 0x52c4f2
push 0
push str.Win32ConsoleAppender::write_handle__WriteFile_has_failed.
call fcn.00503240
mov ecx, eax
call fcn.0051aba0
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x52c474
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x52c46a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x52c519
jmp 0x52c46a
push ecx
push edx
call fcn.0054b2c7
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.0054b289
mov esp, ebp
pop ebp
ret 4
call fcn.0055fb01
int3