Function at 0x4147f2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
or dword [ebp - 0x2c], 0xffffffff
push ebx
xor ebx, ebx
push esi
xor esi, esi
inc esi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x30], 0xa
cmp dword [ebp + 8], ebx
je 0x414b78
push dword [ebp + 8]
call fcn.00434200
push ebx
push eax
mov dword [ebp + 8], eax
call fcn.004150db
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x414b70
push edi
push 0x50
pop edi
push esi
push dword [ebp + 8]
call fcn.004150db
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x41486d
push esi
call sub.MSVCRT.dll_atoi
pop ecx
push esi
push ebx
push dword [0x43f0b0]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
movzx esi, di
push esi
push dword [ebp - 0x1c]
call fcn.0041576b
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x414b5f
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_strlen
pop ecx
add eax, 0x801
push eax
push ebx
push dword [0x43f0b0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x414b57
push 3
push dword [ebp + 8]
call fcn.004150db
pop ecx
pop ecx
mov dword [ebp - 0x24], eax
cmp di, 0x50
je 0x4148d4
push esi
lea eax, [ebp - 0x58]
push 0x435274
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
jmp 0x4148d7
mov byte [ebp - 0x58], bl
mov eax, dword [ebp - 0x24]
cmp eax, ebx
jne 0x4148e3
mov eax, 0x43500f
mov esi, dword [ebp - 8]
lea ecx, [ebp - 0x58]
push ecx
push dword [ebp - 0x1c]
push eax
push str.GET___s_HTTP_1.1_r_nAccept:___r_nHost:__s_s_r_nConnection:_close_r_n_r_n
push esi
call sub.MSVCRT.dll_sprintf
add esp, 0x14
push 0xa
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
push dword [ebp - 0x14]
call fcn.00415178
test eax, eax
je 0x414b32
push 0xa
push 0x800
push esi
push dword [ebp - 0x14]
call fcn.004151c7
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x414b32
mov eax, esi
call fcn.0041478d
push 0x43522c
push esi
mov ebx, eax
call sub.MSVCRT.dll_strstr
pop ecx
pop ecx
test eax, eax
jne 0x4149f0
push 0x435228
push esi
call sub.MSVCRT.dll_strstr
pop ecx
pop ecx
test eax, eax
je 0x414b30
jmp 0x4149f0
mov eax, ebx
mov esi, ebx
call fcn.0041478d
push 0x12
push str.transfer_encoding:
push esi
mov ebx, eax
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x41499f
push str.chunked
push esi
call sub.MSVCRT.dll_strstr
pop ecx
pop ecx
mov dword [ebp - 0x18], 1
jmp 0x4149f0
push 0xf
push str.content_length:
push esi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x4149df
add esi, 0x10
push esi
call sub.MSVCRT.dll_strlen
mov edi, eax
push edi
lea eax, [ebp - 0x78]
push esi
push eax
call sub.MSVCRT.dll_strncpy
lea eax, [ebp - 0x78]
push eax
mov byte [ebp + edi - 0x78], 0
call sub.MSVCRT.dll_atoi
add esp, 0x14
mov dword [ebp - 0x2c], eax
jmp 0x4149f0
push 0x43500f
push esi
call sub.MSVCRT.dll_strcmp
pop ecx
pop ecx
test eax, eax
je 0x414a3c
test ebx, ebx
jne 0x41496a
xor esi, esi
cmp dword [ebp - 0x28], esi
jne 0x414a3c
call fcn.004177b8
mov edi, eax
call fcn.004177b8
sub eax, edi
cmp eax, 0xa
jg 0x414a33
push 0xa
push 0x10
pop eax
sub eax, esi
push eax
mov eax, dword [ebp - 8]
add eax, esi
push eax
push dword [ebp - 0x14]
call fcn.004151c7
test eax, eax
je 0x414a33
add esi, eax
cmp esi, 0x10
jl 0x414a06
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x20], esi
add ebx, 2
mov eax, dword [ebp - 0x2c]
xor edi, edi
mov dword [ebp - 0x28], edi
cmp eax, 0xffffffff
jne 0x414a86
cmp dword [ebp - 0x18], edi
je 0x414a76
mov eax, ebx
mov edx, ebx
call fcn.0041478d
mov ebx, eax
lea eax, [ebp - 4]
push eax
push 0x4351f8
push edx
call sub.MSVCRT.dll_sscanf
add esp, 0xc
cmp dword [ebp - 4], edi
je 0x414b1b
jmp 0x414a89
mov dword [ebp - 4], 0x3b9aca00
mov dword [ebp - 0x30], 1
jmp 0x414a89
mov dword [ebp - 4], eax
mov esi, dword [ebp - 0x20]
sub esi, ebx
add esi, dword [ebp - 8]
cmp esi, dword [ebp - 4]
jle 0x414a99
mov esi, dword [ebp - 4]
cmp dword [ebp - 0xc], edi
jne 0x414abf
push edi
push pe_nt_image_headers32
push 2
push edi
push 1
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x414b30
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x38]
push eax
push esi
push ebx
jmp 0x414afe
mov eax, 0x800
cmp dword [ebp - 4], eax
jge 0x414adc
mov eax, dword [ebp - 4]
push dword [ebp - 0x30]
push eax
push dword [ebp - 8]
push dword [ebp - 0x14]
call fcn.004151c7
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
je 0x414b0d
push 0
lea eax, [ebp - 0x38]
push eax
push esi
push dword [ebp - 8]
push dword [ebp - 0xc]
call edi
add dword [ebp - 0x10], esi
sub dword [ebp - 4], esi
jne 0x414acf
jmp 0x414b11
and dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0
jne 0x4149f8
cmp dword [ebp - 0xc], 0xffffffff
je 0x414b30
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
xor ebx, ebx
cmp dword [ebp - 0x24], ebx
je 0x414b47
push dword [ebp - 0x24]
push ebx
push dword [0x43f0b0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 8]
push ebx
push dword [0x43f0b0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x14]
call fcn.00415782
push dword [ebp - 0x1c]
push ebx
push dword [0x43f0b0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
push dword [ebp + 8]
call fcn.00434240
mov eax, dword [ebp - 0x34]
pop esi
pop ebx
leave
ret 8