Function at 0x4061a0
Capabilities:
Check http status code
Check if file exists
Delete file
Download and write a file
Get http content length
Move file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Send http request with host header
Set file attributes
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3dc
mov eax, dword [0x42a390]
push ebx
mov ebx, dword [ebp + 8]
xor eax, ebp
push esi
mov dword [esp + 0x3e0], eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
lea ecx, [esi + 0x4c]
mov dword [esp + 0x5c], edi
mov dword [esp + 0x34], eax
call fcn.00403f00
push edi
lea ecx, [esp + 0x14]
call fcn.00405550
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x4061fd
push 3
push 0x42465c
lea ecx, [esp + 0x18]
call fcn.004048a0
push ebx
mov ecx, esi
call fcn.00405340
test eax, eax
jne 0x406243
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406227
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, closesocket
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 0x48]
xor edi, edi
cmp eax, edi
je 0x406253
mov ecx, esi
call fcn.00403a50
cmp dword [esi + 0x44], edi
je 0x40629d
mov ecx, esi
call fcn.00403a50
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c46
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [0x42b1a8]
mov ecx, 0x42b1a8
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x28]
lea ebx, [esi + 0x28]
push 0x2f
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
call fcn.004155dc
add esp, 8
cmp eax, edi
jne 0x4062d3
or eax, 0xffffffff
jmp 0x4062d5
sub eax, dword [ebx]
mov ecx, dword [ebx]
mov edx, dword [ecx - 0xc]
inc eax
sub edx, eax
push edx
push eax
lea eax, [esp + 0x20]
push eax
mov ecx, ebx
call fcn.00404d80
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00404e80
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406317
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], 1
cmp dword [eax - 0xc], edi
je 0x40634f
mov eax, dword [esi + 0x50]
cmp eax, edi
je 0x40634f
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40634f
mov edx, dword [esi + 0x50]
lea ecx, [esp + 0x1c]
push ecx
push edi
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, esi
call fcn.004040c0
test eax, eax
jne 0x4063b4
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406378
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406bd1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esi + 0x44], edi
je 0x406407
mov ecx, esi
call fcn.00403a50
lea ecx, [esp + 0x1c]
call fcn.00404760
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c46
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x10], edi
mov ecx, 0x4400010
mov dword [esp + 0x54], ecx
jne 0x40641e
mov ecx, 0x4600010
mov dword [esp + 0x54], ecx
mov eax, dword [ebx]
push edi
push ecx
push 0x42a10c
push edi
push str.HTTP_1.0
push eax
mov eax, dword [esi + 8]
push 0x424624
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, edi
mov dword [esi + 0xc], eax
je 0x4067b9
xor eax, eax
mov byte [esp + 0x2d0], 0
mov ecx, 0x43
lea edi, [esp + 0x2d1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x34]
xor ebx, ebx
cmp edi, ebx
je 0x4064a8
push str.Host:
lea ecx, [esp + 0x2d4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
lea edx, [esp + 0x2d4]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, dword [esi + 0xc]
push 0x20000000
push 0xffffffffffffffff
lea eax, [esp + 0x2d8]
push eax
push ecx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
lea edx, [esp + 0x44]
xor eax, eax
mov byte [esp + 0x1b0], 0
mov ecx, 0x10
lea edi, [esp + 0x1b1]
push edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x5c], ebx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [esp + 0x10]
cmp dword [edx - 0xc], ebx
je 0x40653e
xor eax, eax
mov dword [esp + 0x70], ebx
mov ecx, 0x4f
lea edi, [esp + 0x74]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x70]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x40653e
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x88]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov eax, dword [esp + 0x90]
push eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x1b4]
push str.Range:_bytes_d_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov dword [esp + 0x58], 1
cmp dword [esi + 0x44], ebx
je 0x40654f
mov ecx, esi
call fcn.00403a50
jmp 0x406c34
push ebx
push ebx
lea ecx, [esp + 0x1b8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [esi + 0xc]
lea edx, [esp + 0x1bc]
push edx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x4065ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.00403a50
mov esi, dword [esi + 0x54]
sub esi, 0x2ee2
je 0x4065d1
sub esi, 5
je 0x4065a3
sub esi, 0x16
jne 0x406bbf
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, reloc.WSOCK32.dll_htonl
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, SysStringLen
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esi + 0x44], ebx
jne 0x406543
mov eax, dword [esi + 0xc]
push ebx
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
push edx
push 0x20000013
push eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4067b9
mov eax, dword [esp + 0x2c]
xor ebx, ebx
cmp eax, 0x12e
mov dword [esp + 0x18], ebx
ja 0x406814
cmp eax, 0x12d
jae 0x406775
sub eax, 0xc8
je 0x406729
sub eax, 3
je 0x40666f
sub eax, 3
jne 0x40682f
xor eax, eax
push eax
mov byte [esp + 0x244], 0
mov ecx, 0x10
lea edi, [esp + 0x245]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x248]
push edx
push 0xb
push eax
mov dword [esp + 0x28], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4067b9
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x244]
push edx
mov ecx, esi
call fcn.00405d10
mov ax, word [esp + 0x50]
cmp ax, word [esp + 0x6c]
jne 0x406711
mov cx, word [esp + 0x4e]
cmp cx, word [esp + 0x6a]
jne 0x406711
mov dx, word [esp + 0x4c]
cmp dx, word [esp + 0x68]
jne 0x406711
mov ax, word [esp + 0x4a]
cmp ax, word [esp + 0x66]
jne 0x406711
mov cx, word [esp + 0x46]
cmp cx, word [esp + 0x62]
jne 0x406711
mov dx, word [esp + 0x44]
cmp dx, word [esp + 0x60]
je 0x406844
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [esp + 0x24], 0
jmp 0x40683b
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x406769
mov ecx, esi
call fcn.00403a50
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, SysStringLen
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x406844
push 0x401
call fcn.00413b12
mov ebx, eax
add esp, 4
xor eax, eax
mov ecx, 0x100
mov edi, ebx
rep stosd dword es:[edi], eax
push 0
lea ecx, [esp + 0x18]
push ecx
push ebx
stosb byte es:[edi], al
mov edx, dword [esi + 0xc]
push 0x21
push edx
mov dword [esp + 0x28], 0x400
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
push ebx
jne 0x4067ce
call fcn.00414148
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.00403a50
jmp 0x406bbf
lea ecx, [esi + 0x4c]
call fcn.00405300
mov ecx, esi
call fcn.00403a50
push ebx
call fcn.00414148
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
sub eax, 0x193
je 0x406ede
dec eax
je 0x406ea0
sub eax, 0x60
je 0x406e69
mov eax, dword [esp + 0x58]
test eax, eax
je 0x406e5b
mov ebx, 1
mov dword [esp + 0x18], ebx
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x406543
test ebx, ebx
je 0x406919
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [esp + 0x54]
mov eax, dword [esi + 0x28]
mov edx, dword [esi + 8]
push 0
push ecx
push 0x42a10c
push 0
push str.HTTP_1.0
push eax
push 0x424624
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
test eax, eax
mov dword [esi + 0xc], eax
je 0x4067b9
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x4068b0
push 0x1000000
push 0xffffffffffffffff
lea ecx, [esp + 0x2d8]
push ecx
push eax
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x406543
mov edx, dword [esi + 0xc]
push 0
push 0
push 0
push 0
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x4067b9
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x406543
mov edx, dword [esi + 0xc]
push 0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x34]
push ecx
push 0x20000013
push edx
mov dword [esp + 0x28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4067b9
cmp dword [esp + 0x2c], 0xc8
jne 0x4067b9
mov edx, dword [esi + 0xc]
xor eax, eax
mov byte [esp + 0x1f8], 0
mov ecx, 0x10
lea edi, [esp + 0x1f9]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
xor ebx, ebx
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x200]
push ecx
push 0xb
push edx
mov dword [esp + 0x28], 0x40
call edi
test eax, eax
je 0x40696f
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x1fc]
push ecx
mov ecx, esi
call fcn.00405d10
mov ecx, dword [esi + 0xc]
push ebx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x48]
push eax
push 0x20000005
push ecx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x28], 4
call edi
test eax, eax
jne 0x4069a1
mov dword [esp + 0x40], 0x32000
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x10]
add edx, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], 2
cmp dword [edi - 0xc], ebx
je 0x4069e7
mov eax, dword [esi + 0x50]
cmp eax, ebx
je 0x4069e7
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4069e7
mov edx, dword [esi + 0x50]
lea ecx, [esp + 0x1c]
push ecx
push ebx
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [esi + 0x44], ebx
jne 0x406543
push ebx
push 1
mov ecx, edi
call fcn.00403640
add esp, 8
test eax, eax
je 0x406a25
mov eax, dword [esp + 0x10]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x406a5a
mov ecx, esi
call fcn.00403a50
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, reloc.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [esp + 0x38]
push eax
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x406a98
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x406aa5
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x1001
call fcn.00413b12
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x1c], 3
jmp 0x406ad0
mov edi, dword [esp + 0x18]
xor eax, eax
mov ecx, 0x400
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x406beb
mov edi, dword [esp + 0x18]
mov edx, dword [esi + 0xc]
lea ecx, [esp + 0x30]
push ecx
push 0x1000
push edi
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x406c62
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
add edx, eax
mov eax, dword [esi + 0x50]
test eax, eax
mov dword [esp + 0x24], edx
je 0x406b40
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x406b40
mov edx, dword [esi + 0x50]
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x30]
test eax, eax
jbe 0x406b6c
push 0
lea ecx, [esp + 0x38]
push ecx
push eax
push edi
push ebx
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x30]
test eax, eax
ja 0x406ad0
mov ecx, dword [esp + 0x24]
cmp ecx, dword [esp + 0x20]
jae 0x406ce9
mov ecx, esi
call fcn.00403a50
push edi
call fcn.00414148
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea ecx, [esp + 0x38]
push ecx
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [esp + 0x18]
push edx
call fcn.00414148
add esp, 4
mov ecx, esi
call fcn.00403a50
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea edx, [esp + 0x38]
push edx
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [esi + 0x54], eax
mov eax, dword [esp + 0x18]
push eax
call fcn.00414148
add esp, 4
call edi
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.00403a50
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [esp + 0x38]
push eax
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, reloc.WSOCK32.dll_htons
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 0x50]
test eax, eax
je 0x406d11
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x406d11
mov eax, dword [esi + 0x50]
lea edx, [esp + 0x1c]
push edx
push 0
push 0xbd8
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
push eax
mov byte [esp + 0x28c], 0
mov ecx, 0x10
lea edi, [esp + 0x28d]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x290]
push edx
push 0x17
push eax
mov dword [esp + 0x28], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x406d61
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.00403a50
jmp 0x406d92
push str.close
lea ecx, [esp + 0x28c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x406d81
mov ecx, esi
call fcn.00403a50
jmp 0x406d92
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 0xc], 0
mov eax, dword [esp + 0x18]
push eax
call fcn.00414148
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [esp + 0x38]
push eax
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x5c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x406df6
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x10]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
lea ecx, [esp + 0x1c]
jne 0x406e34
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, reloc.WSOCK32.dll_connect
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x54], eax
jmp 0x406bbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x1c]
mov dword [esi + 0x54], eax
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, select
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.00403a50
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov eax, inet_ntoa
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.00403a50
lea ecx, [esp + 0x1c]
call fcn.00404760
lea ecx, [esp + 0x10]
call fcn.00404430
mov ecx, dword [esp + 0x3e4]
pop edi
pop esi
xor ecx, ebp
mov eax, reloc.WSOCK32.dll_recv
pop ebx
call fcn.0041413a
mov esp, ebp
pop ebp
ret 0x10