Function at 0x401700
Capabilities:
Check if file exists
Download url
Get common file path
Get file attributes
Move file
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4163e5
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x41f008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x231], cl
mov dword [ebp - 4], 1
mov edi, 8
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
test cl, cl
je 0x401765
cmp dword [ebp + 0x28], 0x10
lea eax, [ebp + 0x14]
cmovae eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4018dd
mov esi, dword [ebp + 8]
cmp esi, dword [ebp + 0xc]
je 0x4018ce
push esi
lea ecx, [ebp - 0x230]
call fcn.004034f0
cmp dword [ebp - 0x21c], 0x10
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntryA]
mov eax, 0x5f5e100
nop dword [eax]
nop
sub eax, 1
jne 0x4017a0
cmp dword [ebp + 0x28], 0x10
lea ecx, [ebp + 0x14]
push 0
cmovae ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x230]
cmp dword [ebp - 0x21c], 0x10
push 0
cmovae eax, dword [ebp - 0x230]
push ecx
push eax
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileA]
test eax, eax
je 0x4018e8
push 0x1770
call ebx
test edi, edi
jle 0x4018e4
dec edi
mov eax, 0x3b9aca00
nop
sub eax, 1
jne 0x4017f0
push 0x104
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004054c0
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.004054c0
add esp, 0x18
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
push edx
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push str._s_temp_d.bak
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea ecx, [ebp - 0x114]
cmp dword [ebp + 0x28], 0x10
lea eax, [ebp + 0x14]
cmovae eax, dword [ebp + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov eax, 0x3b9aca00
nop
sub eax, 1
jne 0x401872
push 4
push eax
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov edx, dword [ebp - 0x21c]
cmp edx, 0x10
jb 0x4018c2
mov ecx, dword [ebp - 0x230]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4018b8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019f0
push edx
push ecx
call fcn.00404449
add esp, 8
add esi, 0x18
cmp esi, dword [ebp + 0xc]
jne 0x401771
test edi, edi
jle 0x401935
mov cl, byte [ebp - 0x231]
jmp 0x401746
mov esi, 1
jmp 0x401937
xor esi, esi
jmp 0x4018f9
mov eax, 0x5f5e100
nop dword [eax]
nop
sub eax, 1
jne 0x4018f0
lea esi, [eax + 1]
mov edx, dword [ebp - 0x21c]
cmp edx, 0x10
jb 0x401937
mov ecx, dword [ebp - 0x230]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401929
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019f0
push edx
push ecx
call fcn.00404449
add esp, 8
jmp 0x401937
xor esi, esi
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x4019a2
mov edx, dword [ebp + 0xc]
push ecx
call fcn.00403ba0
mov ecx, dword [ebp + 0x10]
mov eax, 0x2aaaaaab
mov edi, dword [ebp + 8]
add esp, 4
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, edi
shl ecx, 3
cmp ecx, 0x1000
jb 0x401983
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019f5
push ecx
push edi
call fcn.00404449
add esp, 8
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
mov dword [ebp + 0x10], 0
mov edx, dword [ebp + 0x28]
cmp edx, 0x10
jb 0x4019d2
mov ecx, dword [ebp + 0x14]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4019c8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019f5
push edx
push ecx
call fcn.00404449
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00403fbc
mov esp, ebp
pop ebp
ret
call fcn.004078e6
call fcn.004078e6
int3