Function at 0x4115e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, 0x1fc
push esi
push ebx
sub esp, 0x85c
mov dword [esp + 4], 0x45a6e1
mov dword [esp], 0x45a6e5
call dword [sym.imp.msvcrt.dll__tempnam]
mov dword [esp + 4], 0x45b139
mov dword [ebp - 0x834], eax
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_fopen]
mov dword [ebp - 0x83c], eax
call eax
mov esi, dword [sym.imp.msvcrt.dll_fputc]
mov ebx, eax
lea esi, [esi]
mov dword [esp + 4], ebx
mov dword [esp], 0x61
call esi
sub edi, 1
jne 0x411630
mov dword [esp + 4], ebx
mov dword [esp], 0xd
call esi
mov dword [esp + 4], ebx
mov dword [esp], 0xa
call esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x15
mov dword [esp + 4], 1
mov dword [esp], str.This_is_test_fgetwc_r_n
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll_fclose]
mov dword [esp], ebx
mov dword [ebp - 0x840], eax
call eax
mov eax, dword [ebp - 0x834]
mov dword [esp + 4], 0x45b14a
mov dword [esp], eax
mov eax, dword [ebp - 0x83c]
call eax
mov dword [esp + 4], 0x200
mov ebx, eax
mov dword [esp + 8], eax
lea eax, [ebp - 0x81a]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_fgetws]
mov dword [ebp - 0x830], eax
call eax
mov ecx, dword [sym.imp.msvcrt.dll_ftell]
mov dword [esp], ebx
mov dword [ebp - 0x82c], ecx
call ecx
mov dword [esp + 4], 0x310
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x838], eax
call fcn.0044c860
mov eax, dword [ebp - 0x838]
mov dword [esp + 8], 0x1fe
mov dword [esp + 4], str.ftell_expected__d_got__d_n
cmp eax, 0x1fe
mov dword [esp + 0xc], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
lea edx, [ebp - 0x81a]
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x830]
mov dword [esp], edx
mov dword [esp + 4], 0x200
call eax
mov ecx, dword [ebp - 0x82c]
mov dword [esp], ebx
call ecx
mov dword [esp + 4], 0x313
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x838], eax
call fcn.0044c860
mov eax, dword [ebp - 0x838]
mov dword [esp + 8], 0x213
mov dword [esp + 4], str.ftell_expected__d_got__d_n
cmp eax, 0x213
mov dword [esp + 0xc], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov eax, str.This_is_test_fgetwc_r_n
call fcn.00411550
mov ecx, eax
mov dword [ebp - 0x838], eax
xor eax, eax
movzx edx, word [ebp + edi*2 - 0x81a]
cmp word [ecx + edi*2], dx
setne dl
add edi, 1
movzx edx, dl
or eax, edx
cmp edi, 0x13
jne 0x4117a4
mov dword [esp + 4], 0x31b
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x844], eax
call fcn.0044c860
mov eax, dword [ebp - 0x844]
mov dword [esp + 4], str.fgetwc_difference_found_in_TEXT_mode_n
xor eax, 1
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x31c
mov dword [esp], 0x45a2c0
call fcn.0044c860
xor eax, eax
cmp word [ebp - 0x7f4], 0xa
mov dword [esp + 4], str.Carriage_return_was_not_skipped_n
sete al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], ebx
mov eax, dword [ebp - 0x840]
call eax
mov ebx, dword [ebp - 0x834]
mov eax, dword [sym.imp.msvcrt.dll__unlink]
mov dword [esp], ebx
mov dword [ebp - 0x844], eax
call eax
mov dword [esp], ebx
mov eax, dword [ebp - 0x83c]
mov ebx, 0x1d3
mov dword [esp + 4], 0x45b139
call eax
mov edi, eax
nop
mov dword [esp + 4], edi
mov dword [esp], 0x61
call esi
sub ebx, 1
jne 0x411860
mov esi, dword [sym.imp.msvcrt.dll_fputwc]
mov dword [esp + 4], edi
mov dword [esp], 0xd
call esi
mov dword [esp + 4], edi
mov dword [esp], 0xa
call esi
lea eax, [ebp - 0x81a]
mov esi, dword [sym.imp.msvcrt.dll_fputws]
mov dword [esp + 4], edi
mov dword [esp], eax
call esi
lea eax, [ebp - 0x81a]
mov dword [esp + 4], edi
mov dword [esp], eax
call esi
mov dword [esp], edi
mov eax, dword [ebp - 0x840]
call eax
mov eax, dword [ebp - 0x834]
mov dword [esp + 4], 0x45b429
mov dword [esp], eax
mov eax, dword [ebp - 0x83c]
call eax
mov dword [esp + 4], 0xea
mov edi, eax
mov dword [ebp - 0x83c], eax
mov dword [esp + 8], eax
lea eax, [ebp - 0x81a]
mov dword [esp], eax
mov eax, dword [ebp - 0x830]
call eax
mov dword [esp], edi
mov eax, dword [ebp - 0x82c]
call eax
mov dword [esp + 4], 0x334
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 0x1d2
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], 0x1d2
mov dword [esp], eax
mov dword [esp + 4], str.ftell_expected__d_got__d_n
call fcn.0044cad0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_fgetc]
mov dword [esp + 4], 0x336
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 0x61
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], 0x61
mov dword [esp], eax
mov dword [esp + 4], str.fgetc_expected__d_got__d_n
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x82c]
call eax
mov dword [esp + 4], 0x339
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 0x1d3
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], 0x1d3
mov dword [esp], eax
mov dword [esp + 4], str.ftell_expected__d_got__d_n
call fcn.0044cad0
lea edx, [ebp - 0x81a]
mov ecx, dword [ebp - 0x830]
mov dword [esp + 8], edi
mov dword [esp], edx
mov dword [esp + 4], 3
call ecx
mov dword [esp + 4], 0x33b
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx edx, word [ebp - 0x81a]
mov dword [esp + 4], str.expected_carriage_return_got__04hx_n
cmp dx, 0xd
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x33c
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx edx, word [ebp - 0x818]
mov dword [esp + 4], str.expected_newline_got__04hx_n
cmp dx, 0xa
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x82c]
lea edi, [ebp - 0x81a]
call eax
mov dword [esp + 4], 0x33f
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 0x1d7
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], 0x1d7
mov dword [esp], eax
mov dword [esp + 4], str.ftell_expected__d_got__d_n
call fcn.0044cad0
mov eax, edi
xor edx, edx
add eax, 2
mov word [eax - 2], dx
lea edx, [ebp - 0x7f0]
cmp edx, eax
jne 0x411ab1
mov esi, dword [ebp - 0x83c]
lea eax, [ebp - 0x81a]
mov dword [esp + 4], 0x200
mov dword [esp], eax
mov eax, dword [ebp - 0x830]
mov dword [esp + 8], esi
call eax
mov dword [esp], esi
mov eax, dword [ebp - 0x82c]
call eax
mov dword [esp + 4], 0x346
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 0x1ff
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], 0x1ff
xor esi, esi
mov dword [esp], eax
mov dword [esp + 4], str.ftell_expected__d_got__d_n
call fcn.0044cad0
xor eax, eax
mov dword [ebp - 0x82c], ebx
mov ebx, dword [ebp - 0x838]
mov dword [ebp - 0x848], edi
mov edi, eax
lea esi, [esi]
nop
mov dword [esp + 4], 0x34c
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx ecx, word [ebp + esi*2 - 0x81a]
movzx eax, word [ebx + esi*2]
mov dword [esp + 8], esi
mov dword [esp + 4], str.Char__d_expected__04hx_got__04hx_n
mov edx, ecx
mov dword [esp + 0x10], ecx
movzx ecx, ax
cmp dx, ax
mov dword [esp + 0xc], ecx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
movzx eax, word [ebp + esi*2 - 0x81a]
cmp word [ebx + esi*2], ax
setne al
add esi, 1
movzx eax, al
or edi, eax
cmp esi, 0x13
jne 0x411b50
mov dword [esp + 4], 0x34f
mov esi, edi
mov ebx, dword [ebp - 0x82c]
mov dword [esp], 0x45a2c0
mov edi, dword [ebp - 0x848]
call fcn.0044c860
mov eax, esi
mov dword [esp + 4], str.fgetwc_difference_found_in_BINARY_mode_n
xor eax, 1
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x350
mov dword [esp], 0x45a2c0
call fcn.0044c860
xor eax, eax
cmp word [ebp - 0x7f4], 0xa
mov dword [esp + 4], str.Should_get_newline_n
sete al
mov dword [esp], eax
call fcn.0044cad0
nop
xor eax, eax
add edi, 2
mov word [edi - 2], ax
lea eax, [ebp - 0x7f0]
cmp eax, edi
jne 0x411c20
mov eax, dword [ebp - 0x83c]
mov dword [esp + 4], 0x200
xor esi, esi
mov dword [esp + 8], eax
lea eax, [ebp - 0x81a]
mov dword [esp], eax
mov eax, dword [ebp - 0x830]
call eax
mov edi, dword [ebp - 0x838]
nop
mov dword [esp + 4], 0x35b
mov dword [esp], 0x45a2c0
call fcn.0044c860
movzx ecx, word [ebp + ebx*2 - 0x81a]
movzx eax, word [edi + ebx*2]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Char__d_expected__04hx_got__04hx_n
mov edx, ecx
mov dword [esp + 0x10], ecx
movzx ecx, ax
cmp dx, ax
mov dword [esp + 0xc], ecx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
movzx eax, word [ebp + ebx*2 - 0x81a]
cmp word [edi + ebx*2], ax
setne al
add ebx, 1
movzx eax, al
or esi, eax
cmp ebx, 0x13
jne 0x411c60
mov dword [esp + 4], 0x35e
xor esi, 1
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], esi
mov dword [esp + 4], str.fgetwc_difference_found_in_BINARY_mode_n
call fcn.0044cad0
mov dword [esp + 4], 0x35f
mov dword [esp], 0x45a2c0
call fcn.0044c860
xor eax, eax
cmp word [ebp - 0x7f4], 0xa
mov dword [esp + 4], str.Should_get_newline_n
sete al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x838]
mov ebx, dword [sym.imp.msvcrt.dll_free]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x83c]
mov dword [esp], eax
mov eax, dword [ebp - 0x840]
call eax
mov esi, dword [ebp - 0x834]
mov eax, dword [ebp - 0x844]
mov dword [esp], esi
call eax
mov dword [esp], esi
call ebx
add esp, 0x85c
pop ebx
pop esi
pop edi
pop ebp
ret