Function at 0x100037a0
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 [0x1000e020]
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 0x10003a8c
inc dword [ebp]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
test eax, eax
jne 0x10003a4f
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x10]
cmp ecx, 7
je 0x10003a49
cmp ecx, 6
ja case.0x10003809.2
jmp dword [ecx*4 + 0x10003b04]
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.0x10003809.2
call edi
mov dword [ebx], eax
jmp case.0x10003809.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.0x10003809.2
call edi
mov dword [ebx], eax
jmp case.0x10003809.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 0x10003afd
sub eax, ecx
or edx, 0xffffffff
cmp eax, 0xffffffff
cmovb edx, eax
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x100038e2
mov eax, dword [edi]
add eax, ecx
lea ecx, [esp + 0x60]
push edx
push eax
call fcn.10002510
lea eax, [esp + 0x60]
cmp edi, eax
je 0x10003913
mov ecx, edi
call fcn.10002e50
movups xmm0, xmmword [esp + 0x60]
movups xmmword [edi], xmm0
movq xmm0, qword [esp + 0x70]
movq qword [edi + 0x10], xmm0
jmp 0x10003949
mov ecx, dword [esp + 0x74]
cmp ecx, 0x10
jb 0x10003949
mov edx, dword [esp + 0x60]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1000393f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10003a5e
push ecx
push edx
call fcn.1000a0f8
add esp, 8
cmp dword [edi + 0x14], 0x10
jb 0x10003951
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.0x10003809.2
call edi
mov dword [ebx], eax
jmp case.0x10003809.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.0x10003809.2
call edi
mov dword [ebx], eax
jmp case.0x10003809.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 0x100039f7
call edi
mov dword [ebx], eax
cmp eax, 0x3e5
je case.0x10003809.2
mov edi, dword [esp + 0x28]
test edi, edi
je 0x10003a64
mov eax, dword [esi + 0x80]
test eax, eax
je 0x10003a19
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 0x10003a33
mov ecx, ebp
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10003a20
sub ecx, edx
push ecx
push ebp
lea ecx, [esi + 0x4c]
call fcn.100044e0
add dword [esi + 0x84], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebx]
test eax, eax
je 0x100037f4
lea ebp, [esi + 0x10124]
mov edi, ebp
test eax, eax
je 0x10003aa1
cmp eax, 0x3e5
je 0x10003aa1
jmp 0x10003a98
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 0x10003aa1
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 0x10003ae3
test eax, eax
jne 0x10003ae3
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.1000a106
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.1000a106
add esp, 0x6c
ret
call fcn.10004480
nop
adc byte [eax], bh
add byte [eax], dl
cmp dword [eax], edi
add byte [eax], dl
aas
cmp al, byte [eax]
adc byte [edi], bh
cmp al, byte [eax]
adc byte [ecx + 0x79100038], dl
cmp dword [eax], eax
adc byte [eax - 0x74efffc7], ah
dec esp
and al, 8
mov eax, dword [ecx]
cmp eax, dword [0x1000e0b0]
jne 0x10003b55
cmp dword [esp + 0xc], 0x64
jne 0x10003b55
mov eax, dword [esp + 0x10]
cmp dword [eax], 0
je 0x10003b4e
add eax, 4
push eax
push ecx
call fcn.100037a0
add esp, 8
ret 0x14
mov byte [ecx + 0xe8], 1
ret 0x14