Function at 0x402fb0
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
Set file attributes
Timestomp file
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x417031
mov eax, dword fs:[0]
push eax
sub esp, 0x6f4
mov eax, dword [0x41c040]
xor eax, esp
mov dword [esp + 0x6f0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41c040]
xor eax, esp
push eax
lea eax, [esp + 0x708]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x718]
mov ebx, edx
lea esi, [ebp + 0x48]
mov edi, ecx
mov dword [esp + 0x60], ebx
call fcn.00404850
lea eax, [esp + 0x18]
push eax
mov ecx, ebx
call fcn.00404570
xor ebx, ebx
mov dword [esp + 0x710], ebx
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 0xc]
cmp eax, ebx
je 0x40302e
push 3
lea edx, [esp + 0x1c]
push edx
call fcn.00404b40
push ebp
mov ecx, edi
call fcn.00403e80
test eax, eax
jne 0x40306f
mov dword [esp + 0x710], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403065
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x80000001
jmp 0x403e28
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp + 0x44], ebx
je 0x4030a1
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x403087
push eax
call esi
mov dword [ebp + 0xc], ebx
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x403094
push eax
call esi
mov dword [ebp + 8], ebx
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x4030a1
push eax
call esi
mov dword [ebp + 4], ebx
cmp dword [ebp + 0x40], ebx
je 0x403102
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4030b3
push eax
call esi
mov dword [ebp + 0xc], ebx
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4030c0
push eax
call esi
mov dword [ebp + 8], ebx
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x4030cd
push eax
call esi
mov dword [ebp + 4], ebx
mov dword [esp + 0x710], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4030f8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 2
jmp 0x403e28
mov edx, dword [0x41d6cc]
mov eax, dword [edx + 0xc]
mov ecx, 0x41d6cc
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
mov byte [esp + 0x710], 1
mov eax, dword [ebp + 0x24]
push 0x2f
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.00405762
add esp, 8
cmp eax, ebx
jne 0x403140
or eax, 0xffffffff
jmp 0x403145
sub eax, dword [ebp + 0x24]
sar eax, 1
lea ecx, [eax + 1]
lea esi, [esp + 0x34]
lea edx, [ebp + 0x24]
call fcn.00404780
lea edi, [esp + 0x2c]
mov byte [esp + 0x710], 2
call fcn.00404640
mov byte [esp + 0x710], 1
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40318d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], 1
mov eax, dword [ecx - 0xc]
cmp eax, ebx
je 0x4031c7
mov eax, dword [ebp + 0x4c]
cmp eax, ebx
je 0x4031c7
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4031c7
mov eax, dword [ebp + 0x4c]
lea edx, [esp + 0x20]
push edx
push ebx
push 0xbd8
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, ebp
call fcn.00402c10
test eax, eax
jne 0x40322c
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4031f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x710], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403224
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
jmp 0x403e28
cmp dword [ebp + 0x40], ebx
je 0x403298
mov esi, ebp
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40325f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x710], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4030f8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 2
jmp 0x403e28
mov ecx, 0x4400010
mov dword [esp + 0x34], ecx
cmp dword [esp + 0x71c], ebx
jne 0x4032b3
mov ecx, 0x4600010
mov dword [esp + 0x34], ecx
mov eax, dword [ebp + 0x24]
push ebx
push ecx
mov ecx, dword [ebp + 8]
push 0x41d670
push ebx
push str.HTTP_1.0
push eax
push 0x41a474
push ecx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp + 0xc], esi
cmp esi, ebx
jne 0x403324
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, ebp
mov dword [ebp + 0x50], eax
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403313
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
or eax, 0xffffffff
jmp 0x403e28
push 0x21e
lea edx, [esp + 0x4ea]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x4f0], cx
call fcn.00406ac0
add esp, 0xc
push 0x20000000
push 0xffffffffffffffff
push str.Accept_Encoding:_deflate_r_n
push esi
mov esi, dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
call esi
mov eax, dword [ebp + 0xc]
push 0x20000000
push 0xffffffffffffffff
push str.Accept_Language:_zh_cn
push eax
call esi
push 0x80
lea edx, [esp + 0x2ca]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x2d0], cx
call fcn.00406ac0
mov esi, dword [esp + 0x24]
xor edi, edi
add esp, 0xc
mov dword [esp + 0x4c], edi
cmp dword [esi - 0xc], ebx
je 0x403408
push 0x24c
lea eax, [esp + 0x7c]
push ebx
push eax
mov dword [esp + 0x80], ebx
call fcn.00406ac0
add esp, 0xc
lea ecx, [esp + 0x74]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x403408
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov eax, dword [esp + 0x94]
push eax
push str.Range:_bytes_d_
lea edx, [esp + 0x2cc]
mov dword [esp + 0x30], eax
call fcn.00404ef0
mov edi, 1
add esp, 8
mov dword [esp + 0x4c], edi
cmp dword [ebp + 0x40], ebx
je 0x40344e
mov esi, ebp
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40343b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, 2
jmp 0x403e28
push ebx
push ebx
lea ecx, [esp + 0x2cc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov eax, dword [ebp + 0xc]
lea edx, [esp + 0x2d0]
push edx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x403525
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, ebp
mov dword [ebp + 0x50], eax
call fcn.00404520
cmp edi, ebx
je 0x403498
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, dword [ebp + 0x50]
sub ebp, 0x2ee2
je 0x4034eb
sub ebp, 5
je 0x4034b1
sub ebp, 0x16
jne 0x4032ec
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4034d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, VariantCopy
jmp 0x403e28
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403512
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, VariantCopy
jmp 0x403e28
cmp dword [ebp + 0x40], ebx
jne 0x40340d
mov eax, dword [ebp + 0xc]
push ebx
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x44]
push edx
push 0x20000013
push eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x30], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4036ef
mov eax, dword [esp + 0x3c]
xor edi, edi
mov dword [esp + 0x30], edi
cmp eax, 0x12e
ja 0x403779
cmp eax, 0x12d
jae 0x4036a5
sub eax, 0xc8
je 0x40364f
sub eax, 3
je 0x403595
sub eax, 3
jne 0x403796
push 0x80
lea edx, [esp + 0x3da]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x3e0], cx
call fcn.00406ac0
mov edx, dword [ebp + 0xc]
add esp, 0xc
push ebx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x3dc]
push ecx
push 0xb
push edx
mov dword [esp + 0x30], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4036ef
lea esi, [esp + 0x50]
lea ecx, [esp + 0x3d4]
call fcn.00404120
mov cx, word [esp + 0x5c]
cmp cx, word [esp + 0x70]
jne 0x40363b
mov dx, word [esp + 0x5a]
cmp dx, word [esp + 0x6e]
jne 0x40363b
mov ax, word [esp + 0x58]
cmp ax, word [esp + 0x6c]
jne 0x40363b
mov cx, word [esp + 0x56]
cmp cx, word [esp + 0x6a]
jne 0x40363b
mov dx, word [esp + 0x52]
cmp dx, word [esp + 0x66]
jne 0x40363b
mov ax, word [esp + 0x50]
cmp ax, word [esp + 0x64]
je 0x4037a9
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [esp + 0x28], ebx
jmp 0x4037a0
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], ebx
jne 0x403699
mov esi, ebp
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403686
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, 0x80000002
jmp 0x403e28
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4037a9
push 0x802
call fcn.00405ec9
add esp, 4
push 0x401
mov esi, eax
push ebx
push esi
mov dword [esp + 0x3c], esi
call fcn.00406ac0
mov edx, dword [ebp + 0xc]
add esp, 0xc
push ebx
lea ecx, [esp + 0x20]
push ecx
push esi
push 0x21
push edx
mov dword [esp + 0x30], 0x400
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x40371f
push esi
call fcn.00405314
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, ebp
mov dword [ebp + 0x50], eax
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x403307
mov edx, dword [esp + 0x30]
lea edi, [ebp + 0x48]
call fcn.004046a0
mov esi, ebp
call fcn.00404520
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00405314
mov byte [esp + 0x714], bl
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403766
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, 1
jmp 0x403e28
sub eax, 0x193
je 0x403de3
sub eax, 1
je 0x403d9c
sub eax, 0x60
je 0x403d59
cmp dword [esp + 0x4c], ebx
je 0x403d4b
mov edi, 1
mov dword [esp + 0x30], edi
cmp dword [ebp + 0x40], ebx
jne 0x40340d
cmp edi, ebx
je 0x403850
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [esp + 0x34]
mov eax, dword [ebp + 0x24]
push ebx
push edx
push 0x41d670
push ebx
push str.HTTP_1.0
push eax
mov eax, dword [ebp + 8]
push 0x41a474
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp + 0xc], eax
cmp eax, ebx
je 0x4036ef
cmp dword [ebp + 0x40], ebx
jne 0x40340d
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x4036ef
cmp dword [ebp + 0x40], ebx
jne 0x40340d
mov eax, dword [ebp + 0xc]
push ebx
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x44]
push edx
push 0x20000013
push eax
mov dword [esp + 0x30], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4036ef
cmp dword [esp + 0x3c], 0xc8
jne 0x4036ef
push 0x80
lea edx, [esp + 0x462]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x468], cx
call fcn.00406ac0
mov edx, dword [ebp + 0xc]
add esp, 0xc
push ebx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x464]
push ecx
push 0xb
push edx
mov dword [esp + 0x30], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4038e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, ebp
mov dword [ebp + 0x50], eax
call fcn.00404520
mov ebp, dword [ebp + 0x50]
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4038d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, ebp
jmp 0x403e28
lea esi, [esp + 0x50]
lea ecx, [esp + 0x45c]
call fcn.00404120
mov eax, dword [ebp + 0xc]
push ebx
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x48]
push edx
push 0x20000005
push eax
mov dword [esp + 0x54], ebx
mov dword [esp + 0x30], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x403922
mov dword [esp + 0x40], 0x32000
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], 2
cmp dword [edx - 0xc], ebx
je 0x403966
mov eax, dword [ebp + 0x4c]
cmp eax, ebx
je 0x403966
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x403966
mov ecx, dword [ebp + 0x4c]
lea eax, [esp + 0x20]
push eax
push ebx
push 0xbd8
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [ebp + 0x40], ebx
je 0x403992
mov esi, ebp
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40342f
mov ecx, dword [esp + 0x18]
call fcn.00402e60
test eax, eax
jne 0x4039e0
mov esi, ebp
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4039cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, 0x80000003
jmp 0x403e28
mov ecx, dword [esp + 0x18]
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403a25
mov esi, ebp
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4039c1
cmp dword [esp + 0x30], ebx
je 0x403a2e
push ebx
jmp 0x403a30
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x1001
call fcn.00405ec9
mov esi, eax
add esp, 4
mov dword [esp + 0x30], esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x20], 3
push 0x1001
push ebx
push esi
call fcn.00406ac0
add esp, 0xc
cmp dword [ebp + 0x40], ebx
jne 0x403b73
mov edx, dword [ebp + 0xc]
lea ecx, [esp + 0x38]
push ecx
push 0x1000
push esi
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x403bbf
mov eax, dword [esp + 0x38]
add dword [esp + 0x28], eax
mov eax, dword [ebp + 0x4c]
cmp eax, ebx
je 0x403abc
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x403abc
mov edx, dword [ebp + 0x4c]
lea ecx, [esp + 0x20]
push ecx
push ebx
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x38]
cmp eax, ebx
jbe 0x403ae1
push ebx
lea ecx, [esp + 0x38]
push ecx
push eax
push esi
push edi
mov dword [esp + 0x48], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x38], ebx
ja 0x403a58
mov eax, dword [ebp + 0x4c]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x28], ecx
cmp eax, ebx
je 0x403b10
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x403b10
mov eax, dword [ebp + 0x4c]
lea edx, [esp + 0x20]
push edx
push ebx
push 0xbd8
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x80
lea edx, [esp + 0x352]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x358], cx
call fcn.00406ac0
mov edx, dword [ebp + 0xc]
add esp, 0xc
push ebx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x354]
push ecx
push 0x17
push edx
mov dword [esp + 0x30], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x403c49
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, ebp
mov dword [ebp + 0x50], eax
call fcn.00404520
mov esi, dword [esp + 0x30]
jmp 0x403c7a
mov edx, dword [esp + 0x30]
push edx
call fcn.00405314
add esp, 4
mov esi, ebp
call fcn.00404520
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea edx, [esp + 0x44]
push edx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403414
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00405314
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, ebp
mov dword [ebp + 0x50], eax
call fcn.00404520
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea ecx, [esp + 0x44]
push ecx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403c36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, reloc.OLEAUT32.dll_VariantCopy
jmp 0x403e28
push str.close
lea eax, [esp + 0x350]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x403c6d
mov esi, ebp
call fcn.00404520
mov esi, dword [esp + 0x30]
jmp 0x403c7a
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp + 0xc], ebx
push esi
call fcn.00405314
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea ecx, [esp + 0x44]
push ecx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x60]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403cd8
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [esp + 0x18]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
or edx, 0xffffffff
mov byte [esp + 0x710], bl
test eax, eax
mov eax, dword [esp + 0x2c]
jne 0x403d22
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, 0x80000004
jmp 0x403e28
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d3b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
xor eax, eax
jmp 0x403e28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x50], eax
jmp 0x4036ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x50], eax
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d89
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, 0x80000011
jmp 0x403e28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, ebp
mov dword [ebp + 0x50], eax
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403dd3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, VariantCopy
jmp 0x403e28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, ebp
mov dword [ebp + 0x50], eax
call fcn.00404520
mov byte [esp + 0x710], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403e1a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00404620
mov eax, 0x80000010
mov ecx, dword [esp + 0x708]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6f0]
xor ecx, esp
call fcn.0040531f
add esp, 0x700
ret 8