Function at 0x42789c
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 0x427c22
push dword [ebp + 8]
call fcn.0049ddd0
push ebx
push eax
mov dword [ebp + 8], eax
call fcn.0042811c
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x427c1a
push edi
push 0x50
pop edi
push esi
push dword [ebp + 8]
call fcn.0042811c
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x427917
push esi
call sub.MSVCRT.dll_atoi
pop ecx
push esi
push ebx
push dword [0x59efb8]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
movzx esi, di
push esi
push dword [ebp - 0x1c]
call fcn.004289f4
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x427c09
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_strlen
pop ecx
add eax, 0x801
push eax
push ebx
push dword [0x59efb8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x427c01
push 3
push dword [ebp + 8]
call fcn.0042811c
pop ecx
pop ecx
mov dword [ebp - 0x24], eax
cmp di, 0x50
je 0x42797e
push esi
lea eax, [ebp - 0x58]
push 0x4bc95c
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
jmp 0x427981
mov byte [ebp - 0x58], bl
mov eax, dword [ebp - 0x24]
cmp eax, ebx
jne 0x42798d
mov eax, 0x4ac002
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.004281b9
test eax, eax
je 0x427bdc
push 0xa
push 0x800
push esi
push dword [ebp - 0x14]
call fcn.00428208
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x427bdc
mov eax, esi
call fcn.00427837
push 0x4bc910
push esi
mov ebx, eax
call sub.MSVCRT.dll_strstr
pop ecx
pop ecx
test eax, eax
jne 0x427a9a
push 0x4bc90c
push esi
call sub.MSVCRT.dll_strstr
pop ecx
pop ecx
test eax, eax
je 0x427bda
jmp 0x427a9a
mov eax, ebx
mov esi, ebx
call fcn.00427837
push 0x12
push str.transfer_encoding:
push esi
mov ebx, eax
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x427a49
push str.chunked
push esi
call sub.MSVCRT.dll_strstr
pop ecx
pop ecx
mov dword [ebp - 0x18], 1
jmp 0x427a9a
push 0xf
push str.content_length:
push esi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x427a89
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 0x427a9a
push 0x4ac002
push esi
call sub.MSVCRT.dll_strcmp
pop ecx
pop ecx
test eax, eax
je 0x427ae6
test ebx, ebx
jne 0x427a14
xor esi, esi
cmp dword [ebp - 0x28], esi
jne 0x427ae6
call fcn.0042d7dd
mov edi, eax
call fcn.0042d7dd
sub eax, edi
cmp eax, 0xa
jg 0x427add
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.00428208
test eax, eax
je 0x427add
add esi, eax
cmp esi, 0x10
jl 0x427ab0
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 0x427b30
cmp dword [ebp - 0x18], edi
je 0x427b20
mov eax, ebx
mov edx, ebx
call fcn.00427837
mov ebx, eax
lea eax, [ebp - 4]
push eax
push 0x4bc8dc
push edx
call sub.MSVCRT.dll_sscanf
add esp, 0xc
cmp dword [ebp - 4], edi
je 0x427bc5
jmp 0x427b33
mov dword [ebp - 4], 0x3b9aca00
mov dword [ebp - 0x30], 1
jmp 0x427b33
mov dword [ebp - 4], eax
mov esi, dword [ebp - 0x20]
sub esi, ebx
add esi, dword [ebp - 8]
cmp esi, dword [ebp - 4]
jle 0x427b43
mov esi, dword [ebp - 4]
cmp dword [ebp - 0xc], edi
jne 0x427b69
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 0x427bda
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x38]
push eax
push esi
push ebx
jmp 0x427ba8
mov eax, 0x800
cmp dword [ebp - 4], eax
jge 0x427b86
mov eax, dword [ebp - 4]
push dword [ebp - 0x30]
push eax
push dword [ebp - 8]
push dword [ebp - 0x14]
call fcn.00428208
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
je 0x427bb7
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 0x427b79
jmp 0x427bbb
and dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0
jne 0x427aa2
cmp dword [ebp - 0xc], 0xffffffff
je 0x427bda
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 0x427bf1
push dword [ebp - 0x24]
push ebx
push dword [0x59efb8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 8]
push ebx
push dword [0x59efb8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x14]
call fcn.00428a0b
push dword [ebp - 0x1c]
push ebx
push dword [0x59efb8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
push dword [ebp + 8]
call fcn.0049dde0
mov eax, dword [ebp - 0x34]
pop esi
pop ebx
leave
ret 8