Function at 0x409331
Capabilities:
Check http status code
Delete file
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x43b004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x9c], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
push 0
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0x84]
mov dword [ebp - 0xa0], 0xa
push eax
push 0x13
push dword [ebx + 0x1c]
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x409394
push 0xfffffffffffffff3
pop esi
jmp 0x409582
lea eax, [ebp - 0x84]
push eax
call fcn.00421e90
pop ecx
cmp eax, 0x194
jne 0x4093ac
push 0xfffffffffffffffa
jmp 0x40938e
push 2
pop esi
cmp eax, 0xca
je 0x409582
push 3
pop esi
cmp eax, 0x1f7
je 0x409582
push 0xfffffffffffffff4
pop esi
cmp eax, 0x1f8
je 0x409582
cmp eax, 0xc8
je 0x4093eb
cmp eax, 0xce
je 0x4093eb
mov esi, eax
jmp 0x40957d
mov esi, dword [ebp + 0x14]
lea ecx, [ebp - 0x8c]
mov eax, dword [ebx]
mov edi, esi
push ecx
and edi, 1
mov ecx, ebx
push str.Content_Length
mov dword [ebp - 0xa8], edi
and esi, 2
call dword [eax + 0x18]
cmp eax, 1
je 0x409423
test edi, edi
je 0x4093a8
or eax, 0xffffffff
mov dword [ebp - 0x8c], eax
jmp 0x409429
mov eax, dword [ebp - 0x8c]
test eax, eax
jne 0x409435
test esi, esi
je 0x4093a8
push 0xf000
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x94], eax
test eax, eax
jne 0x40945a
push 0xfffffffffffffff9
jmp 0x40938e
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0xc0000000
push dword [ebp - 0x9c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x409485
push 0xfffffffffffffff8
jmp 0x409554
push dword [ebp - 0x98]
mov eax, dword [ebx]
mov ecx, ebx
push dword [ebp - 0x8c]
push 0
call dword [eax + 0x38]
xor esi, esi
xor al, al
mov byte [ebp - 0x85], al
cmp esi, dword [ebp - 0x8c]
jae 0x40953e
lea eax, [ebp - 0x90]
push eax
push 0x1800
push dword [ebp - 0x94]
push dword [ebx + 0x1c]
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, 1
jne 0x40952c
cmp dword [ebp - 0x90], 0
je 0x409528
push 0
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 0x90]
push dword [ebp - 0x94]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x40952c
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0xa4]
jne 0x40952c
push dword [ebp - 0x98]
add esi, eax
mov ecx, ebx
push dword [ebp - 0x8c]
mov eax, dword [ebx]
push esi
call dword [eax + 0x38]
cmp esi, dword [ebp - 0x8c]
jb 0x4094b0
jmp 0x409532
mov al, 1
jmp 0x409538
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov al, byte [ebp - 0x85]
cmp esi, dword [ebp - 0x8c]
je 0x40954d
test al, al
je 0x409552
cmp dword [ebp - 0xa8], 0
je 0x409552
xor esi, esi
inc esi
jmp 0x409555
push 0xfffffffffffffff7
pop esi
push dword [ebp - 0x94]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp edi, 0xffffffff
je 0x40957d
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 1
je 0x40958e
push dword [ebp - 0x9c]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041559f
leave
ret 0x10