Function at 0x412ef0
Capabilities:
Connect to http server
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Reference http user-agent string
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1904
call fcn.004391d0
mov eax, dword [0x48f244]
xor eax, esp
mov dword [esp + 0x1900], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x24]
push edi
call fcn.00411c10
lea eax, [esp + 0x28]
mov byte [esp + 0x13], 0
push eax
push ebx
call fcn.00413680
test al, al
jne 0x412f4c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1900]
xor ecx, esp
call fcn.004390b1
mov esp, ebp
pop ebp
ret 4
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__Windows_NT_10.0__Win64__x64__AppleWebKit_537.36__KHTML__like_Gecko__Chrome_122.0.0.0_Safari_537.36_Edg_122.0.0.0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
je 0x4132dd
push 0
push 0
push 3
lea eax, [esp + 0x374]
push eax
lea eax, [esp + 0x278]
push eax
push dword [esp + 0x16e4]
lea eax, [esp + 0x80]
push eax
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, eax
mov dword [esp + 0x20], ecx
test ecx, ecx
je 0x4132da
cmp dword [esp + 0x16c4], 4
mov edx, 0x80ccb300
push 0
mov eax, 0x804c8200
cmove eax, edx
push eax
push 0
push 0
push 0
lea eax, [esp + 0x47c]
push eax
push 0x483848
push ecx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4132d4
mov edi, dword [ebx + 0x38]
lea eax, [esp + 0x1700]
mov esi, dword [ebx + 0x3c]
push 0x208
push 0
push eax
call fcn.00444b80
mov eax, dword [ebx + 0x44]
add esp, 0xc
mov ecx, edi
add ecx, dword [ebx + 0x40]
adc eax, esi
sub ecx, 1
sbb eax, 0
push eax
push ecx
push esi
push edi
push 0x484b3c
lea eax, [esp + 0x1714]
push 0x104
push eax
call fcn.004106d0
lea ecx, [esp + 0x171c]
add esp, 0x1c
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413040
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x1700]
sub ecx, edx
push 0
sar ecx, 1
push ecx
push eax
push esi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
je 0x4132c4
sub esp, 8
push 0
push 0
push esi
call fcn.004135b0
test al, al
je 0x4132c4
push 0x208
lea eax, [esp + 0x1704]
push 0
push eax
call fcn.00444b80
add esp, 0xc
mov dword [esp + 0x16f8], 0x208
lea eax, [esp + 0x16f8]
push 0
push eax
lea eax, [esp + 0x1708]
push eax
push 5
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x4130cd
mov byte [eax + 0x2a], 0
jmp 0x4130e5
push 0xa
mov byte [eax + 0x2a], 1
lea eax, [esp + 0x1704]
push 0
push eax
call fcn.00454395
add esp, 0xc
mov edi, dword [ebx + 0x30]
test edi, edi
je 0x4131a3
push 0x2000
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x4132c4
nop
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0x2000
push esi
push dword [esp + 0x24]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x413186
mov eax, dword [esp + 0x24]
test eax, eax
je 0x413164
push eax
push esi
push edi
call fcn.00444600
mov eax, dword [esp + 0x30]
add esp, 0xc
add edi, eax
add dword [ebx + 0x48], eax
mov eax, dword [esp + 0x14]
adc dword [ebx + 0x4c], 0
cmp byte [eax + 0x28], 0
je 0x413110
mov dword [ebx + 0x50], 3
jmp 0x41318d
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebx + 0x50], 1
call eax
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [esp + 0x13], 1
jmp 0x4132c4
mov dword [ebx + 0x50], 2
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call eax
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4132c4
cmp dword [ebx + 0x2c], 8
lea eax, [ebx + 0x18]
mov byte [esp + 0x12], 0
jb 0x4131b3
mov eax, dword [eax]
push 0
push 0x20
push 4
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x24], eax
cmp eax, 0xffffffff
je 0x4132c4
push 0x2000
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x4132ba
push 0
push 0
push dword [ebx + 0x3c]
push dword [ebx + 0x38]
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
lea eax, [esp + 0x16fc]
mov dword [esp + 0x16fc], 0
push eax
push 0x2000
push edi
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x41328b
mov eax, dword [esp + 0x16fc]
test eax, eax
je 0x41327d
push 0
lea ecx, [esp + 0x16fc]
mov dword [esp + 0x16fc], 0
push ecx
push eax
push edi
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41328b
mov eax, dword [esp + 0x16f8]
add dword [ebx + 0x48], eax
mov eax, dword [esp + 0x14]
adc dword [ebx + 0x4c], 0
cmp byte [eax + 0x28], 0
je 0x413208
mov dword [ebx + 0x50], 3
jmp 0x413292
mov byte [esp + 0x12], 1
mov dword [ebx + 0x50], 1
jmp 0x413292
mov dword [ebx + 0x50], 2
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp byte [esp + 0x12], 0
je 0x4132c4
mov byte [esp + 0x13], 1
jmp 0x4132c4
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x18]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov edi, dword [esp + 0x1c]
push dword [esp + 0x20]
call esi
push edi
call esi
mov ecx, dword [esp + 0x190c]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004390b1
mov esp, ebp
pop ebp
ret 4