Function at 0x410650
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x13c
mov dword [esp + 4], 0x45a6e1
mov dword [esp], 0x45a6e5
call dword [sym.imp.msvcrt.dll__tempnam]
mov esi, dword [sym.imp.msvcrt.dll_fopen]
mov dword [esp + 4], 0x45b139
mov dword [ebp - 0x11c], eax
mov dword [esp], eax
call esi
mov dword [esp + 8], 0x12
mov dword [esp + 0xc], eax
mov ebx, eax
mov dword [esp + 4], 1
mov dword [esp], str.This_is_test_ctrlz
call sub.msvcrt.dll_fwrite
mov edi, dword [sym.imp.msvcrt.dll_fputc]
mov dword [esp + 4], ebx
mov dword [esp], 0x1a
call edi
mov dword [esp + 4], ebx
mov dword [esp], 0xd
call edi
mov dword [esp + 4], ebx
mov dword [esp], 0xa
call edi
mov dword [esp + 4], ebx
mov dword [esp], 0x61
call edi
mov ecx, dword [sym.imp.msvcrt.dll_fclose]
mov dword [esp], ebx
lea ebx, [ebp - 0x118]
mov dword [ebp - 0x120], ecx
call ecx
mov eax, dword [ebp - 0x11c]
mov dword [esp + 4], 0x45b14a
mov dword [esp], eax
call esi
mov dword [esp + 4], 0x487
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
mov eax, dword [sym.imp.msvcrt.dll_fgets]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x100
mov dword [esp], ebx
mov dword [ebp - 0x124], eax
call eax
mov dword [esp + 4], str.fgets_failed_unexpected_n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov eax, ebx
mov ecx, dword [eax]
add eax, 4
lea edx, [ecx - 0x1010101]
not ecx
and edx, ecx
and edx, 0x80808080
je 0x41075c
mov ecx, edx
mov dword [esp + 4], 0x48a
shr ecx, 0x10
test edx, 0x8080
mov dword [esp], 0x45a2c0
cmove edx, ecx
lea ecx, [eax + 2]
cmove eax, ecx
mov ecx, edx
add cl, dl
sbb eax, 3
sub eax, ebx
mov dword [ebp - 0x128], eax
call fcn.0044c860
mov eax, dword [ebp - 0x128]
mov dword [esp + 8], 0x12
mov dword [esp + 4], str.returned_string_length_expected__d_got__d_n
cmp eax, 0x12
mov dword [esp + 0xc], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [sym.imp.msvcrt.dll_ftell]
mov dword [esp], edi
mov dword [ebp - 0x128], eax
call eax
mov dword [esp + 4], 0x48d
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x12c], eax
call fcn.0044c860
mov eax, dword [ebp - 0x12c]
mov dword [esp + 8], 0x16
mov dword [esp + 4], str.ftell_expected__d_got__d_n
cmp eax, 0x16
mov dword [esp + 0xc], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x48e
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [sym.imp.msvcrt.dll_feof]
mov dword [esp], edi
mov dword [ebp - 0x12c], eax
call eax
mov dword [esp + 4], str.did_not_get_EOF_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x120]
mov edi, ebx
call eax
mov eax, dword [ebp - 0x11c]
mov dword [esp + 4], 0x45b429
mov dword [esp], eax
call esi
mov dword [esp + 4], 0x492
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x124]
mov dword [esp + 4], 0x100
mov dword [esp], ebx
call eax
mov dword [esp + 4], str.fgets_failed_unexpected_n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [edi]
add edi, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x4108c3
mov edx, eax
mov dword [esp + 4], 0x495
shr edx, 0x10
test eax, 0x8080
mov dword [esp], 0x45a2c0
cmove eax, edx
lea edx, [edi + 2]
cmove edi, edx
mov ecx, eax
add cl, al
sbb edi, 3
call fcn.0044c860
sub edi, ebx
xor eax, eax
mov dword [esp + 8], 0x15
cmp edi, 0x15
mov dword [esp + 0xc], edi
sete al
mov dword [esp + 4], str.returned_string_length_expected__d_got__d_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], esi
mov eax, dword [ebp - 0x128]
call eax
mov dword [esp + 4], 0x497
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
xor eax, eax
cmp edi, 0x15
mov dword [esp + 0xc], edi
sete al
mov dword [esp + 8], 0x15
mov edi, ebx
mov dword [esp], eax
mov dword [esp + 4], str.ftell_expected__d_got__d_n
call fcn.0044cad0
mov dword [esp + 4], 0x498
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x124]
mov dword [esp + 4], 0x100
mov dword [esp], ebx
call eax
mov dword [esp + 4], str.fgets_failed_unexpected_n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [edi]
add edi, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x4109b7
mov edx, eax
mov dword [esp + 4], 0x49a
shr edx, 0x10
test eax, 0x8080
mov dword [esp], 0x45a2c0
cmove eax, edx
lea edx, [edi + 2]
cmove edi, edx
mov ecx, eax
add cl, al
sbb edi, 3
call fcn.0044c860
sub edi, ebx
xor eax, eax
mov dword [esp + 8], 1
cmp edi, 1
mov dword [esp + 0xc], edi
sete al
mov dword [esp + 4], str.returned_string_length_expected__d_got__d_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x49b
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], esi
mov eax, dword [ebp - 0x12c]
call eax
mov dword [esp + 4], str.did_not_get_EOF_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], esi
mov eax, dword [ebp - 0x120]
call eax
mov ebx, dword [ebp - 0x11c]
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__unlink]
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_free]
add esp, 0x13c
pop ebx
pop esi
pop edi
pop ebp
ret