Function at 0x40c580
Capabilities:
Connect to http server
Delete file
Download and write a file
Move file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x578
lea eax, [ebp - 8]
mov dword [ebp - 0x48c], eax
lea eax, [ebp - 0x4ac]
mov dword [esp], eax
mov dword [ebp - 0x494], 0x41e9c0
mov dword [ebp - 0x490], 0x41f19e
mov dword [ebp - 0x488], 0x40d7b9
mov dword [ebp - 0x484], esp
call fcn.0041a840
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x68]
xor edx, edx
cmp eax, 0x1bb
setne dl
sub edx, 1
and edx, 0x803000
mov dword [ebp - 0x4b8], edx
mov edx, dword [ecx + 0x6c]
test edx, edx
jne 0x40c650
mov eax, ecx
add eax, 0x18
mov dword [esp + 4], str.Protocol_not_supported
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xffffffff
call fcn.00402d50
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40c991
mov eax, dword [ebp + 8]
mov dword [esp + 4], 2
add eax, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call dword [ebp + 0x10]
mov byte [ebp - 0x4c9], 1
lea eax, [ebp - 0x4ac]
mov dword [esp], eax
call fcn.0041a7e0
movzx eax, byte [ebp - 0x4c9]
leave
ret
mov dword [esp + 0x1c], 0
movzx eax, ax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], edx
mov edx, dword [ecx + 0x44]
mov dword [esp + 0x10], edx
mov edx, dword [ecx + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ecx + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ecx]
mov dword [ebp - 0x4a8], 0xffffffff
mov dword [esp], eax
call sub.WININET.DLL_InternetConnectA
sub esp, 0x20
test eax, eax
mov dword [ebp - 0x4c4], eax
je 0x40c970
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xffffffff
add edx, 0x58
mov dword [esp + 8], edx
mov edx, dword [ebp + 8]
add edx, 0x50
mov dword [esp + 4], edx
call fcn.004037d0
mov edx, dword [ebp + 8]
sub esp, 4
cmp dword [edx + 0x6c], 3
jne 0x40c9f0
mov dword [ebp - 0x24], 0x424da4
mov edx, str.HEAD
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x24]
mov ecx, dword [ebp - 0x4b8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x4c4]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [ebp - 0x4a8], 0xc
call sub.WININET.DLL_HttpOpenRequestA
sub esp, 0x20
mov dword [ebp - 0x4b4], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
jne 0x40c77a
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [ebp - 0x4b4]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4a8], 0xc
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040a880
mov eax, dword [ebp - 0x4b4]
test eax, eax
je 0x40c7b4
mov edx, dword [ebp - 0x4b4]
mov dword [esp], edx
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x4a8], 0xc
mov dword [esp], ecx
call fcn.0040a770
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x40c9a0
mov dword [esp + 4], 0x20
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.00402660
test eax, eax
je 0x40c830
add eax, 1
je 0x40cb70
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xc
call fcn.004025e0
cmp eax, 0x190
mov edx, 0x424da8
je 0x40c6f1
cmp eax, 0x195
je 0x40c6f1
lea esi, [esi]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
test eax, eax
jle 0x40c9a0
mov edx, dword [ebp + 8]
mov dword [esp + 4], 0x20
mov eax, dword [edx + 0xc]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x4a8], 0xc
mov dword [esp], eax
call fcn.00402660
test eax, eax
je 0x40c9a0
add eax, 1
je 0x40c9a0
mov dword [esp], eax
call fcn.004025e0
lea edx, [eax - 0xc8]
cmp edx, 0x63
ja 0x40c9a5
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
test edx, edx
jle 0x40ca10
mov dword [ebp - 0x4b0], 0
mov eax, dword [ebp - 0x4b0]
jmp 0x40c8c9
mov ecx, dword [ebp + 8]
add dword [ebp - 0x4b0], 1
mov eax, dword [ebp - 0x4b0]
cmp eax, dword [ecx + 4]
jge 0x40ca10
mov edx, dword [ebp + 8]
shl eax, 2
mov dword [ebp - 0x4c8], eax
mov ecx, dword [ebp - 0x4b0]
mov eax, dword [edx + 0xc]
mov eax, dword [eax + ecx*4]
mov dword [esp], str.Content_Length
mov dword [ebp - 0x4a8], 0xc
mov dword [ebp - 0x4bc], eax
call sub.KERNEL32.dll_lstrlenA
mov edx, dword [ebp - 0x4bc]
sub esp, 4
mov dword [esp + 8], eax
mov dword [esp + 4], str.Content_Length
mov eax, dword [edx + 4]
mov dword [esp], eax
call fcn.00402570
test eax, eax
jne 0x40c8b0
mov ecx, dword [ebp + 8]
mov dword [esp + 4], 0x424d28
mov edx, dword [ebp - 0x4c8]
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + edx]
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.004026e0
test eax, eax
je 0x40c8b0
add eax, 2
mov dword [esp + 4], eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [esp], eax
call fcn.00402d50
jmp 0x40ca3b
mov eax, dword [ebp + 8]
mov dword [esp + 4], str.InternetConnect____failed
add eax, 0x18
mov dword [esp], eax
call fcn.00402d50
mov edx, dword [ebp + 0x10]
test edx, edx
jne 0x40c617
mov byte [ebp - 0x4c9], 1
jmp 0x40c639
mov eax, 0x194
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], str.Request_returned_code__d
mov dword [ebp - 0x4a8], 0xc
add eax, 0x18
mov dword [esp], eax
call fcn.00402bf0
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x40c9f0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 2
add eax, 0x10
mov dword [esp + 8], eax
mov dword [esp], ecx
call dword [ebp + 0x10]
nop
lea esi, [esi]
mov byte [ebp - 0x4c9], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40c639
mov dword [esp], eax
call fcn.0041dc40
jmp 0x40c639
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [esp + 4], 0x424d2b
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xc
call fcn.00402d50
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x4a8], 0xb
mov dword [esp], eax
call fcn.004025e0
mov dword [ebp - 0x4d8], eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40ca65
mov dword [esp], eax
call fcn.0041dc40
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x4a8], 0xc
add edx, 0x18
mov dword [ebp - 0x4e4], edx
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00402d50
mov eax, dword [ebp - 0x4d8]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x20], eax
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x24], 0
test eax, eax
je 0x40cad0
mov edx, dword [ebp + 0x14]
mov eax, ecx
add eax, 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edx
mov dword [ebp - 0x4a8], 0xc
call dword [ebp + 0x10]
test al, al
je 0x40c9f0
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x34]
mov dword [esp + 8], str.Content_Type:
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xc
mov dword [esp + 4], edx
call fcn.0040a6a0
mov eax, dword [ebp - 0x30]
sub esp, 4
mov dword [esp + 4], str.html
mov dword [ebp - 0x4a8], 0xa
mov dword [esp], eax
call fcn.004026e0
test eax, eax
je 0x40cb7b
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
test eax, eax
mov dword [ecx + 0x24], 0
mov dword [ecx + 0x20], 0
je 0x40cb54
mov eax, ecx
add eax, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [ebp - 0x4a8], 0xa
mov dword [esp], eax
call dword [ebp + 0x10]
mov byte [ebp - 0x4c9], 0
lea eax, [ebp - 0x34]
mov dword [esp], eax
call fcn.0041c6b0
jmp 0x40c9f7
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
jmp 0x40c836
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], 0x424dc0
mov dword [esp], eax
call fcn.004026e0
test eax, eax
jne 0x40cb18
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], str.plain
mov dword [esp], eax
call fcn.004026e0
test eax, eax
jne 0x40cb18
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 0xa
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x10
mov dword [esp], eax
call fcn.00402d50
mov edx, dword [ebp + 0xc]
mov byte [ebp - 0x511], 0
mov dword [ebp - 0x4a8], 9
mov dword [esp], edx
call fcn.0040a930
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x52c], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x518], edx
mov dword [esp + 8], str.Last_Modified:
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040a6a0
mov eax, dword [ebp - 0x38]
sub esp, 4
mov byte [ebp - 0x511], 1
mov dword [esp], eax
call fcn.0040a9e0
cmp edx, dword [ebp - 0x518]
je 0x40d450
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call fcn.0041c6b0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 0xa
mov dword [esp], ecx
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
lea eax, [ebp - 0x44]
mov dword [esp + 4], 0x400
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xa
call fcn.0041c680
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x4a8], 8
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_lstrcpyA
mov eax, dword [ebp - 0x40]
sub esp, 8
mov dword [esp + 4], str..xdl_
mov dword [esp], eax
call sub.KERNEL32.dll_lstrcatA
mov eax, dword [ebp - 0x40]
sub esp, 8
mov dword [esp], eax
call fcn.0040a990
mov dword [ebp - 0x4e0], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call fcn.0040a930
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x544], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x534], edx
mov dword [esp + 8], str.Last_Modified:
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040a6a0
mov eax, dword [ebp - 0x48]
sub esp, 4
mov dword [ebp - 0x4a8], 7
mov dword [esp], eax
call fcn.0040a9e0
cmp edx, dword [ebp - 0x534]
je 0x40d5c7
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.0041c6b0
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x4a8], 8
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
mov dword [ebp - 0x4e0], 0
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x4b8]
mov dword [esp + 0x14], eax
mov ecx, dword [ebp - 0x4c4]
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x424da8
mov dword [esp], ecx
mov dword [ebp - 0x4a8], 8
call sub.WININET.DLL_HttpOpenRequestA
mov edx, dword [ebp - 0x4e0]
sub esp, 0x20
mov dword [ebp - 0x4fc], eax
test edx, edx
je 0x40d580
lea eax, [ebp - 0x46c]
mov dword [ebp - 0x4c0], eax
mov dword [ebp - 0x4d0], 0x7f
mov dword [ebp - 0x4d4], pe_nt_image_headers32
nop
mov edx, dword [ebp - 0x4c0]
mov dword [edx], 1
mov dword [edx + 4], 0
mov dword [esp + 4], 1
mov dword [esp], edx
mov dword [ebp - 0x4a8], 6
call fcn.004029c0
mov ecx, dword [ebp - 0x4d0]
add dword [ebp - 0x4c0], 8
mov dword [ebp - 0x4d4], ecx
sub ecx, 1
cmp ecx, 0xfffffffe
mov dword [ebp - 0x4d0], ecx
jne 0x40cdc0
mov edx, dword [ebp - 0x4e0]
lea eax, [ebp - 0x46c]
mov dword [esp + 4], str.Range:_bytes_d__r_n
mov dword [esp], eax
mov dword [ebp - 0x4a8], 5
mov dword [esp + 8], edx
call fcn.00402bf0
mov eax, dword [ebp - 0x468]
mov dword [esp], eax
call sub.KERNEL32.dll_lstrlenA
sub esp, 4
mov ecx, dword [ebp - 0x4fc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x468]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
je 0x40d695
lea eax, [ebp - 0x64]
lea edx, [ebp - 0x46c]
mov dword [ebp - 0x4e8], eax
mov dword [ebp - 0x554], edx
sub dword [ebp - 0x4e8], 8
mov ecx, dword [ebp - 0x4e8]
mov dword [esp], ecx
call fcn.0041c6b0
mov eax, dword [ebp - 0x554]
cmp dword [ebp - 0x4e8], eax
jne 0x40ce95
mov ecx, dword [ebp - 0x4fc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4a8], 8
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040a880
mov edx, dword [ebp + 8]
mov dword [esp], edx
call fcn.0040a770
mov ecx, dword [ebp + 8]
mov dword [esp], ecx
call fcn.0040a650
cmp eax, 0xc8
je 0x40ceff
cmp eax, 0xce
jne 0x40d541
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
mov dword [ebp - 0x4a8], 8
call sub.KERNEL32.dll_CreateFileA
mov dword [ebp - 0x500], eax
mov eax, dword [ebp - 0x4e0]
sub esp, 0x1c
test eax, eax
jne 0x40d70a
mov eax, dword [ebp - 0x4d8]
mov ecx, 0x51eb851f
imul ecx
mov eax, dword [ebp - 0x4d8]
sar edx, 5
sar eax, 0x1f
sub edx, eax
cmp edx, 0x1400000
mov dword [ebp - 0x4f4], edx
jle 0x40cf8e
mov dword [ebp - 0x4f4], 0x1400000
mov ecx, dword [ebp - 0x4f4]
lea eax, [ebp - 0x54]
mov dword [esp], eax
mov dword [ebp - 0x4a8], 8
mov dword [esp + 4], ecx
call fcn.0041c680
mov eax, dword [ebp - 0x4e0]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x4dc], eax
lea eax, [ebp - 9]
mov dword [esp], eax
mov dword [ebp - 0x4a8], 4
call fcn.00403f20
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4f4]
add ecx, 0x10
mov dword [ebp - 0x50c], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x504], edx
test ecx, ecx
jne 0x40d04e
jmp 0x40d2df
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40d73a
mov edx, dword [ebp - 0x50c]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 1
mov dword [ebp - 0x4a8], 2
mov dword [esp + 8], edx
mov dword [esp], ecx
call dword [ebp + 0x10]
cmp al, 1
jne 0x40d69f
lea eax, [ebp - 0x46c]
mov dword [esp], eax
call fcn.0041c6b0
mov eax, dword [ebp - 0x50]
lea edx, [ebp - 0x10]
mov ecx, dword [ebp - 0x504]
mov dword [esp + 0xc], edx
mov dword [ebp - 0x4a8], 3
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x4f0], 0
jne 0x40d0a4
mov dword [ebp - 0x4a8], 3
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x4f0], eax
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0x46c]
add dword [ebp - 0x4dc], edx
mov dword [esp + 4], 0
mov dword [esp], ecx
mov dword [ebp - 0x4a8], 3
call fcn.0041c680
mov eax, dword [ebp - 0x4d8]
mov edx, dword [ebp - 0x4dc]
mov ecx, dword [ebp - 0x4f4]
mov dword [esp + 4], str.code:__d__requested__d_bytes__read__d_bytes__total:__d_of__d
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x46c]
mov dword [esp + 0xc], ecx
mov dword [esp], edx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x4f0]
mov dword [ebp - 0x4a8], 2
mov dword [esp + 8], eax
call fcn.00402bf0
mov ecx, dword [ebp - 0x468]
lea eax, [ebp - 9]
mov dword [esp], eax
mov dword [ebp - 0x4f8], ecx
call fcn.00403c20
mov edx, dword [ebp - 0x4f8]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00403e40
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x500]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
jne 0x40d17c
call sub.KERNEL32.dll_GetLastError
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4e4]
mov dword [ebp - 0x4a8], 2
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.00402d50
mov edx, dword [ebp - 0x4d8]
mov ecx, dword [ebp - 0x4dc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4ec], edx
cmp edx, ecx
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], ecx
jne 0x40d008
mov eax, dword [ebp - 0x50c]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
lea eax, [ebp - 0x46c]
mov dword [esp], eax
call fcn.0041c6b0
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x64]
mov dword [esp + 8], str.Last_Modified:
mov dword [esp], eax
mov dword [ebp - 0x4a8], 3
mov dword [esp + 4], ecx
call fcn.0040a6a0
mov eax, dword [ebp - 0x60]
sub esp, 4
mov dword [ebp - 0x4a8], 1
mov dword [esp], eax
call fcn.0040a9e0
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x64]
mov dword [ebp - 0x58], edx
mov dword [esp], eax
call fcn.0041c6b0
mov edx, dword [ebp - 0x500]
lea eax, [ebp - 0x5c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edx
mov dword [ebp - 0x4a8], 3
call sub.KERNEL32.dll_SetFileTime
mov eax, dword [ebp - 0x500]
sub esp, 0x10
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [ebp - 0x4ec]
sub esp, 4
cmp dword [ebp - 0x4dc], edx
mov byte [ebp - 0x4c9], 1
je 0x40d6bf
lea eax, [ebp - 9]
mov dword [esp], eax
mov dword [ebp - 0x4a8], 4
call fcn.00403df0
lea eax, [ebp - 0x54]
mov dword [esp], eax
call fcn.0041c6b0
lea eax, [ebp - 0x44]
mov dword [esp], eax
call fcn.0041c6b0
jmp 0x40cb5b
mov edx, dword [ebp - 0x10]
test edx, edx
je 0x40d1d9
lea eax, [ebp - 0x46c]
mov dword [esp], eax
call fcn.0041c6b0
mov edx, dword [ebp - 0x504]
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0x4fc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], edx
mov dword [ebp - 0x4a8], 3
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x508], 0
jne 0x40d32f
mov dword [ebp - 0x4a8], 3
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x508], eax
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x46c]
add dword [ebp - 0x4dc], eax
mov dword [esp + 4], 0
mov dword [esp], edx
mov dword [ebp - 0x4a8], 3
call fcn.0041c680
mov eax, dword [ebp - 0x4dc]
mov ecx, dword [ebp - 0x4d8]
mov edx, dword [ebp - 0x4f4]
mov dword [esp + 4], str.code:__d__requested__d_bytes__read__d_bytes__total:__d_of__d
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x508]
mov dword [esp + 0xc], edx
mov dword [ebp - 0x4a8], 2
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x46c]
mov dword [esp + 8], ecx
mov dword [esp], eax
call fcn.00402bf0
mov edx, dword [ebp - 0x468]
lea ecx, [ebp - 9]
mov dword [esp], ecx
mov dword [ebp - 0x510], edx
call fcn.00403c20
mov edx, dword [ebp - 0x510]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00403e40
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x500]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
jne 0x40d407
call sub.KERNEL32.dll_GetLastError
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4e4]
mov dword [ebp - 0x4a8], 2
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.00402d50
mov edx, dword [ebp - 0x4d8]
mov ecx, dword [ebp - 0x4dc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4ec], edx
cmp edx, ecx
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], ecx
jne 0x40d2c0
jmp 0x40d1d9
cmp eax, dword [ebp - 0x52c]
jne 0x40cc2f
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 9
mov dword [esp], edx
call fcn.0040a990
cmp dword [ebp - 0x4d8], eax
jne 0x40cc2f
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call fcn.0041c6b0
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x4e4]
mov dword [ebp - 0x4a8], 0xa
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00402d50
mov ecx, dword [ebp - 0x4d8]
mov edx, dword [ebp + 8]
mov dword [edx + 0x20], ecx
mov dword [edx + 0x24], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40cb54
mov eax, dword [ebp + 0x14]
add edx, 0x10
mov dword [ebp - 0x530], edx
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xa
call dword [ebp + 0x10]
cmp al, 1
jne 0x40d563
mov eax, dword [ebp - 0x530]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [ebp - 0x4a8], 0xa
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
cmp al, 1
je 0x40cb54
mov ecx, dword [ebp - 0x530]
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], ecx
mov dword [esp], eax
call dword [ebp + 0x10]
mov byte [ebp - 0x4c9], 1
jmp 0x40cb5b
lea eax, [ebp - 0x44]
mov dword [esp], eax
call fcn.0041c6b0
lea eax, [ebp - 0x34]
mov dword [esp], eax
call fcn.0041c6b0
mov byte [ebp - 0x4c9], 1
jmp 0x40c9f7
mov edx, dword [ebp - 0x530]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], edx
mov dword [esp], ecx
call dword [ebp + 0x10]
jmp 0x40d535
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x4a8], 8
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
jne 0x40ceb8
call sub.KERNEL32.dll_GetLastError
jmp 0x40ceb8
cmp eax, dword [ebp - 0x544]
jne 0x40cd0a
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.0041c6b0
mov eax, dword [ebp - 0x4e0]
cmp dword [ebp - 0x4d8], eax
jne 0x40cd37
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 8
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_MoveFileA
push ecx
mov eax, dword [ebp - 0x4e4]
push ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00402d50
mov ecx, dword [ebp - 0x4d8]
mov edx, dword [ebp + 8]
cmp dword [ebp + 0x10], 0
mov dword [edx + 0x20], ecx
mov dword [edx + 0x24], ecx
je 0x40d78d
mov eax, dword [ebp + 0x14]
add edx, 0x10
mov dword [ebp - 0x53c], edx
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [ebp + 0x10]
cmp al, 1
je 0x40d764
mov edx, dword [ebp - 0x53c]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], edx
mov dword [esp], ecx
call dword [ebp + 0x10]
mov byte [ebp - 0x4c9], 1
jmp 0x40d2b0
call sub.KERNEL32.dll_GetLastError
jmp 0x40ce80
mov eax, dword [ebp - 0x50c]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
jmp 0x40d1d9
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 3
mov dword [esp], ecx
call sub.KERNEL32.dll_DeleteFileA
mov eax, dword [ebp + 0xc]
push ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sub.KERNEL32.dll_MoveFileA
push edx
push edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], edx
call sub.KERNEL32.dll_SetFileAttributesA
push eax
push eax
mov byte [ebp - 0x4c9], 0
jmp 0x40d290
mov eax, dword [ebp - 0x4e0]
mov edx, dword [ebp - 0x500]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.KERNEL32.dll_SetFilePointer
sub esp, 0x10
jmp 0x40cf5b
mov ecx, dword [ebp - 0x50c]
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 4
mov dword [ebp - 0x4a8], 2
mov dword [esp + 8], ecx
mov dword [esp], eax
call dword [ebp + 0x10]
jmp 0x40d1d9
mov eax, dword [ebp - 0x53c]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [ebp - 0x4a8], 8
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
cmp al, 1
jne 0x40d799
mov byte [ebp - 0x4c9], 0
jmp 0x40d2b0
mov ecx, dword [ebp - 0x53c]
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], ecx
mov dword [esp], eax
call dword [ebp + 0x10]
jmp 0x40d689