Function at 0x402160
Capabilities:
Check http status code
Create http request
Delete file
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b3ab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2698
call fcn.00405b90
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 0x10], esp
cmp esi, edi
mov byte [ebp - 0x11], 0
je 0x4024e8
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x4024e8
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x6a8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push edi
push edi
push edi
push edi
mov dword [ebp + 0xc], edi
mov dword [ebp - 4], edi
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
cmp ebx, edi
mov dword [ebp - 0x18], ebx
je 0x4024e8
mov eax, dword [ebp + 0x14]
cmp eax, edi
je 0x4021e1
mov dword [eax], ebx
mov edx, dword [ebp + 0x10]
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
lea eax, [ebp + 8]
push 4
push eax
push 2
push ebx
mov dword [ebp + 8], edx
call edi
lea ecx, [ebp + 8]
push 4
push ecx
push 6
push ebx
mov dword [ebp + 8], 0xea60
call edi
call fcn.004033b0
cmp eax, 7
jl 0x402362
lea edx, [ebp + 8]
push 4
push edx
push 0x41
push ebx
mov dword [ebp + 8], 1
call edi
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x253]
mov byte [ebp - 0x254], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x254]
push 0x30
push eax
push str.3d2bf7c59c6cfeb086571ecd9699875321f8c84d3126e7bf805122e786384b2ae5b8400010ddaa7c3d1cd94d162d17d5ae351507d1a6780abcb5a37a3504d0912bfcc2904c2027ffc9985534f5ba9055f7a8a17335fda4884a18efa0a3815214ebbf8700facc64450ad9af60604a0dd4a17648cfa066340bbc96824520cc92603f03b48e7a3d18c48a5839fbac86723510a8976c3ed8b77e4c16e8b57c4e12e2ad7d461bcca6925530c8b78c5ef8d79e713607d0a36a3d0bbc96824520b8a77c4ee8c68e5c26f9c0935a2be9
call fcn.00403660
add esp, 0xc
lea ecx, [ebp - 0x354]
push 0x100
push ecx
push esi
call fcn.00403bb0
add esp, 0xc
lea edx, [ebp - 0x5a4]
push 0x100
push edx
push esi
call fcn.00403850
add esp, 0xc
test eax, eax
push 1
je 0x402343
lea eax, [ebp - 0x5a4]
lea ecx, [ebp - 0x354]
push eax
push ecx
push esi
call fcn.00403ab0
mov ebx, eax
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x453]
mov byte [ebp - 0x454], 0
add esp, 0x10
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [ebp - 0x454]
push 0x30
push edx
push 0x40e3c4
stosb byte es:[edi], al
call fcn.00403660
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0xc
lea eax, [ebp - 0x354]
lea ecx, [ebp - 0x354]
push eax
lea edx, [ebp - 0x454]
push ecx
lea eax, [ebp - 0x254]
push edx
push eax
call esi
lea ecx, [ebp + eax - 0x254]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [ebp - 0x254]
push 1
push 0x80000002
push edx
call esi
mov ecx, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x254]
push eax
push ebx
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
push ebx
mov dword [ebp + 0xc], esi
call fcn.00404a92
mov ebx, dword [ebp - 0x18]
add esp, 4
jmp 0x40249f
lea edx, [ebp - 0x254]
push 0x80000002
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x254]
push eax
jmp 0x402492
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x253]
mov byte [ebp - 0x254], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x254]
push 0x30
push ecx
push 0x40e400
stosb byte es:[edi], al
call fcn.00403660
add esp, 0xc
lea edx, [ebp - 0x454]
push 0x100
push edx
push esi
call fcn.00403bb0
add esp, 0xc
lea eax, [ebp - 0x5a4]
push 0x100
push eax
push esi
call fcn.00403850
add esp, 0xc
test eax, eax
push 1
je 0x402478
lea ecx, [ebp - 0x5a4]
lea edx, [ebp - 0x454]
push ecx
push edx
push esi
call fcn.00403ab0
mov ebx, eax
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x353]
mov byte [ebp - 0x354], 0
add esp, 0x10
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x354]
push 0x30
push eax
push 0x40e558
call fcn.00403660
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0xc
lea ecx, [ebp - 0x454]
lea edx, [ebp - 0x454]
push ecx
lea eax, [ebp - 0x354]
push edx
lea ecx, [ebp - 0x254]
push eax
push ecx
call esi
lea edx, [ebp + eax - 0x254]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x254]
push 1
push 0x80000002
push eax
call esi
mov edx, dword [ebp - 0x18]
lea ecx, [ebp - 0x254]
push eax
push ecx
push ebx
push edx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
push ebx
mov dword [ebp + 0xc], esi
call fcn.00404a92
mov ebx, dword [ebp - 0x18]
add esp, 4
jmp 0x40249f
lea eax, [ebp - 0x254]
push 0x80000002
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x254]
push eax
push ecx
push esi
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
mov dword [ebp + 0xc], esi
test esi, esi
jne 0x4024ac
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x4024db
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea edx, [ebp + 8]
push 0
lea eax, [ebp - 0x4a4]
push edx
push eax
push 0x13
push esi
mov dword [ebp + 8], 0x50
call edi
test eax, eax
jne 0x4024fb
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4024e8
mov dword [eax], 0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x4a4]
push ecx
call fcn.00405b7b
add esp, 4
cmp eax, 0xc8
jl 0x4024cf
cmp eax, 0x12b
jg 0x4024cf
xor eax, eax
lea edx, [ebp + 8]
mov dword [ebp + 0x10], eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0x20]
push edx
lea ecx, [ebp - 0x54]
push eax
push ecx
push 5
push esi
mov dword [ebp - 0x20], 0x20
call edi
xor edi, edi
cmp eax, edi
je 0x40254d
lea edx, [ebp - 0x54]
push edx
call fcn.00405b7b
add esp, 4
mov dword [ebp + 0x10], eax
lea eax, [ebp - 0x6a8]
mov byte [ebp + 0xb], 0
push eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x34], 0xc
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
push 0x80
lea ecx, [ebp - 0x34]
push 2
push ecx
push 1
lea edx, [ebp - 0x6a8]
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
jne 0x4025c2
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
mov eax, dword [ebp + 0x14]
cmp eax, edi
je 0x4024e8
mov dword [eax], edi
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
call fcn.00404a9d
mov ecx, eax
add esp, 4
mov dword [ebp - 0x28], ecx
cmp ecx, edi
mov byte [ebp - 4], 1
je 0x4025e0
call fcn.004020f0
mov edi, eax
mov byte [ebp - 4], 0
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x26a8]
push eax
push 0x2000
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x402605
mov byte [ebp + 0xb], 1
jmp 0x40264d
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40264d
test edi, edi
je 0x402636
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x28]
push 0
push edx
push eax
lea eax, [ebp - 0x26a8]
push eax
push ecx
mov ecx, edi
call fcn.00402110
test eax, eax
jne 0x402633
mov byte [ebp + 0xb], 1
jmp 0x40264d
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
add ecx, eax
mov eax, dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 0x1c], ecx
jbe 0x4025e4
mov edx, eax
mov eax, ecx
cmp eax, edx
jl 0x4025e4
test edi, edi
je 0x402661
mov ecx, edi
call fcn.00402100
push edi
call fcn.00404a92
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x402684
mov dword [eax], 0
mov al, byte [ebp + 0xb]
test al, al
jne 0x4026af
mov eax, dword [ebp + 0x10]
test eax, eax
jbe 0x402697
cmp dword [ebp - 0x1c], eax
jl 0x4026af
mov byte [ebp - 0x11], 1
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x6a8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0x11]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret