Function at 0x402310
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4afc68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x200c
call fcn.004a7630
mov eax, dword [0x4c8080]
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
xor ebx, ebx
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x201a]
mov word [ebp - 0x201c], bx
mov dword [ebp - 4], ebx
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x201c]
push ecx
push 0x800
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [ebp - 0x101c]
lea eax, [ebp - 0x201c]
push edx
push ebx
push 0x4c8134
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea ecx, [ebp - 0x101c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x800
lea edx, [ebp - 0x101c]
push str.360net.dll
push edx
call dword [sym.imp.MSVCRT.dll_wcsncat]
lea eax, [ebp - 0x101c]
add esp, 0xc
test eax, eax
jne 0x4023c2
xor esi, esi
jmp 0x4023d1
lea ecx, [ebp - 0x101c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push esi
lea ecx, [ebp - 0x14]
call fcn.00405d70
test eax, eax
je 0x402407
mov ecx, dword [ebp - 0x14]
lea edi, [esi + esi]
lea edx, [ebp - 0x101c]
push edi
lea eax, [esi + esi + 2]
push edx
push eax
push ecx
call fcn.00404530
mov edx, dword [ebp - 0x14]
add esp, 0x10
mov dword [edx - 8], esi
mov eax, dword [ebp - 0x14]
mov word [edi + eax], bx
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 1
mov ecx, dword [eax - 0xc]
mov ebx, dword [eax - 8]
lea edi, [eax - 0xc]
cmp ecx, 1
mov esi, ebx
mov dword [ebp - 0x1c], edi
jg 0x402426
cmp esi, dword [eax - 4]
jle 0x40246b
cmp esi, ebx
jge 0x40242c
mov esi, ebx
push esi
lea ecx, [ebp - 0x14]
call fcn.00405a70
test eax, eax
je 0x40246b
lea ecx, [ebx + ebx + 2]
lea edx, [esi + esi + 2]
cmp edx, ecx
jb 0x40245c
mov eax, ecx
lea esi, [edi + 0xc]
mov edi, dword [ebp - 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
push edi
mov dword [ecx - 8], ebx
call fcn.00405e50
mov eax, dword [ebp - 0x14]
push eax
push str.HttpDownLib
push 0xe4
call fcn.004062b0
add esp, 0xc
test eax, eax
jne 0x4024b4
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x4c8084]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4025b0
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4025b0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff4
push eax
jmp 0x4025a8
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edi + 4]
lea esi, [edi + 4]
cmp eax, ecx
je 0x402503
mov edx, dword [eax - 0xc]
test edx, edx
jge 0x4024d8
mov edx, dword [0x4c8084]
add eax, 0xfffffff4
cmp eax, edx
jne 0x4024df
mov eax, dword [ecx - 0xc]
test eax, eax
jge 0x4024ed
push ecx
mov ecx, dword [ecx - 8]
push ecx
mov ecx, esi
call fcn.00405ad0
jmp 0x402503
mov ecx, esi
call fcn.00405e10
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov esi, dword [esi]
mov ecx, dword [edi + 0x18]
push esi
call fcn.00415a90
test al, al
mov eax, dword [ebp - 0x14]
jne 0x40253d
mov ecx, dword [0x4c8084]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4025b0
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4025b0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff4
push eax
jmp 0x4025a8
mov edx, dword [0x4c8084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x402567
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402567
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff4
push edx
call fcn.0043b3d0
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0043b3d0
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret