Function at 0x4019c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x30
mov esi, esp
cmp byte [0x40d1c8], 0
jne 0x401791
mov byte [0x40d1c8], 1
call fcn.00401f30
shl eax, 2
lea eax, [eax + eax*4]
call fcn.00402164
mov eax, esp
and eax, 0xfffffff0
mov esp, eax
mov dword [0x40d1cc], eax
mov dword [0x40d1d0], 0
mov ecx, dword [0x40b298]
mov eax, ecx
sub eax, dword [0x40b29c]
cmp eax, 7
jle 0x401791
mov ebx, dword [0x40b29c]
mov eax, ecx
sub eax, ebx
cmp eax, 0xc
jl 0x4016f4
mov ebx, dword [0x40b29c]
cmp dword [ebx], 0
jne 0x4016f4
mov ebx, dword [0x40b29c]
cmp dword [ebx + 4], 0
jne 0x4016f4
mov eax, dword [0x40b29c]
lea ebx, [eax + 0xc]
cmp dword [eax + 8], 0
cmovne ebx, eax
cmp dword [ebx], 0
jne 0x401703
cmp dword [ebx + 4], 0
je 0x401799
cmp ebx, dword [0x40b298]
jae 0x401745
mov edi, dword [0x40b040]
nop word cs:[eax + eax]
nop dword [eax + eax]
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
add eax, dword [ecx + edi]
add ecx, edi
mov dword [esi + 0x18], eax
lea edx, [esi + 0x18]
push 4
call 0x401860
add esp, 4
add ebx, 8
cmp ebx, dword [0x40b298]
jb 0x401720
mov eax, dword [0x40d1d0]
test eax, eax
jle 0x401791
xor edi, edi
mov ebx, 8
mov ecx, dword [0x40d1cc]
jmp 0x40176a
add edi, 1
add ebx, 0x14
cmp edi, eax
jge 0x401791
mov edx, dword [ecx + ebx - 8]
test edx, edx
je 0x401760
lea eax, [esi + 0x1c]
push eax
push edx
push dword [ecx + ebx]
push dword [ecx + ebx - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [0x40d1cc]
mov eax, dword [0x40d1d0]
jmp 0x401760
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebx + 8]
cmp eax, 1
je 0x4017c3
push eax
push str.__Unknown_pseudo_relocation_protocol_version__d._n
call 0x4019c0
sub eax, edi
mov ecx, dword [esi + 0x10]
add eax, dword [ecx]
mov dword [esi + 0xc], eax
lea edx, [esi + 0xc]
push 4
call 0x401860
add esp, 4
add ebx, 0xc
cmp ebx, dword [0x40b298]
jae 0x401745
mov ecx, dword [ebx + 4]
mov edx, dword [0x40b040]
add ecx, edx
mov dword [esi + 0x10], ecx
mov edi, dword [ebx]
mov ecx, dword [ebx + 8]
mov eax, dword [edi + edx]
add edi, edx
cmp cl, 0x20
je 0x4017ac
cmp cl, 0x10
je 0x401823
cmp cl, 8
jne 0x401849
mov edx, dword [esi + 0x10]
movzx ecx, byte [edx]
mov dword [esi + 0x14], ecx
mov ecx, dword [esi + 0x14]
add ecx, 0xffffff00
cmp byte [esi + 0x14], 0
cmovns ecx, dword [esi + 0x14]
sub eax, edi
add eax, ecx
mov dword [esi + 0xc], eax
mov ecx, edx
lea edx, [esi + 0xc]
push 1
jmp 0x4017bb
mov ecx, dword [esi + 0x10]
movzx edx, word [ecx]
lea ecx, [edx - 0x10000]
test dx, dx
cmovns ecx, edx
sub eax, edi
add eax, ecx
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0xc]
push 2
jmp 0x4017bb
movzx eax, cl
push eax
push str.__Unknown_pseudo_relocation_bit_size__d._n
call 0x4019c0
nop word [eax + eax]
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov dword [esp], edx
mov esi, ecx
mov ebp, dword [0x40d1d0]
test ebp, ebp
jle 0x4018ad
mov eax, dword [0x40d1cc]
add eax, 0x10
mov ecx, ebp
jmp 0x401898
add eax, 0x14
add ecx, 0xffffffff
je 0x4018af
mov edx, dword [eax - 4]
cmp edx, esi
ja 0x401890
mov ebx, dword [eax]
add edx, dword [ebx + 8]
cmp edx, esi
jbe 0x401890
jmp 0x40196b
xor ebp, ebp
push esi
call fcn.00401ec0
add esp, 4
test eax, eax
je 0x401981
mov ebx, eax
mov eax, dword [0x40d1cc]
lea ecx, [ebp*4]
lea edi, [ecx + ecx*4]
mov dword [eax + edi + 0x10], ebx
mov dword [eax + edi], 0
call fcn.00401fe0
add eax, dword [ebx + 0xc]
mov ecx, dword [0x40d1cc]
mov dword [ecx + edi + 0xc], eax
lea ecx, [esp + 4]
push 0x1c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40198c
mov eax, dword [esp + 0x18]
cmp eax, 7
jle 0x401920
cmp eax, 8
je 0x401964
cmp eax, 0x40
je 0x401964
cmp eax, 0x80
je 0x401964
jmp 0x40192f
mov ecx, 4
cmp eax, 2
je 0x401934
cmp eax, 4
je 0x401964
mov ecx, 0x40
mov eax, dword [esp + 4]
mov edx, dword [0x40d1cc]
lea edi, [ebp*4]
add edi, ebp
lea ebx, [edx + edi*4]
mov dword [edx + edi*4 + 4], eax
mov ebp, dword [esp + 0x10]
mov dword [edx + edi*4 + 8], ebp
push ebx
push ecx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4019ab
add dword [0x40d1d0], 1
push dword [esp + 0x34]
push dword [esp + 4]
push esi
call sub.msvcrt.dll_memcpy
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
push esi
push str.Address__p_has_no_image_section
call 0x4019c0
mov eax, dword [0x40d1cc]
lea ecx, [ebp*4]
add ecx, ebp
push dword [eax + ecx*4 + 0xc]
push dword [ebx + 8]
push str.__VirtualQuery_failed_for__d_bytes_at_address__p
call 0x4019c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__VirtualProtect_failed_with_code_0x_x
call 0x4019c0
nop dword [eax]
push esi
push eax
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
mov dword [esp], eax
push 2
call fcn.00401da0
add esp, 4
push eax
push 1
push 0x1b
push str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 2
call fcn.00401da0
add esp, 4
push dword [esp]
push esi
push eax
call sub.msvcrt.dll_vfprintf
add esp, 0xc
call sub.msvcrt.dll_abort
int3