Function at 0x40e9b0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov eax, dword [esp + 0xb0]
mov dword [0x4d04b0], 0x49f21b
mov dword [0x4d04ac], 0x49f21b
test eax, eax
je 0x40ea80
mov eax, dword [esp + 0xb0]
mov dword [esp + 4], 0x49f290
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [esp + 0x30], 0
test eax, eax
mov dword [0x4d04c4], eax
je 0x40ea54
mov eax, dword [0x4d4ff8]
test al, 4
je 0x40ea18
mov dword [0x4990b0], 0
test al, 0x80
jne 0x40ed52
test al, 1
jne 0x40eaa0
test al, 2
jne 0x40ef86
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40ef40
mov eax, dword [0x4d04cc]
test eax, eax
je 0x40ea49
mov dword [esp], eax
call sub.msvcrt.dll_fclose
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0047f590
mov dword [esp], str.cant_open__s:__s
mov dword [esp + 8], eax
mov eax, dword [esp + 0xb0]
mov dword [esp + 4], eax
call fcn.00412380
nop
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0x30], 1
add eax, 0x20
mov dword [0x4d04c4], eax
jmp 0x40ea05
mov eax, dword [0x4990b8]
mov dword [esp], eax
call fcn.0047d5d0
mov dword [esp + 0x34], eax
mov eax, dword [0x4990c4]
lea edx, [eax + eax*4]
mov eax, dword [0x4990c0]
lea eax, [eax + eax*4]
imul eax, dword [0x4990bc]
lea eax, [edx + eax + 0x14]
mov dword [esp], eax
call fcn.0047d5d0
mov edx, dword [0x4d04c8]
mov dword [0x4d04b8], 1
mov edi, dword [edx + 0x10]
mov dword [0x4d04c0], eax
test edi, edi
je 0x40f5f9
xor ebp, ebp
mov dword [esp + 0x28], 1
mov ebx, ebp
mov edx, dword [edi + 0x24]
mov eax, dword [0x4990b8]
cmp dword [0x4990b4], eax
cmovle eax, dword [0x4990b4]
cmp edx, 6
mov ebp, dword [edi + 4]
mov dword [esp + 0x2c], eax
ja case.default.0x40eb25
jmp dword [edx*4 + 0x49f480]
sub dword [esp + 0x28], 1
mov esi, dword [esp + 0x28]
test esi, esi
jle 0x40ec8f
cmp edx, 4
je 0x40ecfe
cmp edx, 5
je 0x40ecf2
mov esi, dword [esp + 0x28]
test esi, esi
jle 0x40ed12
mov esi, dword [edi + 0x14]
test esi, esi
je 0x40f270
mov ecx, dword [edi + 0x18]
test ecx, ecx
je 0x40eb7e
test byte [0x4d4ff8], 8
jne 0x40f285
mov edx, dword [edi + 0xc]
test edx, edx
je 0x40ec16
test byte [0x4d4ff8], 0x10
je 0x40ed29
mov ecx, dword [edi + 0x2c]
mov eax, dword [edi + 0x10]
test ecx, ecx
je 0x40ed20
mov dword [0x4d0340], 1
mov dword [esp], edx
call sub.msvcrt.dll_free
mov dword [edi + 0xc], 0
mov edx, dword [edi + 0x24]
cmp edx, 6
je 0x40ef30
cmp edx, 5
jne 0x40ebe1
mov ecx, dword [esp + 0x28]
mov eax, 0
cmp ecx, 1
cmovne eax, ecx
mov dword [esp + 0x28], eax
mov edi, dword [edi + 0x10]
test edi, edi
je 0x40f580
mov ebx, esi
jmp 0x40eb00
mov edx, ecx
mov dword [esp + 0x38], ecx
call fcn.0040ddd0
mov ecx, dword [esp + 0x38]
test eax, eax
jne 0x40ec16
mov eax, dword [edi + 8]
mov edx, dword [eax + 0xc]
mov eax, edi
mov dword [esp], ebx
call fcn.0040e160
mov eax, dword [edi + 8]
cmp ebp, dword [eax + 0xc]
jbe 0x40ebbd
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x40ebbd
mov ecx, dword [esp + 0x2c]
mov ebx, 0xffffffff
mov edx, dword [esp + 0x34]
call fcn.0040e4d0
mov ecx, eax
mov eax, dword [edi + 8]
cmp dword [eax + 0xc], ebp
jb 0x40ec52
mov eax, edi
mov dword [esp + 0x38], ecx
call fcn.0040dc40
mov ecx, dword [esp + 0x38]
mov ebx, eax
test byte [0x4d4ff8], 0x10
je 0x40ec06
mov edx, dword [edi + 0x2c]
mov eax, dword [edi + 0x10]
test edx, edx
je 0x40ebf3
mov eax, dword [edi + 8]
mov dword [0x4d0340], 1
cmp ebp, dword [eax + 0xc]
ja 0x40ec1e
jmp 0x40ebbd
mov eax, dword [esp + 0x28]
test eax, eax
jne case.0x40eb25.0
sub ebp, 1
mov eax, dword [edi + 8]
cmp ebp, dword [eax + 0xc]
jbe 0x40eb41
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x40eb41
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
call fcn.0040e4d0
mov eax, dword [edi + 8]
cmp dword [eax + 0xc], ebp
jae 0x40ecc2
mov edx, dword [eax + 0x10]
test edx, edx
je 0x40eca6
mov edx, dword [edi + 0x24]
jmp 0x40eb41
sub ebp, 1
jmp case.0x40eb25.0
mov eax, dword [edi + 0x28]
mov dword [0x4d04b0], eax
jmp case.0x40eb25.0
mov eax, dword [edi + 0x28]
mov dword [0x4d04ac], eax
jmp case.0x40eb25.0
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x40eb53
add dword [esp + 0x28], 1
add ebp, 1
mov esi, dword [esp + 0x28]
test esi, esi
jg 0x40eb5f
mov esi, ebx
jmp 0x40ebc9
call fcn.0040ddd0
test eax, eax
jne 0x40ed4a
mov eax, edi
call fcn.0040dc40
mov edx, dword [edi + 8]
mov ecx, dword [edi + 0xc]
mov edx, dword [edx + 0xc]
test edx, edx
jne 0x40ed40
mov edx, dword [edi + 4]
mov dword [esp], eax
mov eax, edi
call fcn.0040e160
mov edx, dword [edi + 0xc]
jmp 0x40ebae
xor eax, eax
mov dword [0x4d04b8], 1
call fcn.0040dfb0
mov eax, dword [0x4d04c4]
mov dword [esp + 0x10], 0x49f2a4
mov dword [esp + 0xc], 0x49f2c1
mov dword [esp + 8], str.2.26
mov dword [esp + 4], str._GNU_assembler_version__s___s__n_t_using_BFD_version__s.
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x4d04c4]
mov dword [esp + 8], 0x13
mov dword [esp + 4], 1
mov dword [esp], str._n_options_passed_t:
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0xb4]
mov edx, 3
mov dword [esp + 0x28], 0x13
mov ebx, dword [eax + 4]
lea ebp, [eax + 4]
test ebx, ebx
jne 0x40eddf
jmp 0x40ee10
mov ebx, dword [ebp + 4]
add ebp, 4
test ebx, ebx
je 0x40ee10
cmp byte [ebx], 0x2d
jne 0x40edd5
mov edi, 0x49f39a
mov esi, ebx
mov ecx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40eec8
mov eax, dword [ebp + 4]
test eax, eax
je 0x40ee10
mov ebx, dword [ebp + 8]
add ebp, 4
add ebp, 4
test ebx, ebx
jne 0x40eddf
lea esi, [esi]
mov eax, dword [0x4d04bc]
lea ebx, [esp + 0x72]
mov dword [esp + 4], str._n_input_file_____t:__s
mov dword [esp + 8], eax
mov eax, dword [0x4d04c4]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x4d5038]
mov dword [esp + 4], str._n_output_file____t:__s
mov dword [esp + 8], eax
mov eax, dword [0x4d04c4]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x4d04c4]
mov dword [esp + 8], str.avr_unknown_none
mov dword [esp + 4], str._n_target_________t:__s
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x6c]
mov dword [esp], eax
call sub.msvcrt.dll_localtime
mov dword [esp + 8], str._Y__m__dT_H:_M:_S.000_z
mov dword [esp + 4], 0x1e
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_strftime
mov eax, dword [0x4d04c4]
mov dword [esp + 8], ebx
mov dword [esp + 4], str._n_time_stamp_____t:__s_n_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x4d4ff8]
jmp 0x40ea20
mov edi, 0x49f39d
mov esi, ebx
mov ecx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40edd5
mov dword [esp], ebx
mov dword [esp + 0x2c], edx
call sub.msvcrt.dll_strlen
mov edx, dword [esp + 0x2c]
add dword [esp + 0x28], eax
mov esi, eax
mov eax, dword [esp + 0x28]
cmp eax, dword [0x4990b4]
jl 0x40f5d4
mov eax, dword [0x4d04c4]
mov dword [esp + 8], ebx
mov dword [esp + 4], str._n_t_s
mov dword [esp + 0x2c], edx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov ebx, dword [ebp + 4]
mov dword [esp + 0x28], esi
mov edx, dword [esp + 0x2c]
jmp 0x40edd8
mov dword [0x4d04b8], 1
jmp 0x40ebe1
mov eax, dword [0x4d04c4]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
cmp eax, 0xffffffff
jne 0x40ea38
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0047f590
mov dword [esp], 0x49f46c
mov dword [esp + 8], eax
mov eax, dword [esp + 0xb0]
mov dword [esp + 4], eax
call fcn.00412380
jmp 0x40ea38
xor eax, eax
xor esi, esi
mov dword [0x4d04b8], 1
lea edi, [esp + 0x72]
call fcn.0040dfb0
mov ebx, dword [0x4d52d0]
test ebx, ebx
jne 0x40efee
jmp 0x40f202
mov dword [esp], ebx
call fcn.0041bbe0
cmp eax, dword [0x4d504c]
je 0x40f00c
mov dword [esp], ebx
call fcn.0041bbe0
cmp eax, dword [0x4d502c]
je 0x40f00c
mov dword [esp], ebx
call fcn.0041e330
test eax, eax
je 0x40f0c0
mov dword [esp], ebx
call fcn.0041dd30
test eax, eax
mov ebx, eax
je 0x40f029
mov dword [esp], ebx
call fcn.0041bbe0
cmp eax, 0x49a130
je 0x40f00c
mov dword [esp], ebx
call fcn.0041bbe0
cmp eax, 0x49a088
jne 0x40efb0
mov dword [esp], ebx
call fcn.0041bbe0
cmp eax, 0x49a130
je 0x40efd0
mov dword [esp], ebx
call fcn.0041dd30
test eax, eax
mov ebx, eax
jne 0x40efee
test esi, esi
je 0x40f202
mov dword [esp + 4], 0x49f25b
xor esi, esi
mov dword [esp], 0
call fcn.0040e120
mov ebx, dword [0x4d52d0]
test ebx, ebx
jne 0x40f068
jmp 0x40f1b8
mov dword [esp], ebx
call fcn.0041dd30
test eax, eax
mov ebx, eax
je 0x40f1b0
mov dword [esp], ebx
call fcn.0041bbb0
test eax, eax
je 0x40f056
mov dword [esp], ebx
call fcn.0041bbb0
cmp byte [eax], 0
je 0x40f056
mov dword [esp], ebx
call fcn.0041bbe0
cmp eax, 0x49a088
jne 0x40f056
test esi, esi
je 0x40f5ae
mov dword [esp], ebx
mov esi, 1
call fcn.0041bbb0
mov dword [esp + 4], 0x49f217
mov dword [esp], 0
mov dword [esp + 8], eax
call fcn.0040e120
jmp 0x40f056
mov dword [esp], ebx
call fcn.0041bbb0
test eax, eax
je 0x40efe0
mov dword [esp], ebx
call fcn.0041cd70
mov dword [esp + 4], 0x49f40b
mov dword [esp], edi
mov dword [esp + 8], eax
call sub.msvcrt.dll_sprintf
test esi, esi
je 0x40f1d1
mov dword [esp], ebx
call fcn.0041dff0
test eax, eax
je 0x40f233
mov dword [esp], ebx
call fcn.0041dff0
mov edx, dword [eax + 0x28]
test edx, edx
je 0x40f233
mov dword [esp], ebx
call fcn.0041bbb0
mov dword [esp], ebx
mov dword [esp + 0x28], eax
call fcn.0041bbe0
mov ebp, dword [eax]
mov dword [esp], ebx
call fcn.0041dff0
mov eax, dword [eax + 0x28]
mov esi, dword [eax + 4]
mov dword [esp], ebx
call fcn.0041dff0
mov edx, dword [esp + 0x28]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + 8]
mov eax, dword [eax + 4]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebp
mov dword [esp + 8], eax
mov eax, dword [0x4d04c4]
mov dword [esp + 0xc], esi
mov dword [esp + 4], str._20s:__5d___s:_s__s_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
xor eax, eax
mov esi, 1
add dword [0x4d04a8], 1
call fcn.0040dfb0
jmp 0x40efe0
mov dword [esp + 8], str.listing_listing
mov dword [esp + 4], 0x4de
mov dword [esp], str..._.._binutils_gas_listing.c
call fcn.00412630
lea esi, [esi]
test esi, esi
jne 0x40ea2c
mov dword [esp + 4], str.NO_UNDEFINED_SYMBOLS_n
mov dword [esp], 0
call fcn.0040e120
jmp 0x40ea2c
mov eax, dword [0x4d04c4]
mov dword [esp + 8], 0x10
mov dword [esp + 4], 1
mov dword [esp], str.DEFINED_SYMBOLS_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
add dword [0x4d04a8], 1
jmp 0x40f0f4
mov eax, dword [0x4d04c4]
mov dword [esp + 8], 0x13
mov dword [esp + 4], 1
mov dword [esp], str.NO_DEFINED_SYMBOLS_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
add dword [0x4d04a8], 1
jmp 0x40f031
mov dword [esp], ebx
call fcn.0041bbb0
mov dword [esp], ebx
mov esi, eax
call fcn.0041bbe0
mov eax, dword [eax]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
mov dword [esp + 4], str._33s:_s__s_n
mov dword [esp + 8], eax
mov eax, dword [0x4d04c4]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40f179
test ebx, ebx
je 0x40eb7e
mov esi, ebx
lea esi, [esi]
jmp 0x40eb6a
mov edx, dword [esi + 0xc]
cmp ecx, edx
jae 0x40f4b7
mov eax, 0x4d0360
xor edx, edx
cmp esi, dword [eax]
je 0x40f5fd
add edx, 1
add eax, 0x6c
cmp edx, 3
jne 0x40f297
mov eax, dword [0x4d0344]
mov ebx, 0
lea edx, [eax + 1]
cmp edx, 3
cmove edx, ebx
imul eax, eax, 0x6c
mov dword [0x4d0344], edx
mov dword [esp + 0x40], eax
mov edx, eax
add eax, 0x4d0360
cmp dword [esp + 0x2c], 1
mov dword [edx + 0x4d0360], esi
lea ebx, [eax + 8]
mov dword [esp + 0x3c], eax
mov dword [eax + 4], ecx
mov byte [eax + 8], 0
jbe 0x40f642
cmp ecx, dword [esi + 0xc]
jae 0x40f642
mov edx, dword [0x4d04d0]
test edx, edx
je 0x40f30c
cmp esi, edx
mov eax, dword [0x4d04cc]
je 0x40f376
mov eax, dword [0x4d04cc]
mov dword [esp + 0x44], edx
test eax, eax
je 0x40f33d
mov dword [esp], eax
mov dword [esp + 0x38], ecx
call sub.msvcrt.dll_ftell
mov edx, dword [esp + 0x44]
mov dword [edx + 8], eax
mov eax, dword [0x4d04cc]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov ecx, dword [esp + 0x38]
mov eax, dword [esi + 4]
mov dword [esp + 4], 0x49f25d
mov dword [esp + 0x38], ecx
mov dword [0x4d04d0], esi
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov ecx, dword [esp + 0x38]
test eax, eax
mov dword [0x4d04cc], eax
je 0x40f7e0
mov edx, dword [esi + 8]
test edx, edx
jne 0x40f73f
mov dword [esp], eax
mov dword [esp + 0x38], ecx
call sub.msvcrt.dll_ftell
mov ecx, dword [esp + 0x38]
cmp eax, 2
mov dword [esp + 0x50], eax
jle 0x40f706
mov edx, dword [esp + 0x2c]
mov eax, dword [esi + 0xc]
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], edi
sub edx, 1
mov dword [esp + 0x4c], edx
add edx, ebx
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x44], edx
mov byte [edx], 0
lea edx, [eax + 1]
mov eax, dword [esp + 0x50]
mov esi, edx
mov dword [esp + 0x54], ebp
mov ebp, ecx
mov dword [esp + 0x38], eax
mov edx, dword [esp + 0x38]
xor eax, eax
xor eax, 1
and eax, 1
mov byte [esp + 0x48], al
mov eax, edx
mov edx, ebp
mov ebp, edi
mov edi, eax
test edi, edi
setg al
and al, byte [esp + 0x48]
je 0x40f648
mov eax, edi
sub eax, ebp
cmp ebp, edi
mov edi, 0
cmovle edi, eax
mov eax, dword [0x4d04cc]
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp + 0x38], edx
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [0x4d04cc]
mov dword [esp + 8], ebp
mov dword [esp + 4], 1
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
cmp ebp, eax
jne 0x40f71e
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x38]
cmp ebx, ecx
mov eax, ecx
jbe 0x40f457
jmp 0x40f3e1
sub eax, 1
cmp ebx, eax
ja 0x40f3e1
cmp byte [eax], 0xa
jne 0x40f450
sub esi, 1
cmp edx, esi
jne 0x40f450
mov ecx, edi
mov edi, ebp
mov ebp, edx
mov edx, ecx
mov ecx, eax
sub ecx, ebx
add ecx, edx
lea edx, [eax + 1]
cmp dword [esp + 0x44], edx
je 0x40f765
cmp byte [eax + 1], 0xd
sete al
movzx eax, al
lea edx, [ecx + eax + 1]
mov eax, dword [0x4d04cc]
mov dword [esp + 4], edx
mov dword [esp + 8], 0
mov dword [esp + 0x38], edx
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, 1
mov edx, dword [esp + 0x38]
jmp 0x40f3cf
mov eax, dword [esi + 0x10]
jbe 0x40eb7e
test eax, eax
jne 0x40eb7e
mov dword [esp + 0x38], edi
mov edi, eax
mov dword [esp + 0x3c], ebp
jmp 0x40f52f
test edi, edi
jne 0x40f4f2
mov ebx, dword [0x4d0344]
mov ebp, 0
add ebx, 1
cmp ebx, 3
cmove ebx, ebp
mov dword [0x4d0344], ebx
mov ecx, dword [ecx + 4]
add edi, 1
mov ebx, dword [esp + 0x38]
mov dword [esp + 8], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], str._4u:__13s___s_n
mov dword [esp], ebx
call fcn.0040e120
mov edx, dword [esi + 0xc]
cmp edx, dword [ebx + 0x18]
jae 0x40f5c7
mov ebx, dword [esi + 0x10]
test ebx, ebx
jne 0x40f5c7
imul ebp, dword [0x4d0344], 0x6c
add edx, 1
mov ecx, esi
mov eax, 0x49f21b
mov byte [ebp + 0x4d0368], 0
mov ebx, dword [esi + 0x10]
mov dword [ebp + 0x4d0360], esi
mov dword [ebp + 0x4d0364], edx
test ebx, ebx
jne 0x40f4d4
mov ecx, dword [esp + 0x2c]
lea edx, [ebp + 0x4d0368]
mov eax, esi
call fcn.0040e4d0
mov ecx, dword [ebp + 0x4d0360]
mov edx, dword [ebp + 0x4d0364]
jmp 0x40f4d4
mov ebx, dword [0x4d04c0]
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov eax, dword [0x4d4ff8]
mov dword [0x4d04c0], 0
jmp 0x40ea24
mov dword [esp + 4], str.UNDEFINED_SYMBOLS_n
mov dword [esp], 0
call fcn.0040e120
jmp 0x40f098
mov ebp, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
jmp 0x40eb7e
mov eax, dword [0x4d04c4]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x49f3a0
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov ebx, dword [ebp + 4]
mov edx, dword [esp + 0x2c]
jmp 0x40edd8
mov ebx, eax
jmp 0x40f586
cmp ecx, dword [eax + 4]
jne 0x40f29f
imul eax, edx, 0x6c
lea ebx, [eax + 0x4d0360]
lea edx, [eax + 0x4d0368]
mov ecx, dword [ebx + 4]
mov eax, dword [eax + 0x4d0360]
mov eax, dword [eax + 4]
mov dword [esp + 0x10], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str._4u:__13s___s_n
mov dword [esp + 0xc], eax
mov dword [esp], edi
call fcn.0040e120
jmp 0x40eb7e
mov eax, esi
mov edx, ebx
jmp 0x40f61e
mov byte [esp + 0x44], al
mov eax, dword [0x4d04cc]
mov ebp, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
mov edi, dword [esp + 0x5c]
mov dword [esp], eax
call sub.msvcrt.dll_fgetc
cmp eax, 0xffffffff
setne dl
cmp eax, 0xa
setne cl
and dl, cl
mov ecx, ebx
mov byte [esp + 0x38], dl
je 0x40f6c6
cmp eax, 0xd
je 0x40f793
xor edx, edx
jmp 0x40f69a
cmp eax, 0xffffffff
je 0x40f6c6
cmp eax, 0xd
mov edx, dword [esp + 0x48]
je 0x40f793
cmp dword [esp + 0x4c], edx
jbe 0x40f6a5
mov byte [ecx], al
add ecx, 1
mov eax, dword [0x4d04cc]
add edx, 1
mov dword [esp + 0x54], ecx
mov dword [esp + 0x48], edx
mov dword [esp], eax
call sub.msvcrt.dll_fgetc
mov ecx, dword [esp + 0x54]
cmp eax, 0xa
jne 0x40f688
cmp eax, 0xd
sete dl
cmp eax, 0xa
mov byte [esp + 0x38], dl
sete byte [esp + 0x44]
je 0x40f793
test dl, dl
jne 0x40f793
mov eax, dword [esp + 0x50]
mov byte [ecx], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [0x4d04cc]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [esp + 0x40]
mov edx, ebx
mov ecx, dword [esp + 0x3c]
mov eax, dword [eax + 0x4d0360]
mov ecx, dword [ecx + 4]
jmp 0x40f61e
mov esi, dword [esp + 0x58]
mov ebp, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
mov eax, dword [esi + 4]
mov dword [esp], str.unable_to_rebuffer_file:__s_n
mov dword [esp + 4], eax
call fcn.00412380
jmp 0x40f706
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x38], ecx
call sub.msvcrt.dll_fseek
mov eax, dword [0x4d04cc]
mov ecx, dword [esp + 0x38]
jmp 0x40f376
mov eax, dword [0x4d04cc]
lea edx, [ecx + 1]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x38], edx
mov dword [esp], eax
call sub.msvcrt.dll_fgetc
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x38]
add ecx, 2
cmp eax, 0xd
cmove edx, ecx
jmp 0x40f48c
mov eax, dword [0x4d04cc]
mov dword [esp + 0x48], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fgetc
mov ecx, dword [esp + 0x48]
cmp eax, 0xa
jne 0x40f7ec
cmp eax, 0xd
je 0x40f6e6
cmp byte [esp + 0x44], 0
je 0x40f6e6
mov edx, dword [0x4d04cc]
mov dword [esp], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 4], edx
call sub.msvcrt.dll_ungetc
mov ecx, dword [esp + 0x38]
jmp 0x40f6e6
mov dword [esi + 0x10], 1
jmp 0x40f706
cmp byte [esp + 0x38], 0
je 0x40f7ad
jmp 0x40f7c1