Function at 0x446320
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 [0x45a210]
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 0x44660c
inc dword [ebp]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
test eax, eax
jne 0x4465cf
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x10]
cmp ecx, 7
je 0x4465c9
cmp ecx, 6
ja case.0x446389.2
jmp dword [ecx*4 + 0x446684]
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.0x446389.2
call edi
mov dword [ebx], eax
jmp case.0x446389.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.0x446389.2
call edi
mov dword [ebx], eax
jmp case.0x446389.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 0x44667d
sub eax, ecx
or edx, 0xffffffff
cmp eax, 0xffffffff
cmovb edx, eax
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x446462
mov eax, dword [edi]
add eax, ecx
lea ecx, [esp + 0x60]
push edx
push eax
call fcn.00445190
lea eax, [esp + 0x60]
cmp edi, eax
je 0x446493
mov ecx, edi
call fcn.00445a20
movups xmm0, xmmword [esp + 0x60]
movups xmmword [edi], xmm0
movq xmm0, qword [esp + 0x70]
movq qword [edi + 0x10], xmm0
jmp 0x4464c9
mov ecx, dword [esp + 0x74]
cmp ecx, 0x10
jb 0x4464c9
mov edx, dword [esp + 0x60]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4464bf
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4465de
push ecx
push edx
call fcn.0044c8d8
add esp, 8
cmp dword [edi + 0x14], 0x10
jb 0x4464d1
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.0x446389.2
call edi
mov dword [ebx], eax
jmp case.0x446389.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.0x446389.2
call edi
mov dword [ebx], eax
jmp case.0x446389.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 0x446577
call edi
mov dword [ebx], eax
cmp eax, 0x3e5
je case.0x446389.2
mov edi, dword [esp + 0x28]
test edi, edi
je 0x4465e4
mov eax, dword [esi + 0x80]
test eax, eax
je 0x446599
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 0x4465b3
mov ecx, ebp
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4465a0
sub ecx, edx
push ecx
push ebp
lea ecx, [esi + 0x4c]
call fcn.00447040
add dword [esi + 0x84], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebx]
test eax, eax
je 0x446374
lea ebp, [esi + 0x10124]
mov edi, ebp
test eax, eax
je 0x446621
cmp eax, 0x3e5
je 0x446621
jmp 0x446618
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 0x446621
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 0x446663
test eax, eax
jne 0x446663
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.0044c1d1
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.0044c1d1
add esp, 0x6c
ret
call fcn.00446fe0
nop
nop
arpl word [eax + eax - 71], ax
arpl word [eax + eax - 0x41], ax
inc esp
add byte [edi + 0x11004465], bh
inc esp
add cl, bh
inc esp
add byte [eax], ah
inc esp
add byte [ebx - 0x74f7dbb4], cl
add dword [ebx], edi
add eax, 0x45a318
jne 0x4466d5
cmp dword [esp + 0xc], 0x64
jne 0x4466d5
mov eax, dword [esp + 0x10]
cmp dword [eax], 0
je 0x4466ce
add eax, 4
push eax
push ecx
call fcn.00446320
add esp, 8
ret 0x14
mov byte [ecx + 0xe8], 1
ret 0x14