Function at 0x402970
Capabilities:
Check http status code
Create http request
Delete file
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40de00
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x268c
call fcn.004066d0
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 0x402cc2
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x402cc2
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x69c]
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 0x402cc2
mov eax, dword [ebp + 0x14]
cmp eax, edi
je 0x4029f1
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.00403bc0
cmp eax, 7
jl 0x402b72
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 - 0x247]
mov byte [ebp - 0x248], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x248]
push 0x30
push eax
push str.3d2bf7c59c6cfeb086571ecd9699875321f8c84d3126e7bf805122e786384b2ae5b8400010ddaa7c3d1cd94d162d17d5ae351507d1a6780abcb5a37a3504d0912bfcc2904c2027ffc9985534f5ba9055f7a8a17335fda4884a18efa0a3815214ebbf8700facc64450ad9af60604a0dd4a17648cfa066340bbc96824520cc92603f03b48e7a3d18c48a5839fbac86723510a8976c3ed8b77e4c16e8b57c4e12e2ad7d461bcca6925530c8b78c5ef8d79e713607d0a36a3d0bbc96824520b8a77c4ee8c68e5c26f9c0935a2be9
call fcn.00403fb0
add esp, 0xc
lea ecx, [ebp - 0x348]
push 0x100
push ecx
push esi
call fcn.00404740
add esp, 0xc
lea edx, [ebp - 0x598]
push 0x100
push edx
push esi
call fcn.004043c0
add esp, 0xc
test eax, eax
push 1
je 0x402b53
lea eax, [ebp - 0x598]
lea ecx, [ebp - 0x348]
push eax
push ecx
push esi
call fcn.00404640
mov esi, eax
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x447]
mov byte [ebp - 0x448], 0
add esp, 0x10
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [ebp - 0x448]
push 0x30
push edx
push 0x410700
mov dword [ebp + 0x10], esi
stosb byte es:[edi], al
call fcn.00403fb0
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0xc
lea eax, [ebp - 0x348]
lea ecx, [ebp - 0x348]
push eax
lea edx, [ebp - 0x448]
push ecx
lea eax, [ebp - 0x248]
push edx
push eax
call edi
lea ecx, [ebp + eax - 0x248]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [ebp - 0x248]
push 1
push 0x80000002
push edx
call edi
push eax
lea eax, [ebp - 0x248]
push eax
push esi
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ecx, dword [ebp + 0x10]
mov esi, eax
push ecx
mov dword [ebp + 0xc], esi
call fcn.004055a2
add esp, 4
jmp 0x402cac
lea edx, [ebp - 0x248]
push 0x80000002
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x248]
push eax
jmp 0x402ca2
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x247]
mov byte [ebp - 0x248], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x248]
push 0x30
push ecx
push 0x41073c
stosb byte es:[edi], al
call fcn.00403fb0
add esp, 0xc
lea edx, [ebp - 0x448]
push 0x100
push edx
push esi
call fcn.00404740
add esp, 0xc
lea eax, [ebp - 0x598]
push 0x100
push eax
push esi
call fcn.004043c0
add esp, 0xc
test eax, eax
push 1
je 0x402c88
lea ecx, [ebp - 0x598]
lea edx, [ebp - 0x448]
push ecx
push edx
push esi
call fcn.00404640
mov esi, eax
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x347]
mov byte [ebp - 0x348], 0
add esp, 0x10
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x348]
push 0x30
push eax
push 0x410894
mov dword [ebp + 8], esi
call fcn.00403fb0
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0xc
lea ecx, [ebp - 0x448]
lea edx, [ebp - 0x448]
push ecx
lea eax, [ebp - 0x348]
push edx
lea ecx, [ebp - 0x248]
push eax
push ecx
call edi
lea edx, [ebp + eax - 0x248]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x248]
push 1
push 0x80000002
push eax
call edi
lea ecx, [ebp - 0x248]
push eax
push ecx
push esi
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edx, dword [ebp + 8]
mov esi, eax
push edx
mov dword [ebp + 0xc], esi
call fcn.004055a2
add esp, 4
jmp 0x402cac
lea eax, [ebp - 0x248]
push 0x80000002
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x248]
push eax
push ecx
push esi
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
xor edi, edi
cmp esi, edi
jne 0x402cd5
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp + 0x14]
cmp eax, edi
je 0x402cc2
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
lea edx, [ebp + 8]
push edi
lea eax, [ebp - 0x498]
push edx
push eax
push 0x13
push esi
mov dword [ebp + 8], 0x50
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x402d03
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
jmp 0x402cb9
lea ecx, [ebp - 0x498]
push ecx
call fcn.00405b45
add esp, 4
cmp eax, 0xc8
jl 0x402cf5
cmp eax, 0x12b
jg 0x402cf5
lea edx, [ebp + 8]
lea eax, [ebp + 0x10]
push edx
lea ecx, [ebp - 0x48]
push eax
push ecx
push 5
push esi
mov dword [ebp + 0xc], edi
mov dword [ebp + 8], edi
mov dword [ebp + 0x10], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x402d55
lea edx, [ebp - 0x48]
push edx
call fcn.00405b45
add esp, 4
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0x69c]
mov byte [ebp + 0xb], 0
push eax
mov dword [ebp + 0x10], edi
mov dword [ebp - 0x24], 0xc
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
push 0x80
lea ecx, [ebp - 0x24]
push 2
push ecx
push 1
lea edx, [ebp - 0x69c]
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x402dcd
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 0x402cc2
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 eax, [ebp - 0x18]
lea ecx, [ebp - 0x269c]
push eax
push 0x2000
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x402dee
mov byte [ebp + 0xb], 1
jmp 0x402e2f
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x402e2f
lea edx, [ebp - 0x28]
push 0
push edx
push eax
lea eax, [ebp - 0x269c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402e14
mov byte [ebp + 0xb], 1
jmp 0x402e2f
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
add edx, ecx
test eax, eax
mov dword [ebp + 0x10], edx
jbe 0x402dcd
mov edx, eax
mov eax, dword [ebp + 0x10]
cmp eax, edx
jl 0x402dcd
push edi
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 0x402e4f
mov dword [eax], 0
mov al, byte [ebp + 0xb]
test al, al
jne 0x402e7a
mov eax, dword [ebp + 0xc]
test eax, eax
jbe 0x402e62
cmp dword [ebp + 0x10], eax
jl 0x402e7a
mov byte [ebp - 0x11], 1
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
lea eax, [ebp - 0x69c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x402e66