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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xc2c
lea eax, [esp + 0xc48]
lea ebx, [esp + 0x20]
mov dword [esp + 8], str._s._s
mov ebp, dword [esp + 0xc50]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc44]
mov dword [esp + 4], 0x400
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call sub.cygwin1.dll_snprintf
mov eax, dword [esp + 0xc50]
mov dword [esp + 4], ebx
mov dword [esp], str.Writing_file__s___d_bytes__n
mov dword [esp + 8], eax
call sub.cygwin1.dll_printf
mov eax, dword [0x40601c]
add eax, dword [esp + 0xc4c]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc40]
mov dword [esp], eax
call sub.cygwin1.dll_fseek
mov dword [esp + 4], 0x403062
mov dword [esp], ebx
call sub.cygwin1.dll__fopen64
mov esi, eax
test ebp, ebp
jle 0x40183d
lea ebx, [esp + 0x420]
lea esi, [esi]
mov eax, dword [esp + 0xc40]
cmp ebp, 0x800
mov dword [esp + 4], 1
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov eax, 0x800
cmovle eax, ebp
mov dword [esp + 8], eax
call sub.cygwin1.dll_fread
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov edi, eax
mov dword [esp + 4], 1
mov dword [esp], ebx
call sub.cygwin1.dll_fwrite
cmp edi, eax
jne 0x401850
sub ebp, edi
test ebp, ebp
jg 0x4017e8
mov dword [esp], esi
call sub.cygwin1.dll_fclose
add esp, 0xc2c
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.cygwin1.dll_abort
nop
nop
nop
nop
nop
nop
nop
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0xa0
mov esi, dword [ebp + 0xc]
call sub.cygwin1.dll___main
lea edi, [esp + 0x48]
xor eax, eax
mov ecx, 0x16
rep stosd dword es:[edi], eax
cmp dword [ebp + 8], 1
mov dword [0x40601c], 0
jle 0x401afe
mov dword [esp + 4], 0x40307b
mov eax, dword [esi + 4]
mov dword [esp], eax
call sub.cygwin1.dll__fopen64
mov ebx, eax
test eax, eax
je 0x401b21
mov esi, dword [esi + 4]
mov dword [esp + 4], 0x2f
lea edi, [esp + 0x33]
mov dword [esp], esi
call sub.cygwin1.dll_strrchr
mov dword [esp + 0xc], ebx
test eax, eax
lea edx, [eax + 1]
mov dword [esp], edi
mov dword [esp + 8], 1
cmove edx, esi
mov dword [esp + 4], 0x14
mov dword [esp + 0x2c], edx
call sub.cygwin1.dll_fread
mov dword [esp + 8], 0x14
mov dword [esp + 4], str._SIGNED_BY_SIGNBLOB_
mov dword [esp], edi
call sub.cygwin1.dll_memcmp
test eax, eax
je 0x401ab7
mov dword [esp + 8], 0x10
mov dword [esp + 4], str.MSM_RADIO_UPDATE
mov dword [esp], edi
call sub.cygwin1.dll_memcmp
test eax, eax
jne 0x401b48
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.cygwin1.dll_fseek
lea eax, [esp + 0x64]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x3c
mov dword [esp], eax
call sub.cygwin1.dll_fread
mov eax, dword [esp + 0x78]
mov dword [esp], str.Header_size:__d_n
mov dword [esp + 4], eax
call sub.cygwin1.dll_printf
mov eax, dword [esp + 0x7c]
mov dword [esp], str._d_partitions_starting_at_offset_0x_X_n
mov dword [esp + 8], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 4], eax
call sub.cygwin1.dll_printf
mov eax, dword [esp + 0x74]
mov dword [esp], str.Blob_version:__d_n
mov dword [esp + 4], eax
call sub.cygwin1.dll_printf
mov eax, dword [0x40601c]
add eax, dword [esp + 0x7c]
mov dword [esp], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], eax
call sub.cygwin1.dll_fseek
mov esi, dword [esp + 0x80]
mov dword [esp + 4], 0x10
mov dword [esp], esi
call sub.cygwin1.dll_calloc
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov edi, eax
mov dword [esp + 4], 0x10
mov dword [esp], eax
call sub.cygwin1.dll_fread
mov eax, dword [esp + 0x80]
test eax, eax
jle 0x401aa5
xor esi, esi
lea esi, [esi]
mov dword [esp + 4], esi
add esi, 1
mov dword [esp], str.Partition__d_n
call sub.cygwin1.dll_printf
mov dword [esp + 4], edi
add edi, 0x10
mov dword [esp], str.Name:__s_n
call sub.cygwin1.dll_printf
mov eax, dword [edi - 0xc]
mov dword [esp], str.Offset:__d__0x_X__n
mov dword [esp + 8], eax
mov dword [esp + 4], eax
call sub.cygwin1.dll_printf
mov eax, dword [edi - 8]
mov dword [esp], str.Size:__d__0x_X__n
mov dword [esp + 8], eax
mov dword [esp + 4], eax
call sub.cygwin1.dll_printf
mov eax, dword [edi - 0x10]
mov dword [esp + 8], eax
mov eax, dword [edi - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [edi - 8]
mov dword [esp + 0x10], eax
mov eax, dword [edi - 4]
mov dword [esp], ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
call fcn.00401740
cmp dword [esp + 0x80], esi
jg 0x401a18
mov dword [esp], ebx
call sub.cygwin1.dll_fclose
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.cygwin1.dll_fseek
lea eax, [esp + 0x48]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x58
mov dword [esp], eax
call sub.cygwin1.dll_fread
mov dword [0x40601c], 0x1c
jmp 0x40196c
mov ebx, dword [esi]
call sub.cygwin1.dll___getreent
mov dword [esp + 4], str.Usage:__s__blobfile__n
mov dword [esp + 8], ebx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
or eax, 0xffffffff
jmp 0x401aaf
mov ebx, dword [esi + 4]
call sub.cygwin1.dll___getreent
mov dword [esp + 4], str.Unable_to_open___s__n
mov dword [esp + 8], ebx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
or eax, 0xffffffff
jmp 0x401aaf
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x1d
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], str.Unsupported_blob_file_format_n
call sub.cygwin1.dll_fwrite
mov dword [esp], 0xffffffff
call sub.cygwin1.dll_exit
nop
nop
nop
nop
jmp fcn.00401090