Function at 0x411d70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x63c
mov dword [esp + 4], 0x45a6e1
mov dword [esp], 0x45a6e5
call dword [sym.imp.msvcrt.dll__tempnam]
mov ebx, dword [sym.imp.msvcrt.dll_fopen]
mov dword [esp + 4], 0x45b385
mov edi, eax
mov dword [esp], eax
call ebx
mov dword [esp + 8], 0x1c
mov dword [esp + 0xc], eax
mov esi, eax
mov dword [esp + 4], 1
mov dword [esp], str.This_is_a_test_file_put_get_n
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll_fclose]
mov dword [esp], esi
lea esi, [ebp - 0x61a]
mov dword [ebp - 0x630], eax
call eax
mov dword [ebp - 0x62c], edi
mov dword [esp], edi
mov dword [esp + 4], 0x45b429
call ebx
mov ecx, dword [sym.imp.msvcrt.dll_fgets]
mov dword [esp], esi
mov edi, eax
mov dword [esp + 8], eax
mov dword [ebp - 0x634], ecx
mov dword [esp + 4], 0x200
call ecx
mov dword [esp + 4], 0x4b3
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_strlen]
mov dword [esp + 4], str.TEXT_BINARY_mode_not_handled_for_write_n
cmp eax, 0x1d
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x4b4
mov dword [esp], 0x45a2c0
call fcn.0044c860
xor eax, eax
cmp byte [ebp - 0x5ff], 0xd
mov dword [esp + 4], str.CR_not_written_n
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x630]
call eax
mov edi, dword [ebp - 0x62c]
mov dword [esp + 4], 0x45b139
mov dword [esp], edi
call ebx
mov dword [esp + 8], 0x1d
mov dword [esp + 0xc], eax
mov edi, eax
mov dword [esp + 4], 1
mov dword [esp], str.This_is_a_test_file_put_get_r_n
call sub.msvcrt.dll_fwrite
mov dword [esp], edi
mov eax, dword [ebp - 0x630]
call eax
mov edi, dword [ebp - 0x62c]
mov dword [esp + 4], 0x45b14a
mov dword [esp], edi
call ebx
mov ecx, dword [ebp - 0x634]
mov dword [esp], esi
mov edi, eax
mov dword [esp + 8], eax
mov dword [ebp - 0x638], ecx
mov dword [esp + 4], 0x200
call ecx
mov dword [esp + 4], 0x4bb
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov edx, dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp], esi
mov dword [esp + 4], str.This_is_a_test_file_put_get_n
mov dword [ebp - 0x634], edx
call edx
mov dword [esp + 4], str._O_TEXT_read_doesnt_strip_CR_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x630]
call eax
mov edi, dword [ebp - 0x62c]
mov dword [esp + 4], 0x45b429
mov dword [esp], edi
call ebx
mov ecx, dword [ebp - 0x638]
mov dword [esp], esi
mov edi, eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0x200
call ecx
mov dword [esp + 4], 0x4bf
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov edx, dword [ebp - 0x634]
mov dword [esp], esi
mov dword [esp + 4], str.This_is_a_test_file_put_get_r_n
call edx
mov dword [esp + 4], str._O_BINARY_read_doesnt_preserve_CR_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x630]
call eax
mov edi, dword [ebp - 0x62c]
mov dword [esp + 4], 0x45b14a
mov dword [esp], edi
lea edi, [ebp - 0x41a]
call ebx
mov dword [esp + 4], 0x200
xor ebx, ebx
mov esi, eax
mov dword [esp + 8], eax
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fgetws]
mov eax, str.This_is_a_test_file_put_get_n
call fcn.00411550
xor edx, edx
lea esi, [esi]
nop
movzx ecx, word [edi + edx*2]
cmp word [eax + edx*2], cx
setne cl
add edx, 1
movzx ecx, cl
or ebx, ecx
cmp edx, 0x1c
jne 0x412000
mov dword [esp + 4], 0x4cc
xor ebx, 1
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x634], eax
call fcn.0044c860
mov dword [esp], ebx
mov dword [esp + 4], str.fgetwc_doesnt_strip_CR_in_TEXT_mode_n
call fcn.0044cad0
mov eax, dword [ebp - 0x634]
mov ebx, dword [sym.imp.msvcrt.dll_free]
mov dword [esp], eax
call ebx
mov dword [esp], esi
mov eax, dword [ebp - 0x630]
call eax
mov esi, dword [ebp - 0x62c]
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__unlink]
mov dword [esp], esi
call ebx
add esp, 0x63c
pop ebx
pop esi
pop edi
pop ebp
ret