Function at 0x40d040
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
push 0xffffffffffffffff
push 0x4208f1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3e0
mov eax, dword [0x427550]
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, ebp
push esi
mov dword [esp + 0x3e0], eax
mov eax, dword [ebp + 0x14]
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
lea ecx, [esi + 0x48]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x34], eax
call fcn.004063b0
push ebx
lea ecx, [esp + 0x14]
call fcn.00409cf0
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 0xc]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x3f4], ebx
je 0x40d0bb
push 3
push 0x421e30
lea ecx, [esp + 0x18]
call fcn.00406e60
push edi
mov ecx, esi
call fcn.0040c120
test eax, eax
jne 0x40d0fa
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x3f4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d0f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, SysReAllocStringLen
jmp 0x40de21
cmp dword [esi + 0x44], ebx
je 0x40d106
mov ecx, esi
call fcn.0040b720
cmp dword [esi + 0x40], ebx
je 0x40d149
mov ecx, esi
call fcn.0040b720
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x3f4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dbb6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 2
jmp 0x40de21
mov eax, dword [0x4283f4]
mov ecx, 0x4283f4
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x24]
lea edi, [esi + 0x24]
push 0x2f
push eax
mov byte [esp + 0x3fc], 1
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call fcn.004136d1
add esp, 8
cmp eax, ebx
jne 0x40d187
or eax, 0xffffffff
jmp 0x40d189
sub eax, dword [edi]
inc eax
push eax
lea ecx, [esp + 0x34]
push ecx
mov ecx, edi
call fcn.0040c0f0
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x3f8], 2
call fcn.00407090
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d1cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], 1
mov eax, dword [eax - 0xc]
cmp eax, ebx
je 0x40d209
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x40d209
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40d209
mov edx, dword [esi + 0x4c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
push 1
mov ecx, esi
call fcn.0040c250
test eax, eax
jne 0x40d270
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d23b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x3f4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d838
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
or eax, 0xffffffff
jmp 0x40de21
cmp dword [esi + 0x40], ebx
je 0x40d2d8
mov ecx, esi
call fcn.0040b720
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d2a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x3f4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dbb6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 2
jmp 0x40de21
cmp dword [ebp + 0x10], ebx
mov eax, 0x4400010
mov dword [esp + 0x30], eax
jne 0x40d2ef
mov eax, 0x4600010
mov dword [esp + 0x30], eax
mov edi, dword [edi]
push ebx
push eax
mov eax, dword [esi + 8]
push 0x4270c4
push ebx
push str.HTTP_1.0
push edi
push 0x421df4
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, ebx
mov dword [esi + 0xc], eax
je 0x40d7fa
xor eax, eax
mov byte [esp + 0x2d0], bl
mov ecx, 0x43
lea edi, [esp + 0x2d1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [esp + 0x34], ebx
je 0x40d389
push str.Host:
lea eax, [esp + 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [esp + 0x34]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push ecx
lea edx, [esp + 0x2d4]
push edx
call edi
push 0x421e24
lea eax, [esp + 0x2d4]
push eax
call edi
mov edx, dword [esi + 0xc]
push 0x1000000
push 0xffffffffffffffff
lea ecx, [esp + 0x2d8]
push ecx
push edx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov edx, dword [esp + 0x10]
xor eax, eax
mov byte [esp + 0x1b0], bl
mov ecx, 0x10
lea edi, [esp + 0x1b1]
rep stosd dword es:[edi], eax
cmp dword [edx - 0xc], ebx
mov dword [esp + 0x2c], ebx
je 0x40d413
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 0x40d413
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 + 0x24], 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 + 0x2c], 1
cmp dword [esi + 0x40], ebx
jne 0x40d954
push ebx
push ebx
lea eax, [esp + 0x1b8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esi + 0xc]
push eax
lea ecx, [esp + 0x1bc]
push ecx
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x40d4f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x50], eax
call fcn.0040b720
cmp dword [esp + 0x2c], ebx
je 0x40d468
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [esi + 0x50]
sub esi, 0x2ee2
je 0x40d4b9
sub esi, 5
je 0x40d481
sub esi, 0x16
jne 0x40d80a
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d4a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, reloc.OLEAUT32.dll_VariantClear
jmp 0x40de21
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d4de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, VariantCopy
jmp 0x40de21
cmp dword [esi + 0x40], ebx
jne 0x40d954
mov edx, dword [esi + 0xc]
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x44]
push ecx
push 0x20000013
push edx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40d7fa
mov eax, dword [esp + 0x3c]
cmp eax, 0x12e
mov dword [esp + 0x28], ebx
ja 0x40d70d
cmp eax, 0x12d
jae 0x40d668
sub eax, 0xc8
je 0x40d614
sub eax, 3
je 0x40d55f
sub eax, 3
jne 0x40d728
mov edx, dword [esi + 0xc]
xor eax, eax
push ebx
mov byte [esp + 0x244], bl
mov ecx, 0x10
lea edi, [esp + 0x245]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x248]
push ecx
push 0xb
push edx
mov dword [esp + 0x28], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40d7fa
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x244]
push ecx
mov ecx, esi
call fcn.0040cca0
mov dx, word [esp + 0x58]
cmp dx, word [esp + 0x6c]
jne 0x40d600
mov ax, word [esp + 0x56]
cmp ax, word [esp + 0x6a]
jne 0x40d600
mov cx, word [esp + 0x54]
cmp cx, word [esp + 0x68]
jne 0x40d600
mov dx, word [esp + 0x52]
cmp dx, word [esp + 0x66]
jne 0x40d600
mov ax, word [esp + 0x4e]
cmp ax, word [esp + 0x62]
jne 0x40d600
mov cx, word [esp + 0x4c]
cmp cx, word [esp + 0x60]
je 0x40d73a
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [esp + 0x20], ebx
jmp 0x40d732
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], ebx
jne 0x40d65c
mov ecx, esi
call fcn.0040b720
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d649
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, reloc.OLEAUT32.dll_SysReAllocString
jmp 0x40de21
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40d73a
push 0x401
call fcn.004122a7
mov edx, eax
xor eax, eax
mov edi, edx
mov ecx, 0x100
rep stosd dword es:[edi], eax
add esp, 4
stosb byte es:[edi], al
mov ecx, dword [esi + 0xc]
push ebx
lea eax, [esp + 0x18]
push eax
push edx
push 0x21
push ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x28], 0x400
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40d6b8
mov edx, dword [esp + 0x34]
push edx
call fcn.00412c1d
add esp, 4
jmp 0x40d7fa
mov edi, dword [esp + 0x34]
push edi
lea ecx, [esi + 0x48]
call fcn.00408ca0
mov ecx, esi
call fcn.0040b720
push edi
call fcn.00412c1d
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d6fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, 1
jmp 0x40de21
sub eax, 0x193
je 0x40ddde
dec eax
je 0x40dd99
sub eax, 0x60
je 0x40dd58
cmp dword [esp + 0x2c], ebx
je 0x40dd4a
mov dword [esp + 0x28], 1
cmp dword [esi + 0x40], ebx
jne 0x40d954
cmp dword [esp + 0x28], ebx
je 0x40d840
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [esp + 0x30]
mov eax, dword [esi + 0x24]
mov edx, dword [esi + 8]
push ebx
push ecx
push 0x4270c4
push ebx
push str.HTTP_1.0
push eax
push 0x421df4
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, ebx
mov dword [esi + 0xc], eax
je 0x40d7fa
cmp dword [esp + 0x34], ebx
je 0x40d79e
push 0x1000000
push 0xffffffffffffffff
lea ecx, [esp + 0x2d8]
push ecx
push eax
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
cmp dword [esi + 0x40], ebx
je 0x40d7af
mov ecx, esi
call fcn.0040b720
jmp 0x40db88
mov eax, dword [esi + 0xc]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40d7fa
cmp dword [esi + 0x40], ebx
jne 0x40d954
mov edx, dword [esi + 0xc]
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x44]
push ecx
push 0x20000013
push edx
mov dword [esp + 0x28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40d7fa
cmp dword [esp + 0x3c], 0xc8
je 0x40d840
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x50], eax
call fcn.0040b720
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d82f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
or eax, 0xffffffff
jmp 0x40de21
mov edx, dword [esi + 0xc]
xor eax, eax
push ebx
mov byte [esp + 0x1fc], bl
mov ecx, 0x10
lea edi, [esp + 0x1fd]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x200]
push ecx
push 0xb
push edx
mov dword [esp + 0x28], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40d8c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x50], eax
call fcn.0040b720
mov eax, dword [esp + 0x24]
mov esi, dword [esi + 0x50]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d8b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, esi
jmp 0x40de21
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x1fc]
push ecx
mov ecx, esi
call fcn.0040cca0
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 dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40d90b
mov dword [esp + 0x40], 0x32000
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], 2
cmp dword [eax - 0xc], ebx
je 0x40d94f
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x40d94f
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40d94f
mov edx, dword [esi + 0x4c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [esi + 0x40], ebx
je 0x40d97b
mov ecx, esi
call fcn.0040b720
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40dba3
mov ecx, dword [esp + 0x10]
push ebx
push 1
call fcn.0040b770
add esp, 8
test eax, eax
je 0x40d9b2
mov eax, dword [esp + 0x10]
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x2c], eax
jne 0x40d9f1
mov ecx, esi
call fcn.0040b720
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d9de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, SysReAllocStringLen
jmp 0x40de21
cmp dword [esp + 0x28], ebx
je 0x40d9fa
push ebx
jmp 0x40d9fc
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x1001
call fcn.004122a7
add esp, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x18], 3
mov edi, dword [esp + 0x28]
xor eax, eax
mov ecx, 0x400
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
cmp dword [esi + 0x40], ebx
jne 0x40db3d
mov edi, dword [esp + 0x28]
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x38]
push eax
push 0x1000
push edi
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40dbc0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
add eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x40da8f
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40da8f
mov ecx, dword [esi + 0x4c]
lea eax, [esp + 0x18]
push eax
push ebx
push 0xbd8
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x38]
cmp eax, ebx
jbe 0x40dab8
push ebx
lea edx, [esp + 0x34]
push edx
push eax
mov eax, dword [esp + 0x38]
push edi
push eax
mov dword [esp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x38], ebx
ja 0x40da22
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x40dae7
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40dae7
mov edx, dword [esi + 0x4c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [esi + 0xc]
xor eax, eax
push ebx
mov byte [esp + 0x28c], bl
mov ecx, 0x10
lea edi, [esp + 0x28d]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x290]
push ecx
push 0x17
push edx
mov dword [esp + 0x28], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40dc48
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x50], eax
call fcn.0040b720
jmp 0x40dc75
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00412c1d
add esp, 4
mov ecx, esi
call fcn.0040b720
mov esi, dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea ecx, [esp + 0x44]
push ecx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40dbad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, 2
jmp 0x40de21
push edi
call fcn.00412c1d
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x50], eax
call fcn.0040b720
mov esi, dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea edx, [esp + 0x44]
push edx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dc35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, reloc.OLEAUT32.dll_VariantCopy
jmp 0x40de21
push str.close
lea eax, [esp + 0x28c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40dc68
mov ecx, esi
call fcn.0040b720
jmp 0x40dc75
mov ecx, dword [esi + 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 0xc], ebx
mov edx, dword [esp + 0x28]
push edx
call fcn.00412c1d
mov esi, dword [esp + 0x30]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea edx, [esp + 0x44]
push edx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
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 0x40dcdb
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0x10]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
or edx, 0xffffffff
test eax, eax
mov eax, dword [esp + 0x24]
mov byte [esp + 0x3f4], bl
jne 0x40dd23
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dd10
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, reloc.OLEAUT32.dll_SysReAllocStringLen
jmp 0x40de21
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dd3a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
xor eax, eax
jmp 0x40de21
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x50], eax
jmp 0x40d80a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x50], eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dd86
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, SafeArrayGetLBound
jmp 0x40de21
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x50], eax
call fcn.0040b720
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ddce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, VariantCopy
jmp 0x40de21
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x50], eax
call fcn.0040b720
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3f4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40de13
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
call fcn.00406390
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
mov ecx, dword [esp + 0x3ec]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x3e4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413041
mov esp, ebp
pop ebp
ret 0x10