Function at 0x410c20
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov ebx, dword [esp + 0x48]
mov esi, ecx
test ebx, ebx
je 0x410c4b
push edx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x410c5a
mov edi, eax
cmp eax, 0xffffffff
jne 0x410c77
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x410c5f
mov dword [esi + 4], 0
mov dword [esi], 0
jmp 0x410c6f
mov eax, 6
mov dword [esi + 8], eax
mov dword [esi + 4], 0
mov dword [esi], 1
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
lea ebp, [esp + 0x10]
mov dword [esp + 0x10], 0
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x410ceb
mov eax, dword [esp + 0x4c]
mov ebp, dword [esp + 0x44]
movzx eax, byte [eax + 4]
test eax, eax
je 0x410d0f
cmp al, 4
jae 0x410e74
mov cl, byte [ebp]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x410d6a
mov ebp, dword [esp + 0x4c]
mov byte [ebp + eax], cl
mov cl, byte [ebp + 4]
inc cl
mov byte [ebp + 4], cl
movzx eax, byte [ebp]
movzx ebx, byte [eax + 0x425a20]
cmp bl, cl
mov dword [esp + 0x28], ebx
jbe 0x410d8e
mov dword [esi + 4], 1
jmp 0x410c52
mov dword [esp + 0x10], 0
push 0
push ebp
push ebx
push dword [esp + 0x50]
push edi
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x410d74
mov ecx, dword [esp + 0x10]
xor eax, eax
xor edx, edx
jmp 0x410d81
cmp ebx, 0x1000
mov eax, 0x1000
lea ecx, [esp + 4]
mov edx, ebp
cmovb eax, ebx
push eax
call fcn.004081e0
add esp, 4
cmp dword [esp + 4], 0
je 0x410dc7
cmp dword [esp + 8], 0
je 0x410de2
mov eax, dword [esp + 8]
cmp eax, ebx
ja 0x410eba
lea ebx, [esp + 0x10]
mov edx, ebp
mov ecx, ebx
push eax
call fcn.004081e0
add esp, 4
mov ecx, ebx
call fcn.00411750
mov ebx, edx
jmp 0x410dcf
mov eax, dword [esp + 0x4c]
mov byte [eax + 4], 0
jmp 0x410db4
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov edx, 1
mov dword [esi], edx
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
jmp 0x410c6f
movzx eax, cl
cmp cl, 5
jae 0x410eac
lea ecx, [esp + 4]
mov edx, ebp
push eax
call fcn.004081e0
add esp, 4
cmp dword [esp + 4], 0
mov byte [ebp + 4], 0
je 0x410e02
mov dword [esi + 8], 0x4277f8
mov dword [esi + 4], 2
jmp 0x410c69
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0xc]
mov ecx, esi
mov edx, edi
push ebx
push eax
call fcn.004114d0
add esp, 8
jmp 0x410c6f
movzx eax, byte [ebp]
movzx ecx, byte [eax + 0x425a20]
cmp ecx, 2
jb 0x410e3b
cmp ecx, ebx
jbe 0x410e3b
mov ecx, dword [esp + 0x4c]
mov byte [ecx], al
mov byte [ecx + 4], 1
jmp 0x410e64
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 8]
cmp ecx, ebx
mov dword [esp], ecx
jne 0x410ec5
lea ebp, [esp + 0x10]
mov edx, edi
mov ecx, ebp
push ebx
push eax
call fcn.004114d0
add esp, 8
cmp dword [esp + 0x10], 0
je 0x410e55
movsd xmm0, qword [esp + 0x14]
movsd qword [esi + 4], xmm0
jmp 0x410e49
mov dword [esi + 8], 0x4277f8
mov dword [esi + 4], 2
mov eax, 1
mov dword [esi], eax
jmp 0x410c6f
mov eax, dword [esp + 0x14]
mov dword [esp], ebx
cmp eax, ebx
mov dword [esp + 0x2c], eax
jne 0x410edf
xor eax, eax
mov dword [esi + 4], 1
mov dword [esi], eax
jmp 0x410c6f
lea ecx, [esp + 0x10]
mov edx, 0x427798
mov dword [esp + 0x10], 0x427790
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0x425a20
mov dword [esp + 0x24], 0
call fcn.004234b0
ud2
mov ecx, eax
mov edx, 4
call fcn.004234f0
ud2
mov ecx, eax
mov edx, ebx
call fcn.004234f0
ud2
lea ecx, [esp + 0x28]
mov edx, esp
mov dword [esp + 0x10], 0
push 0x427804
lea eax, [esp + 0x14]
push eax
jmp 0x410ef3
lea ecx, [esp + 0x2c]
mov edx, esp
mov dword [esp + 0x10], 0
push 0x427814
push ebp
call fcn.004236f0
add esp, 8
ud2