Function at 0x41613e
Capabilities:
Create http request
Download and write a file
Query remote server for available data
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2924
call fcn.00530830
mov eax, dword [0x5b01a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, 0x5af1b8
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [0x5b6830]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [esi + 0xc1c]
xor eax, eax
mov dword [ebp - 0x291c], 0x80
xor edi, edi
mov dword [ebp - 0x2920], eax
mov dword [ebp - 0x2908], eax
mov ebx, eax
mov dword [ebp - 0x2910], eax
inc edi
mov dword [ebp - 0x290c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [esi + 0xc24]
test eax, eax
je 0x4161c7
push eax
call fcn.0052ef4a
pop ecx
mov dword [ebp - 0x290c], eax
xor eax, eax
push eax
push eax
push eax
push eax
lea eax, [esi + 0x810]
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ecx, eax
mov dword [ebp - 0x2918], ecx
test ecx, ecx
je 0x4162c9
mov eax, dword [0x5af1b0]
push 4
mov dword [ebp - 0x2924], eax
lea eax, [ebp - 0x2924]
push eax
push 2
push ecx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 0
push 0x84000300
push dword [ebp - 0x290c]
lea eax, [esi + 4]
push dword [esi + 0xc24]
push eax
push dword [ebp - 0x2918]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [ebp - 0x290c], eax
test eax, eax
jne 0x416249
cmp dword [esi + 0xc28], ebx
je 0x416242
mov dword [0x5b6834], edi
xor edi, edi
jmp 0x416378
push 0
lea ecx, [ebp - 0x291c]
push ecx
lea ecx, [ebp - 0x104]
push ecx
push 5
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x41626b
or eax, 0xffffffff
jmp 0x416278
lea eax, [ebp - 0x104]
push eax
call fcn.0052faf8
pop ecx
mov ecx, dword [esi + 0xc20]
test ecx, ecx
je 0x416284
mov dword [ecx], eax
push eax
push dword [esi + 0x808]
push dword [0x5b6840]
push dword [esi + 0x80c]
call dword [sym.imp.USER32.dll_PostMessageW]
push 0
lea eax, [ebp - 0x291c]
push eax
lea eax, [ebp - 0x104]
push eax
push 0x13
push dword [ebp - 0x290c]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4162d0
cmp word [ebp - 0x104], 0x32
je 0x4162d0
xor edi, edi
jmp 0x416367
push 0
push 0
lea eax, [ebp - 0x2920]
push eax
push dword [ebp - 0x290c]
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
je 0x41634b
lea eax, [ebp - 0x2908]
push eax
push 0x2800
lea eax, [ebp - 0x2904]
push eax
push dword [ebp - 0x290c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x41634b
xor edx, edx
cmp dword [esi], edx
je 0x4163fd
mov eax, dword [esi + 0x804]
cmp eax, 0xffffffff
je 0x4164ea
push edx
lea ecx, [ebp - 0x2910]
push ecx
push dword [ebp - 0x2908]
lea ecx, [ebp - 0x2904]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4164ea
mov eax, dword [esi + 0xc14]
xor edi, edi
test eax, eax
je 0x416367
push dword [eax]
call fcn.0041816e
mov eax, dword [esi + 0xc14]
pop ecx
and dword [eax], edi
mov eax, dword [ebp - 0x290c]
test eax, eax
je 0x416378
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x2918]
test eax, eax
je 0x416389
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esi + 0x804]
cmp eax, 0xffffffff
je 0x41639b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x80c]
test eax, eax
je 0x4163b9
push edi
push dword [esi + 0x808]
push dword [0x5b6848]
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esi + 0xc24]
test eax, eax
je 0x4163ca
push eax
call fcn.0052fbc1
pop ecx
push esi
call fcn.0041816e
pop ecx
mov esi, 0x5af1b8
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
dec dword [0x5b6830]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052cea9
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2908]
test eax, eax
je 0x416559
mov ecx, dword [esi + 0xc14]
test ecx, ecx
je 0x4164e4
cmp dword [ecx], edx
jne 0x416468
inc eax
push eax
call fcn.00418165
pop ecx
mov ecx, eax
mov eax, dword [esi + 0xc14]
mov dword [eax], ecx
test ecx, ecx
je 0x41634b
push dword [ebp - 0x2908]
lea eax, [ebp - 0x2904]
push eax
mov eax, dword [esi + 0xc14]
push dword [eax]
call fcn.00531f20
mov eax, dword [esi + 0xc14]
add esp, 0xc
mov ecx, dword [eax]
mov eax, dword [ebp - 0x2908]
mov byte [eax + ecx], 0
jmp 0x4164de
inc eax
add eax, ebx
push eax
call fcn.00418165
pop ecx
mov ecx, eax
mov dword [ebp - 0x2914], ecx
test ecx, ecx
je 0x41634b
mov eax, dword [esi + 0xc14]
push ebx
push dword [eax]
push ecx
call fcn.00531f20
push dword [ebp - 0x2908]
lea eax, [ebp - 0x2904]
push eax
mov eax, dword [ebp - 0x2914]
add eax, ebx
push eax
call fcn.00531f20
mov eax, dword [esi + 0xc14]
push dword [eax]
call fcn.0041816e
mov eax, dword [esi + 0xc14]
add esp, 0x1c
mov ecx, dword [ebp - 0x2914]
mov dword [eax], ecx
mov eax, dword [esi + 0xc14]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x2908]
add ecx, ebx
mov byte [ecx + eax], 0
mov eax, dword [ebp - 0x2908]
mov dword [ebp - 0x2910], eax
add ebx, dword [ebp - 0x2910]
mov eax, dword [esi + 0xc18]
test eax, eax
je 0x4164fc
mov dword [eax], ebx
mov eax, dword [esi + 0x80c]
test eax, eax
je 0x41651a
push ebx
push dword [esi + 0x808]
push dword [0x5b6844]
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [0x5b6838], 0
je 0x41653d
cmp dword [0x5b683c], 0xffffffff
je 0x41634b
mov eax, dword [0x5b683c]
cmp eax, dword [esi + 0x808]
je 0x41656e
mov eax, dword [esi + 0xc10]
cmp eax, 0xffffffff
je 0x41654c
cmp eax, ebx
jle 0x416559
cmp dword [ebp - 0x2908], 0
jne 0x4162d0
mov eax, dword [esi + 0xc18]
test eax, eax
je 0x416367
mov dword [eax], ebx
jmp 0x416367
mov dword [0x5b6838], 0
jmp 0x41634b