Function at 0x40c6e0
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x2028
call fcn.00460050
mov ebp, ecx
push edx
call sub.KERNEL32.dll_GetStdHandle
test eax, eax
je 0x40c706
cmp eax, 0xffffffff
jne 0x40c727
call sub.KERNEL32.dll_GetLastError
jmp 0x40c70b
mov eax, 6
mov dword [ebp + 4], 0
mov dword [ebp + 8], eax
mov dword [ebp], 1
add esp, 0x2028
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [esp + 0x2040]
mov esi, dword [esp + 0x203c]
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], 0
push ecx
push eax
mov ebx, eax
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x40c7b5
cmp edi, 0x1000
mov eax, 0x1000
mov dword [esp + 0x14], ebx
lea ecx, [esp + 4]
cmovb eax, edi
push eax
push esi
push ecx
call fcn.00413c10
add esp, 0xc
cmp dword [esp + 4], 1
jne 0x40c7e3
cmp dword [esp + 8], 0
je 0x40caa8
mov eax, dword [esp + 8]
cmp eax, edi
ja 0x40cb4d
mov dword [esp + 0x10], ebp
lea ecx, [esp + 0x28]
push eax
push esi
push ecx
call fcn.00413c10
add esp, 0xc
cmp dword [esp + 0x28], 1
je 0x40cb56
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
jmp 0x40c7ef
mov dword [esp + 4], 0
lea eax, [esp + 4]
push 0
push eax
push edi
push esi
push ebx
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x40ca77
mov eax, dword [esp + 4]
mov dword [esp + 0x2c], eax
xor eax, eax
jmp 0x40ca8d
mov esi, dword [esp + 8]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x10], ebp
lea eax, [esp + 0x28]
push 0x2000
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x18], edi
push edi
push esi
lea eax, [esp + 0xc]
push eax
call fcn.0040b840
add esp, 0xc
mov ebx, dword [esp + 8]
mov edx, dword [esp + 4]
movzx edi, word [esp + 0xc]
xor esi, esi
mov ecx, 0x2000
mov dword [esp], ebx
test di, di
je 0x40c850
nop word cs:[eax + eax]
nop dword [eax]
xor eax, eax
test ecx, ecx
jne 0x40c940
jmp 0x40c959
cmp edx, ebx
je 0x40c960
mov bl, byte [edx]
lea eax, [edx + 1]
movzx edi, bl
test bl, bl
js 0x40c878
mov ebx, dword [esp]
mov edx, eax
xor eax, eax
test ecx, ecx
jne 0x40c940
jmp 0x40c959
mov ebp, dword [esp]
cmp eax, ebp
je 0x40c8c2
movzx eax, byte [edx + 1]
add edx, 2
and eax, 0x3f
and edi, 0x1f
cmp bl, 0xdf
jbe 0x40c8ce
mov ebp, dword [esp]
cmp edx, ebp
je 0x40c8d3
movzx ebp, byte [edx]
inc edx
and ebp, 0x3f
mov dword [esp + 0x1c], ebp
mov ebp, edx
shl eax, 6
add eax, dword [esp + 0x1c]
cmp bl, 0xf0
jb 0x40c8e7
cmp ebp, dword [esp]
je 0x40c8f1
movzx ebx, byte [ebp]
inc ebp
mov edx, ebp
and ebx, 0x3f
jmp 0x40c8f3
xor eax, eax
mov edx, ebp
and edi, 0x1f
cmp bl, 0xdf
ja 0x40c891
shl edi, 6
jmp 0x40c8ea
mov dword [esp + 0x1c], 0
shl eax, 6
add eax, dword [esp + 0x1c]
cmp bl, 0xf0
jae 0x40c8b1
shl edi, 0xc
mov ebx, dword [esp]
or edi, eax
jmp 0x40c90c
xor ebx, ebx
and edi, 7
shl eax, 6
shl edi, 0x12
or eax, edi
or eax, ebx
mov ebx, dword [esp]
cmp eax, 0x110000
mov edi, eax
je 0x40c960
cmp edi, 0xffff
jbe 0x40c840
add edi, 0xffff0000
mov ebx, edi
and edi, 0x3ff
shr ebx, 0xa
or edi, 0xdc00
or ebx, 0xd800
mov eax, edi
mov edi, ebx
mov ebx, dword [esp]
test ecx, ecx
je 0x40c959
mov word [esp + esi*2 + 0x28], di
inc esi
add ecx, 0xfffffffe
mov edi, eax
test di, di
jne 0x40c840
jmp 0x40c850
mov esi, 0x1000
jmp 0x40c96c
cmp esi, 0x1001
jae 0x40cb82
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x28]
mov dword [esp + 4], 0
push 0
lea edx, [esp + 8]
push edx
push esi
push eax
push ecx
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
je 0x40ca59
mov edi, dword [esp + 4]
lea edx, [esp + 0x28]
cmp edi, esi
je 0x40cb35
jae 0x40cb8f
movzx eax, word [esp + edi*2 + 0x28]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x311
ja 0x40c9ee
lea eax, [esp + edi*2 + 0x28]
inc edi
mov dword [esp + 4], 0
push 0
lea ecx, [esp + 8]
push ecx
push 1
push eax
push dword [esp + 0x24]
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
jne 0x40c9ea
call sub.KERNEL32.dll_GetLastError
lea edx, [esp + 0x28]
cmp esi, edi
jb 0x40cba0
test edi, edi
je 0x40cb33
add edi, edi
xor ebx, ebx
jmp 0x40ca1e
add ebx, ecx
add edx, 2
add edi, 0xfffffffe
je 0x40cb35
movzx eax, word [edx]
mov ecx, 1
cmp eax, 0x80
jb 0x40ca10
mov esi, edx
movzx edx, ax
mov ecx, 2
cmp edx, 0x800
mov edx, esi
jb 0x40ca10
add eax, 0x2312
xor ecx, ecx
movzx eax, ax
cmp eax, 0x311
seta cl
lea ecx, [ecx + ecx + 1]
jmp 0x40ca10
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [esp + 0x10]
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
jmp 0x40c71c
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 0x30], eax
mov eax, 1
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x30]
movsd xmm0, qword [esp + 0x28]
mov dword [ebp + 8], eax
movsd qword [ebp], xmm0
jmp 0x40c71c
push 1
push 0x4f
call fcn.00459bd0
add esp, 8
test eax, eax
je 0x40cbb1
mov edi, eax
push 0x4f
push 0x46280c
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push 4
push 0xc
call fcn.00459bd0
add esp, 8
test eax, eax
je 0x40cb47
mov ebx, eax
mov dword [eax], edi
mov dword [eax + 4], 0x4f
mov dword [eax + 8], 0x4f
push 4
push 0xc
call fcn.00459bd0
add esp, 8
test eax, eax
je 0x40cb47
movzx ecx, word [esp + 0x28]
mov dl, byte [esp + 0x2a]
mov dword [eax], ebx
mov dword [eax + 4], 0x461698
mov byte [eax + 8], 0xc
mov dword [ebp + 8], eax
mov dword [ebp + 4], 2
mov dword [ebp], 1
mov word [eax + 9], cx
mov byte [eax + 0xb], dl
jmp 0x40c71c
xor ebx, ebx
mov eax, dword [esp + 0x10]
mov dword [eax + 4], ebx
mov dword [eax], 0
jmp 0x40c71c
push 4
push 0xc
jmp 0x40cbb5
push 0x4627ec
push edi
push eax
jmp 0x40cba7
movsd xmm0, qword [esp + 0x2c]
lea eax, [esp + 0x20]
movsd qword [esp + 0x20], xmm0
push 0x4627fc
push 0x4613a8
push eax
push 0x2b
push 0x46136c
call fcn.00410b80
add esp, 0x14
ud2
push 0x46285c
push 0x1000
push esi
jmp 0x40cba7
push 0x46286c
push esi
push edi
call fcn.00410d00
add esp, 0xc
ud2
push 0x46287c
push esi
push edi
call fcn.00413b50
add esp, 0xc
ud2
push 1
push 0x4f
call fcn.00416b80
add esp, 8
ud2