Function at 0x507860
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x14]
mov dword [esp + 8], ecx
push ebx
push ebp
mov ecx, dword [eax - 8]
push esi
test ecx, ecx
push edi
je 0x507ab2
mov eax, dword [0x547570]
mov ecx, 0x104
mov dword [esp + 0x10], eax
mov edx, dword [eax - 0xc]
lea ebp, [eax - 0xc]
cmp edx, 1
jg 0x507898
cmp dword [eax - 4], ecx
jge 0x5078d9
mov ebx, dword [eax - 8]
cmp ebx, ecx
jle 0x5078a1
mov ecx, ebx
push ecx
lea ecx, [esp + 0x14]
call fcn.00405530
test eax, eax
je 0x5078d9
mov edi, dword [esp + 0x10]
lea ecx, [ebx + ebx + 2]
mov edx, ecx
lea esi, [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
mov dword [eax - 8], ebx
call fcn.00405590
mov eax, dword [esp + 0x10]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [esp + 0x10]
call fcn.004055c0
mov ecx, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ecx
call edi
mov edx, dword [esp + 0x10]
mov dword [edx - 8], eax
mov ecx, dword [esp + 0x10]
mov word [ecx + eax*2], 0
mov edx, dword [0x547570]
mov eax, str.S_OK_tmp_
mov dword [esp + 0x14], edx
test eax, eax
je 0x507959
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x507959
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x507959
mov ecx, dword [esp + 0x14]
inc esi
push esi
push str.S_OK_tmp_
push ecx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
mov edx, dword [eax - 8]
push edx
call fcn.00405a90
mov eax, dword [esp + 0x14]
mov edx, dword [0x547574]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x50799c
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x50799c
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
mov eax, dword [esp + 0x10]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [0x55df98]
mov esi, dword [0x547570]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x18]
call fcn.00405a90
mov edx, str..zip
test edx, edx
jne 0x5079cf
xor eax, eax
jmp 0x5079d6
push str..zip
call edi
push str..zip
push eax
lea ecx, [esp + 0x18]
call fcn.00405a90
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0
push ecx
lea edx, [esp + 0x1c]
mov ecx, esp
push edx
call fcn.00405440
call fcn.00507fe0
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp ecx, eax
je 0x507a67
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x507a31
mov edx, dword [0x547574]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x507a38
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x507a48
push eax
mov eax, dword [eax - 8]
push eax
lea ecx, [esp + 0x2c]
call fcn.00405870
jmp 0x507a63
lea ecx, [esp + 0x24]
call fcn.004124c0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x10]
mov edx, dword [0x547574]
lea ecx, [esi - 0xc]
cmp ecx, edx
je 0x507a8b
add esi, 0xfffffff4
push esi
call ebx
test eax, eax
jg 0x507a87
push esi
call fcn.00532222
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [0x547574]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x507ab2
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x507ab2
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.00532222
add esp, 4
push ecx
lea edx, [esp + 0x2c]
mov ecx, esp
push edx
call fcn.00405440
push ecx
lea eax, [esp + 0x2c]
mov ecx, esp
push eax
call fcn.00405440
mov ecx, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x24]
call fcn.00507b00
lea ecx, [esp + 0x24]
mov bl, al
call fcn.00405700
lea ecx, [esp + 0x28]
call fcn.00405700
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0xc
ret 0xc