Function at 0x1001a430
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x1002a717
push eax
mov eax, 0x10e4
mov dword fs:[0], esp
call fcn.10028db0
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1104]
cmp byte [edi], 0x20
jne 0x1001a467
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
je 0x1001a45f
mov al, byte [esp + 0x17]
push 0
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [edi]
mov dword [esp + 0x10fc], 0
cmp al, 0x2d
jne 0x1001a4f6
push 6
push str._save
push edi
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x1001a4f1
lea esi, [edi + 6]
push 0x20
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1001a4f1
mov ebp, ebx
push 1
sub ebp, edi
lea ecx, [esp + 0x20]
sub ebp, 6
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x1001a4ee
mov edi, dword [esp + 0x20]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], ebp
mov byte [eax + ebp], 0
lea edi, [ebx + 1]
cmp byte [edi], 0x2d
je 0x1001a48c
lea ecx, [esp + 0x30]
call fcn.1001f580
push edi
lea ecx, [esp + 0x34]
mov byte [esp + 0x1100], 1
call fcn.1001fc90
lea ecx, [esp + 0x1c]
push 0x10032f90
push ecx
mov esi, eax
call dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 8
test al, al
je 0x1001a547
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [esp + 0x1c]
mov eax, dword [edx]
push eax
push 0
push ecx
lea ecx, [esp + 0xbc]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
cmp esi, 0xc8
jne 0x1001a7c8
or edi, 0xffffffff
push str.Content_Length
lea ecx, [esp + 0x34]
mov dword [esp + 0x14], edi
call fcn.1001f9c0
test eax, eax
je 0x1001a59b
push eax
call dword [sym.imp.MSVCRT.dll_atol]
mov ebx, dword [esp + 0x110c]
mov edx, eax
shr edx, 0xa
mov ecx, dword [ebx]
push edx
push eax
push str._r_nbegin_to_retrieve__total_bytes:_u____uK_r_n
push ecx
mov dword [esp + 0x24], eax
call fcn.1000fc90
mov edi, dword [esp + 0x24]
add esp, 0x14
jmp 0x1001a5b2
mov ebx, dword [esp + 0x1108]
push 0xffffffffffffffff
push str._r_nbegin_to_retrieve__total_bytes:unknowed_r_n
push 0
mov ecx, dword [ebx]
call fcn.1000fb30
mov eax, dword [esp + 0xb4]
test eax, eax
jne 0x1001a5c2
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0x10032940
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x1001a7ad
xor ebp, ebp
push ebp
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [esp + 0x2c], eax
mov ecx, dword [ebx]
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x1001a738
mov ecx, dword [ebx]
mov edx, dword [ecx]
call dword [edx + 8]
cmp dword [eax + 0x14], 2
jne 0x1001a738
mov eax, dword [esp + 0xf0]
test eax, eax
jle 0x1001a665
cmp eax, 0x1000
jle 0x1001a624
mov eax, 0x1000
mov esi, dword [esp + 0xdc]
mov edi, dword [esp + 0xd4]
mov ecx, eax
sub esi, eax
mov edx, ecx
add esi, edi
lea edi, [esp + 0xf4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xf0]
mov edi, dword [esp + 0x10]
sub ecx, eax
mov esi, eax
mov dword [esp + 0xf0], ecx
jmp 0x1001a693
push 0
push 0x30d40
lea ecx, [esp + 0x38]
call fcn.1000f110
test eax, eax
jl 0x1001a691
push 0xffffffffffffffff
lea eax, [esp + 0xf8]
push 0x1000
push eax
lea ecx, [esp + 0x3c]
call fcn.1000fa20
mov esi, eax
test esi, esi
jl 0x1001a738
je 0x1001a5ed
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0xf4]
push ecx
push esi
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
add ebp, esi
cmp edi, 0xffffffff
jne 0x1001a6d9
mov eax, dword [ebx]
mov ecx, ebp
shr ecx, 0xa
push ecx
push str.received__09uK_bytes._r
push eax
call fcn.1000fc90
add esp, 0xc
jmp 0x1001a702
lea eax, [ebp + ebp*4]
xor edx, edx
mov ecx, dword [ebx]
lea eax, [eax + eax*4]
shl eax, 2
div edi
mov edx, ebp
shr edx, 0xa
push eax
push edx
push str.received__09uK_bytes___02d___r
push ecx
call fcn.1000fc90
add esp, 0x10
cmp ebp, edi
jae 0x1001a738
mov ecx, dword [ebx]
push 0
push 0
call fcn.1000f110
test eax, eax
jl 0x1001a738
jle 0x1001a5ed
mov ecx, dword [ebx]
push 0xffffffffffffffff
lea eax, [esp + 0xf8]
push 1
push eax
call fcn.1000fa20
cmp byte [esp + 0xf4], 3
jne 0x1001a5ed
mov ebx, dword [ebx]
push 0
call dword [sym.imp.MSVCRT.dll_time]
mov edi, dword [esp + 0x30]
mov edx, 1
mov ecx, eax
sub edx, edi
add ecx, edx
mov eax, ebp
xor edx, edx
div ecx
push eax
push str._ncompleted.__u_s_bytes._r_n
push ebx
call fcn.1000fc90
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea ecx, [esp + 0x30]
mov byte [esp + 0x10fc], 0
call fcn.1001f7e0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x1001a7a9
mov cl, byte [eax - 1]
test cl, cl
je 0x1001a79f
cmp cl, 0xff
je 0x1001a79f
dec cl
mov byte [eax - 1], cl
mov al, 1
jmp 0x1001a817
dec eax
push eax
call fcn.10009e1d
add esp, 4
mov al, 1
jmp 0x1001a817
mov eax, dword [esp + 0xb4]
test eax, eax
jne 0x1001a7bd
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ebx, dword [ebx]
push eax
push str._r_ncan_not_open__s_for_write._r_n
push ebx
jmp 0x1001a7d8
mov ecx, dword [esp + 0x1108]
push esi
push str._r_nfailed_to_retrieve__error_d._r_n
mov eax, dword [ecx]
push eax
call fcn.1000fc90
add esp, 0xc
lea ecx, [esp + 0x30]
mov byte [esp + 0x10fc], 0
call fcn.1001f7e0
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x1001a815
mov al, byte [ecx - 1]
test al, al
je 0x1001a80b
cmp al, 0xff
je 0x1001a80b
dec al
mov byte [ecx - 1], al
jmp 0x1001a815
dec ecx
push ecx
call fcn.10009e1d
add esp, 4
xor al, al
mov ecx, dword [esp + 0x10f4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10f0
ret 8