Function at 0x10002ae0
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 0x1006da1c
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1054
call fcn.10040c00
mov eax, dword [0x1007d1f8]
xor eax, esp
mov dword [esp + 0x1050], eax
push ebx
push esi
push edi
mov eax, dword [0x1007d1f8]
xor eax, esp
push eax
lea eax, [esp + 0x1068]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
push 0
push 0
push 0
push 0
push 0
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x38], edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
mov dword [esp + 0x20], ebx
push 4
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x1078], 0
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
push 2
push ebx
mov dword [esp + 0x28], 0x7d0
call edi
push 4
lea ecx, [esp + 0x1c]
push ecx
push 3
push ebx
mov dword [esp + 0x28], 3
call edi
xor edi, edi
cmp dword [esi + 0x18], 0x10
mov dword [esp + 0x28], edi
jb 0x10002b9d
mov esi, dword [esi + 4]
jmp 0x10002ba0
add esi, 4
push edi
push 0x400000
push 0xffffffffffffffff
push edi
push esi
push ebx
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
mov dword [esp + 0x2c], esi
cmp esi, edi
mov byte [esp + 0x1070], 1
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoA]
mov dword [esp + 0x18], 4
je 0x10002bed
push 0
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x30]
push eax
push 0x20000013
push esi
call ebx
cmp dword [esp + 0x28], 0xc8
je 0x10002c16
test esi, esi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x10002c04
push esi
call edi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10002c0f
push eax
call edi
xor al, al
jmp 0x10002ea0
test esi, esi
mov edi, dword [ebp + 0x18]
mov byte [esp + 0x15], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 4
je 0x10002c4f
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
push 0x20000005
push esi
call ebx
test eax, eax
setne al
test al, al
jne 0x10002c78
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
jne 0x10002bf7
test edi, edi
mov byte [esp + 0x15], 1
jbe 0x10002c6d
mov eax, edi
mov dword [esp + 0x1c], eax
jmp 0x10002c7c
mov eax, 0x3200000
mov dword [esp + 0x1c], eax
jmp 0x10002c8a
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x10002c8a
cmp byte [esp + 0x15], al
je 0x10002d2b
test edi, edi
jbe 0x10002c96
cmp eax, edi
jne 0x10002d2b
mov esi, dword [esp + 0x3c]
lea eax, [esp + 0x40]
push esi
push eax
call fcn.1000c610
lea ecx, [esp + 0x48]
push ecx
mov byte [esp + 0x107c], 2
call fcn.1000e2a0
add esp, 0xc
test al, al
jne 0x10002cc7
lea edi, [esp + 0x40]
call fcn.1000ede0
mov edi, 0x10
mov byte [esp + 0x1070], 3
cmp dword [esi + 0x18], edi
jb 0x10002cde
mov eax, dword [esi + 4]
jmp 0x10002ce1
lea eax, [esi + 4]
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x10002d4e
cmp dword [esp + 0x58], edi
jb 0x10002d16
mov edx, dword [esp + 0x44]
push edx
call fcn.10040f62
add esp, 4
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], 0
mov byte [esp + 0x44], 0
lea esi, [esp + 0x2c]
call fcn.10027850
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10002c0f
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x10002ea0
mov eax, dword [esp + 0x24]
test eax, eax
mov byte [esp + 0x17], 0
je 0x10002d64
mov ecx, dword [esp + 0x1c]
mov dword [eax + 8], ecx
jmp 0x10002d86
push 0x28
mov byte [esp + 0x1b], 1
call fcn.10041593
mov esi, eax
add esp, 4
test esi, esi
je 0x10002d84
mov eax, dword [esp + 0x1c]
call fcn.10001f80
jmp 0x10002d86
xor eax, eax
mov edx, dword [esp + 0x1c]
mov esi, eax
xor ebx, ebx
cmp dword [esi + 0xc], edx
mov byte [esp + 0x16], 1
jae 0x10002e2b
lea esp, [esp]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x10002db5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x10002e2b
cmp byte [esp + 0x15], 0
mov edx, 0x1000
jne 0x10002dce
mov eax, dword [esp + 0x1c]
sub eax, dword [esi + 0xc]
cmp eax, edx
jae 0x10002dce
mov edx, eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x30]
call fcn.10027990
mov edi, eax
cmp edi, 0xffffffff
je 0x10002e2b
test edi, edi
jne 0x10002dfc
cmp byte [esp + 0x15], al
jne 0x10002e2b
push 0xa
call sub.KERNEL32.dll_Sleep
add ebx, 1
cmp ebx, 3
ja 0x10002e2b
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x28]
push ecx
push edi
lea edx, [esp + 0x68]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10002e3b
cmp edi, dword [esp + 0x24]
jne 0x10002e3b
mov ecx, dword [esi + 0xc]
cmp ecx, dword [esp + 0x1c]
jb 0x10002da0
mov edx, dword [esp + 0x1c]
cmp dword [esi + 0xc], edx
je 0x10002e40
cmp byte [esp + 0x15], 0
jne 0x10002e40
mov byte [esp + 0x16], 0
cmp byte [esp + 0x17], 0
je 0x10002e50
push esi
call fcn.10040f62
add esp, 4
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x58], 0x10
jb 0x10002e6f
mov ecx, dword [esp + 0x44]
push ecx
call fcn.10040f62
add esp, 4
lea esi, [esp + 0x2c]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], 0
mov byte [esp + 0x44], 0
call fcn.10027850
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10002e9c
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov al, byte [esp + 0x16]
mov ecx, dword [esp + 0x1068]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1050]
xor ecx, esp
call fcn.10040be4
mov esp, ebp
pop ebp
ret