Function at 0x446880
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Resolve function by parsing pe exports
Send data
Write file on windows

Disassembly:
sub esp, 0x6c
mov eax, dword [0x470d10]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
mov ebx, dword [esp + 0x78]
push ebp
push esi
mov esi, dword [esp + 0x7c]
push edi
lea edi, [esi + 0x10108]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esi + 0x10128], 0
lea ebp, [esi + 0x10124]
push edi
jne 0x446b6c
inc dword [ebp]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
test eax, eax
jne 0x446b2f
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x10]
cmp ecx, 7
je 0x446b29
cmp ecx, 6
ja case.0x4468e9.2
jmp dword [ecx*4 + 0x446be4]
push 0
push 0
push 0
push 0
push dword [esi + 8]
mov dword [esi + 0x10], 6
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne case.0x4468e9.2
call edi
mov dword [ebx], eax
jmp case.0x4468e9.2
mov eax, dword [esi + 0x100]
xorps xmm0, xmm0
push esi
push 0
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x40]
push 0
push eax
push dword [esi + 8]
movlpd qword [esp + 0x50], xmm0
movlpd qword [esp + 0x58], xmm0
movlpd qword [esp + 0x60], xmm0
movlpd qword [esp + 0x6c], xmm0
mov dword [esp + 0x4c], 0x28
mov dword [esi + 0x10], 4
call dword [sym.imp.WININET.dll_HttpSendRequestExA]
test eax, eax
jne case.0x4468e9.2
call edi
mov dword [ebx], eax
jmp case.0x4468e9.2
mov ecx, dword [esi + 0xec]
lea ebp, [esi + 0xec]
lea edi, [esi + 0xf0]
mov dword [esi + 0x10], 5
mov eax, dword [edi + 0x10]
xorps xmm0, xmm0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
movups xmmword [esp + 0x60], xmm0
cmp eax, ecx
jb 0x446bdd
sub eax, ecx
or edx, 0xffffffff
cmp eax, 0xffffffff
cmovb edx, eax
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x4469c2
mov eax, dword [edi]
add eax, ecx
lea ecx, [esp + 0x60]
push edx
push eax
call fcn.004456f0
lea eax, [esp + 0x60]
cmp edi, eax
je 0x4469f3
mov ecx, edi
call fcn.00445f80
movups xmm0, xmmword [esp + 0x60]
movups xmmword [edi], xmm0
movq xmm0, qword [esp + 0x70]
movq qword [edi + 0x10], xmm0
jmp 0x446a29
mov ecx, dword [esp + 0x74]
cmp ecx, 0x10
jb 0x446a29
mov edx, dword [esp + 0x60]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x446a1f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x446b3e
push ecx
push edx
call fcn.0045fbd8
add esp, 8
cmp dword [edi + 0x14], 0x10
jb 0x446a31
mov edi, dword [edi]
push ebp
push dword [esi + 0x100]
push edi
push dword [esi + 8]
call dword [sym.imp.WININET.dll_InternetWriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne case.0x4468e9.2
call edi
mov dword [ebx], eax
jmp case.0x4468e9.2
push 0
push 8
push 0
push dword [esi + 8]
mov dword [esi + 0x10], 6
call dword [sym.imp.WININET.dll_HttpEndRequestA]
test eax, eax
jne case.0x4468e9.2
call edi
mov dword [ebx], eax
jmp case.0x4468e9.2
push esi
push 0xc
lea eax, [esp + 0x18]
mov dword [esp + 0x3c], 0
xorps xmm0, xmm0
mov dword [esp + 0x18], 0x28
push eax
push dword [esi + 8]
lea ebp, [esi + 0x108]
movlpd qword [esp + 0x24], xmm0
movlpd qword [esp + 0x2c], xmm0
movlpd qword [esp + 0x3c], xmm0
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], 0xffff
call dword [sym.imp.WININET.dll_InternetReadFileExA]
test eax, eax
jne 0x446ad7
call edi
mov dword [ebx], eax
cmp eax, 0x3e5
je case.0x4468e9.2
mov edi, dword [esp + 0x28]
test edi, edi
je 0x446b44
mov eax, dword [esi + 0x80]
test eax, eax
je 0x446af9
push eax
push edi
push 1
push ebp
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
jmp 0x446b13
mov ecx, ebp
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x446b00
sub ecx, edx
push ecx
push ebp
lea ecx, [esi + 0x4c]
call fcn.004475a0
add dword [esi + 0x84], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebx]
test eax, eax
je 0x4468d4
lea ebp, [esi + 0x10124]
mov edi, ebp
test eax, eax
je 0x446b81
cmp eax, 0x3e5
je 0x446b81
jmp 0x446b78
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov dword [esi + 0x10], 7
mov byte [esi + 0xe9], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x1012c]
lea edi, [esi + 0x10124]
mov dword [esi + 0x1012c], eax
jmp 0x446b81
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebx], 0x3e3
mov byte [esi + 0xe8], 1
mov edi, ebp
lea ebx, [esi + 0x10108]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi]
dec eax
cmp byte [esi + 0x10128], 1
mov dword [edi], eax
jne 0x446bc3
test eax, eax
jne 0x446bc3
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [esi + 8]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0045f441
add esp, 0x6c
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x78]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045f441
add esp, 0x6c
ret
call fcn.00447540
nop
invalid