Function at 0x405120
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 [0x42482c]
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.004036c0
push edi
lea ecx, [esp + 0x14]
call fcn.004048b0
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x40517d
push 3
push 0x41f53c
lea ecx, [esp + 0x18]
call fcn.00403e90
push ebx
mov ecx, esi
call fcn.004047b0
test eax, eax
jne 0x4051c3
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 0x4051a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, SysReAllocString
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 0x48]
xor edi, edi
cmp eax, edi
je 0x4051d3
mov ecx, esi
call fcn.004034e0
cmp dword [esi + 0x44], edi
je 0x40521d
mov ecx, esi
call fcn.004034e0
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 0x405c16
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.004145af
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [0x4259c0]
mov ecx, 0x4259c0
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x28]
lea ebx, [esi + 0x28]
push 0x2f
push eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
call fcn.00414e94
add esp, 8
cmp eax, edi
jne 0x405253
or eax, 0xffffffff
jmp 0x405255
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 + 0x30]
push eax
mov ecx, ebx
call fcn.00404370
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x28]
call fcn.00404470
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405297
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], 1
cmp dword [eax - 0xc], edi
je 0x4052cf
mov eax, dword [esi + 0x50]
cmp eax, edi
je 0x4052cf
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4052cf
mov edx, dword [esi + 0x50]
lea ecx, [esp + 0x18]
push ecx
push edi
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, esi
call fcn.004037e0
test eax, eax
jne 0x405334
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4052f8
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 0x405ba1
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.004145af
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esi + 0x44], edi
je 0x405387
mov ecx, esi
call fcn.004034e0
lea ecx, [esp + 0x18]
call fcn.00403da0
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 0x405c16
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.004145af
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x10], edi
mov ecx, 0x4400010
mov dword [esp + 0x54], ecx
jne 0x40539e
mov ecx, 0x4600010
mov dword [esp + 0x54], ecx
mov eax, dword [ebx]
push edi
push ecx
push 0x42455c
push edi
push str.HTTP_1.0
push eax
mov eax, dword [esi + 8]
push 0x41f504
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, edi
mov dword [esi + 0xc], eax
je 0x405789
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]
test edi, edi
je 0x405426
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]
xor eax, eax
lea edx, [esp + 0x44]
mov byte [esp + 0x1b0], 0
mov ecx, 0x10
lea edi, [esp + 0x1b1]
push edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx - 0xc]
test eax, eax
je 0x4054df
xor eax, eax
mov dword [esp + 0x70], 0
mov ecx, 0x4f
lea edi, [esp + 0x74]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x70]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x4054df
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]
test eax, eax
mov dword [esp + 0x20], eax
jbe 0x4054cc
push 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
jmp 0x4054df
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esi + 0x44]
test eax, eax
je 0x4054f2
mov ecx, esi
call fcn.004034e0
jmp 0x405c04
push 0
push 0
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 0x4055a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.004034e0
mov esi, dword [esi + 0x54]
sub esi, 0x2ee2
je 0x405576
sub esi, 5
je 0x405548
sub esi, 0x16
jne 0x405b8f
lea ecx, [esp + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, reloc.OLEAUT32.dll_VariantClear
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [esp + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, SysStringLen
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x4054e6
mov eax, dword [esi + 0xc]
push 0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
push edx
push 0x20000013
push eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x405789
mov eax, dword [esp + 0x2c]
xor ebx, ebx
cmp eax, 0x12e
mov dword [esp + 0x28], ebx
ja 0x4057e4
cmp eax, 0x12d
jae 0x405745
sub eax, 0xc8
je 0x4056f9
sub eax, 3
je 0x40561b
sub eax, 3
jne 0x4057ff
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
jne 0x405681
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x10]
push ecx
mov dword [esi + 0x54], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, esi
mov dword [esp + 0x20], 0
call fcn.004034e0
jmp 0x405b8f
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x244]
push eax
mov ecx, esi
call fcn.00404c90
mov cx, word [esp + 0x50]
cmp cx, word [esp + 0x6c]
jne 0x4056e1
mov dx, word [esp + 0x4e]
cmp dx, word [esp + 0x6a]
jne 0x4056e1
mov ax, word [esp + 0x4c]
cmp ax, word [esp + 0x68]
jne 0x4056e1
mov cx, word [esp + 0x4a]
cmp cx, word [esp + 0x66]
jne 0x4056e1
mov dx, word [esp + 0x46]
cmp dx, word [esp + 0x62]
jne 0x4056e1
mov ax, word [esp + 0x44]
cmp ax, word [esp + 0x60]
je 0x405814
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [esp + 0x20], 0
jmp 0x40580b
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x405739
mov ecx, esi
call fcn.004034e0
lea ecx, [esp + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, reloc.OLEAUT32.dll_SysReAllocString
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x405814
push 0x401
call fcn.00414579
mov ebx, eax
add esp, 4
xor eax, eax
mov ecx, pe_nt_image_headers32
mov edi, ebx
rep stosd dword es:[edi], eax
push 0
lea edx, [esp + 0x18]
push edx
push ebx
stosb byte es:[edi], al
mov eax, dword [esi + 0xc]
push 0x21
push eax
mov dword [esp + 0x28], 0x400
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
push ebx
jne 0x40579e
call fcn.0041404d
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.004034e0
jmp 0x405b8f
lea ecx, [esi + 0x4c]
call fcn.00404770
mov ecx, esi
call fcn.004034e0
push ebx
call fcn.0041404d
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
sub eax, 0x193
je 0x405eae
dec eax
je 0x405e70
sub eax, 0x60
je 0x405e39
mov eax, dword [esp + 0x58]
test eax, eax
je 0x405e2b
mov ebx, 1
mov dword [esp + 0x28], ebx
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x4054e6
test ebx, ebx
je 0x4058e9
mov ecx, dword [esi + 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [esp + 0x54]
mov eax, dword [esi + 0x28]
push 0
push edx
push 0x42455c
push 0
push str.HTTP_1.0
push eax
mov eax, dword [esi + 8]
push 0x41f504
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
test eax, eax
mov dword [esi + 0xc], eax
je 0x405789
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x405880
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 0x4054e6
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 0x405789
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x4054e6
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 0x405789
cmp dword [esp + 0x2c], 0xc8
jne 0x405789
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 0x40593f
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x1fc]
push ecx
mov ecx, esi
call fcn.00404c90
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 0x405971
mov dword [esp + 0x40], 0x32000
mov dword [esp + 0x20], ebx
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
add eax, edx
mov dword [esp + 0x1c], eax
mov dword [esi + 0x5c], eax
mov dword [esp + 0x18], 2
cmp dword [edi - 0xc], ebx
je 0x4059ba
mov eax, dword [esi + 0x50]
cmp eax, ebx
je 0x4059ba
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4059ba
mov edx, dword [esi + 0x50]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [esi + 0x44], ebx
jne 0x4054e6
push ebx
push 1
mov ecx, edi
call fcn.00403170
add esp, 8
test eax, eax
je 0x4059f8
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 0x405a2d
mov ecx, esi
call fcn.004034e0
lea ecx, [esp + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, SysStringLen
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
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 + 0x28]
test eax, eax
je 0x405a6b
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 0x405a78
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x1001
call fcn.00414579
add esp, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x18], 3
lea esp, [esp]
mov edi, dword [esp + 0x28]
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 0x405bbb
mov edi, dword [esp + 0x28]
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 0x405c32
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x20]
add edx, eax
mov eax, dword [esi + 0x50]
test eax, eax
mov dword [esp + 0x20], edx
je 0x405b10
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405b10
mov edx, dword [esi + 0x50]
lea ecx, [esp + 0x18]
push ecx
push 0
push 0xbd8
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x30]
test eax, eax
jbe 0x405b3c
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 0x405aa0
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x1c]
jae 0x405cb9
mov ecx, esi
call fcn.004034e0
push edi
call fcn.0041404d
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 + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [esp + 0x28]
push edx
call fcn.0041404d
add esp, 4
mov ecx, esi
call fcn.004034e0
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 + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
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 + 0x28]
push eax
call fcn.0041404d
add esp, 4
call edi
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.004034e0
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 + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, reloc.OLEAUT32.dll_VariantCopy
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 0x50]
test eax, eax
je 0x405ce1
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405ce1
mov eax, dword [esi + 0x50]
lea edx, [esp + 0x18]
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 0x405d31
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.004034e0
jmp 0x405d62
push str.close
lea ecx, [esp + 0x28c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405d51
mov ecx, esi
call fcn.004034e0
jmp 0x405d62
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 0xc], 0
mov eax, dword [esp + 0x28]
push eax
call fcn.0041404d
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 0x405dc6
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 + 0x18]
jne 0x405e04
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, reloc.OLEAUT32.dll_SysReAllocStringLen
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x54], eax
jmp 0x405b8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x18]
mov dword [esi + 0x54], eax
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, SafeArrayGetLBound
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.004034e0
lea ecx, [esp + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov eax, VariantCopy
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [esi + 0x54], eax
call fcn.004034e0
lea ecx, [esp + 0x18]
call fcn.00403da0
lea ecx, [esp + 0x10]
call fcn.00403ae0
mov ecx, dword [esp + 0x3e4]
pop edi
pop esi
xor ecx, ebp
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
pop ebx
call fcn.004145af
mov esp, ebp
pop ebp
ret 0x10