Function at 0x428e30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov edi, dword [ebp + 0xc]
mov esi, ecx
test edi, edi
je 0x428e58
push edx
call sub.kernel32.dll_GetStdHandle
test eax, eax
je 0x428e64
cmp eax, 0xffffffff
jne 0x428e77
call sub.kernel32.dll_GetLastError
jmp 0x428e69
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x428e6f
mov eax, 6
mov byte [esi], 0
mov dword [esi + 4], eax
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
lea ebx, [ebp - 0x40]
mov dword [ebp - 0x40], 0
push ebx
mov dword [ebp - 0x10], eax
push eax
call sub.kernel32.dll_GetConsoleMode
test eax, eax
je 0x428ee3
mov ebx, dword [ebp + 0x10]
movzx eax, byte [ebx + 4]
test eax, eax
je 0x428f35
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x429014
movzx ecx, byte [ecx]
mov edx, ecx
and dl, 0xc0
neg dl
jno 0x428f8c
mov byte [ebx + eax], cl
movzx eax, byte [ebx + 4]
inc al
mov byte [ebx + 4], al
movzx ecx, byte [ebx]
movzx ecx, byte [ecx + 0x4a7f30]
cmp al, cl
jae 0x428fcb
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x428e6f
lea eax, [ebp - 0x28]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0x103
push 0
push 0
push edi
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push dword [ebp - 0x10]
call sub.ntdll.dll_NtWriteFile
cmp eax, 0x103
jne 0x428f2a
push 0xffffffffffffffff
push dword [ebp - 0x10]
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [ebp - 0x28]
cmp eax, 0x103
je 0x429063
test eax, eax
js 0x428f9f
mov eax, dword [ebp - 0x24]
mov bl, 4
jmp 0x428fa7
mov edx, dword [ebp + 8]
cmp edi, 0x1000
mov eax, 0x1000
lea ecx, [ebp - 0x1c]
cmovb eax, edi
push eax
call fcn.0041c520
add esp, 4
test byte [ebp - 0x1c], 1
je 0x428fb1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x429016
mov edx, dword [ebp + 8]
cmp eax, edi
ja 0x429014
lea ecx, [ebp - 0x40]
push eax
call fcn.0041c520
add esp, 4
test byte [ebp - 0x40], 1
jne 0x429014
mov eax, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x38]
jmp 0x428fb7
mov byte [ebx + 4], 0
mov byte [esi], 2
mov dword [esi + 4], 0x4a8080
jmp 0x428e6f
xor ebx, ebx
push eax
call sub.ntdll.dll_RtlNtStatusToDosError
mov dword [esi + 4], eax
mov byte [esi], bl
jmp 0x428e6f
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov ecx, esi
push edi
push eax
call fcn.004290c0
add esp, 8
jmp 0x428e6f
cmp al, 4
ja 0x429014
mov edi, ecx
movzx eax, al
lea ecx, [ebp - 0x40]
mov edx, ebx
push eax
call fcn.0041c520
add esp, 4
test byte [ebp - 0x40], 1
mov byte [ebx + 4], 0
jne 0x428f90
cmp dword [ebp - 0x38], edi
jne 0x429014
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0x1c]
push edi
push dword [ebp - 0x3c]
call fcn.004290c0
add esp, 8
movzx eax, byte [ebp - 0x1c]
cmp al, 4
jne 0x429036
cmp dword [ebp - 0x18], edi
je 0x428ed7
ud2
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x4a7f30]
cmp ecx, edi
jbe 0x429052
mov byte [ebx], al
mov byte [ebx + 4], 1
mov al, 4
mov ecx, 1
jmp 0x429059
movzx ecx, byte [ebp - 0x19]
movzx edi, word [ebp - 0x1b]
mov edx, dword [ebp - 0x18]
mov byte [esi + 3], cl
mov word [esi + 1], di
mov byte [esi], al
mov dword [esi + 4], edx
jmp 0x428e6f
mov al, 2
mov ecx, 0x4a8080
mov dword [esi + 4], ecx
mov byte [esi], al
jmp 0x428e6f
lea eax, [ebp - 0x20]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x40], 0x4a7f28
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x44], 0
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x48]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], 0
push ebx
call fcn.004293f0
add esp, 4
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
call fcn.00429490
mov ecx, 7
int 0x29
ud2