Function at 0x415ded
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.00530440
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 [0x5b6838]
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 0x415e76
push eax
call fcn.0052eb7a
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 0x415f78
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 0x415ef8
cmp dword [esi + 0xc28], ebx
je 0x415ef1
mov dword [0x5b683c], edi
xor edi, edi
jmp 0x416027
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 0x415f1a
or eax, 0xffffffff
jmp 0x415f27
lea eax, [ebp - 0x104]
push eax
call fcn.0052f709
pop ecx
mov ecx, dword [esi + 0xc20]
test ecx, ecx
je 0x415f33
mov dword [ecx], eax
push eax
push dword [esi + 0x808]
push dword [0x5b6848]
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 0x415f7f
cmp word [ebp - 0x104], 0x32
je 0x415f7f
xor edi, edi
jmp 0x416016
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 0x415ffa
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 0x415ffa
xor edx, edx
cmp dword [esi], edx
je 0x4160ac
mov eax, dword [esi + 0x804]
cmp eax, 0xffffffff
je 0x416199
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 0x416199
mov eax, dword [esi + 0xc14]
xor edi, edi
test eax, eax
je 0x416016
push dword [eax]
call fcn.00417dde
mov eax, dword [esi + 0xc14]
pop ecx
and dword [eax], edi
mov eax, dword [ebp - 0x290c]
test eax, eax
je 0x416027
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x2918]
test eax, eax
je 0x416038
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esi + 0x804]
cmp eax, 0xffffffff
je 0x41604a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x80c]
test eax, eax
je 0x416068
push edi
push dword [esi + 0x808]
push dword [0x5b6850]
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esi + 0xc24]
test eax, eax
je 0x416079
push eax
call fcn.0052f7d2
pop ecx
push esi
call fcn.00417dde
pop ecx
mov esi, 0x5af1b8
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
dec dword [0x5b6838]
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.0052cad4
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2908]
test eax, eax
je 0x416208
mov ecx, dword [esi + 0xc14]
test ecx, ecx
je 0x416193
cmp dword [ecx], edx
jne 0x416117
inc eax
push eax
call fcn.00417dd5
pop ecx
mov ecx, eax
mov eax, dword [esi + 0xc14]
mov dword [eax], ecx
test ecx, ecx
je 0x415ffa
push dword [ebp - 0x2908]
lea eax, [ebp - 0x2904]
push eax
mov eax, dword [esi + 0xc14]
push dword [eax]
call fcn.00531b50
mov eax, dword [esi + 0xc14]
add esp, 0xc
mov ecx, dword [eax]
mov eax, dword [ebp - 0x2908]
mov byte [eax + ecx], 0
jmp 0x41618d
inc eax
add eax, ebx
push eax
call fcn.00417dd5
pop ecx
mov ecx, eax
mov dword [ebp - 0x2914], ecx
test ecx, ecx
je 0x415ffa
mov eax, dword [esi + 0xc14]
push ebx
push dword [eax]
push ecx
call fcn.00531b50
push dword [ebp - 0x2908]
lea eax, [ebp - 0x2904]
push eax
mov eax, dword [ebp - 0x2914]
add eax, ebx
push eax
call fcn.00531b50
mov eax, dword [esi + 0xc14]
push dword [eax]
call fcn.00417dde
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 0x4161ab
mov dword [eax], ebx
mov eax, dword [esi + 0x80c]
test eax, eax
je 0x4161c9
push ebx
push dword [esi + 0x808]
push dword [0x5b684c]
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [0x5b6840], 0
je 0x4161ec
cmp dword [0x5b6844], 0xffffffff
je 0x415ffa
mov eax, dword [0x5b6844]
cmp eax, dword [esi + 0x808]
je 0x41621d
mov eax, dword [esi + 0xc10]
cmp eax, 0xffffffff
je 0x4161fb
cmp eax, ebx
jle 0x416208
cmp dword [ebp - 0x2908], 0
jne 0x415f7f
mov eax, dword [esi + 0xc18]
test eax, eax
je 0x416016
mov dword [eax], ebx
jmp 0x416016
mov dword [0x5b6840], 0
jmp 0x415ffa