Function at 0x42d120
Capabilities:
Check http status code
Create http request
Get http content length
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5ec00c
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x104c
call fcn.005c0da0
mov eax, dword [0x64c874]
xor eax, esp
mov dword [esp + 0x1048], eax
push ebx
push esi
push edi
mov eax, dword [0x64c874]
xor eax, esp
push eax
lea eax, [esp + 0x1060]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0
push 0
push 0
push 0
push 0
mov esi, ecx
mov dword [esp + 0x30], eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [esp + 0x20], edi
push 4
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1070], 0
mov ebx, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 2
push edi
mov dword [esp + 0x24], 0x7d0
call ebx
push 4
lea edx, [esp + 0x18]
push edx
push 3
push edi
mov dword [esp + 0x24], 3
call ebx
xor ebx, ebx
cmp dword [esi + 0x18], 8
mov dword [esp + 0x24], ebx
jb 0x42d1ce
mov esi, dword [esi + 4]
jmp 0x42d1d1
add esi, 4
push ebx
push 0x400000
push 0xffffffffffffffff
push ebx
push esi
push edi
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, ebx
mov byte [esp + 0x1068], 1
mov dword [esp + 0x14], 4
je 0x42d21b
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0x20000013
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
cmp dword [esp + 0x24], 0xc8
je 0x42d242
cmp esi, ebx
je 0x42d230
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp edi, ebx
je 0x42d23b
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x42d470
cmp esi, ebx
mov byte [esp + 0x12], 0
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], 4
je 0x42d277
push ebx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
push eax
push 0x20000005
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
setne al
test al, al
jne 0x42d2db
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
jne 0x42d2e1
mov byte [esp + 0x12], 1
mov dword [esp + 0x18], 0x3200000
mov ebx, dword [esp + 0x1c]
push ebx
lea esi, [esp + 0x3c]
call fcn.00429f00
add esp, 4
mov ecx, esi
push ecx
mov byte [esp + 0x106c], 2
call fcn.0042a620
add esp, 4
test al, al
jne 0x42d2c4
mov ebx, esi
call fcn.0042ac50
mov ebx, dword [esp + 0x1c]
mov esi, 8
mov byte [esp + 0x1068], 3
cmp dword [ebx + 0x18], esi
jb 0x42d2ef
mov eax, dword [ebx + 4]
jmp 0x42d2f2
cmp dword [esp + 0x18], ebx
jne 0x42d291
lea esi, [esp + 0x28]
call fcn.004645f0
jmp 0x42d230
lea eax, [ebx + 4]
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x42d346
cmp dword [esp + 0x50], esi
jb 0x42d327
mov edx, dword [esp + 0x3c]
push edx
call fcn.0059b877
add esp, 4
lea esi, [esp + 0x28]
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], ebx
mov word [esp + 0x3c], bx
call fcn.004645f0
jmp 0x42d230
push 0x28
call fcn.0059b847
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x42d361
mov eax, dword [esp + 0x18]
call fcn.0042c830
mov ebx, eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x18]
cmp eax, ecx
mov dword [esp + 0x1c], 0
mov byte [esp + 0x13], 1
jae 0x42d40c
lea ecx, [ecx]
cmp byte [esp + 0x12], 0
mov edi, 0x1000
jne 0x42d394
sub ecx, eax
cmp ecx, edi
jae 0x42d394
mov edi, ecx
lea eax, [esp + 0x54]
push eax
mov esi, ebx
mov edx, edi
lea eax, [esp + 0x2c]
call fcn.00464620
mov esi, eax
cmp esi, 0xffffffff
je 0x42d404
test esi, esi
jne 0x42d3cf
cmp byte [esp + 0x12], al
jne 0x42d404
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x1c]
add eax, 1
cmp eax, 3
mov dword [esp + 0x1c], eax
ja 0x42d404
mov eax, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x38]
push ecx
push esi
lea edx, [esp + 0x60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42d3fe
cmp esi, dword [esp + 0x34]
jne 0x42d3fe
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x18]
cmp eax, ecx
jb 0x42d380
jmp 0x42d408
mov edi, dword [esp + 0x20]
jmp 0x42d418
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
cmp dword [ebx + 0xc], ecx
je 0x42d41d
cmp byte [esp + 0x12], 0
jne 0x42d41d
mov byte [esp + 0x13], 0
push ebx
call fcn.0059b877
mov ecx, dword [esp + 0x18]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x50], 8
jb 0x42d445
mov edx, dword [esp + 0x3c]
push edx
call fcn.0059b877
add esp, 4
xor eax, eax
lea esi, [esp + 0x28]
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], eax
mov word [esp + 0x3c], ax
call fcn.004645f0
test edi, edi
je 0x42d46c
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x1060]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1048]
xor ecx, esp
call fcn.005b88a9
mov esp, ebp
pop ebp
ret