Function at 0x4048e0
Capabilities:
Create directory
Get common file path
Get session user name

Disassembly:
sub esp, 0x35c
mov dword [esp + 0x34c], ebx
mov ebx, eax
mov dword [esp + 0x350], esi
mov esi, edx
mov dword [esp + 0x354], edi
mov dword [esp + 0x358], ebp
cmp byte [eax + 0x260], 0
je 0x404970
test esi, esi
jne 0x404930
mov eax, dword [ebx + 0x258]
lea edi, [ebx + 0x260]
test eax, eax
je 0x404aa0
mov edx, edi
jmp 0x404946
mov eax, dword [ebx + 0x25c]
lea esi, [ebx + 0x365]
test eax, eax
je 0x404af0
mov edx, esi
mov eax, edx
mov ebx, dword [esp + 0x34c]
mov esi, dword [esp + 0x350]
mov edi, dword [esp + 0x354]
mov ebp, dword [esp + 0x358]
add esp, 0x35c
ret
mov eax, dword [eax]
mov ecx, str.tmpdir
mov edx, str.TMPDIR
mov eax, dword [eax]
call fcn.00403fa0
test eax, eax
mov ebp, eax
je 0x404de5
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp eax, 0x104
ja 0x404dc3
add eax, 1
lea edi, [ebx + 0x260]
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
mov dword [esp], edi
call sub.msvcrt.dll_strncpy
mov dword [esp], ebp
call sub.msvcrt.dll_free
mov dword [esp], edi
call sub.msvcrt.dll_strlen
test eax, eax
mov ebp, eax
je 0x4049e4
cmp byte [ebx + eax + 0x25f], 0x5c
je 0x4049e4
mov byte [ebx + eax + 0x260], 0x5c
add ebp, 1
cmp dword [0x417070], 2
lea edx, [esp + 0x33c]
je 0x404c00
mov dword [esp + 4], edx
lea edx, [esp + 0x22c]
mov dword [esp], edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x33c], 0x104
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
sub esp, 8
test eax, eax
mov edx, dword [esp + 0x10]
je 0x404bf3
mov edi, edx
mov ecx, dword [edi]
add edi, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x404a2c
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edi + 2]
cmove edi, ecx
add al, al
sbb edi, 3
sub edi, edx
mov eax, 0xfd
xor edx, edx
sub eax, edi
cmp ebp, eax
ja 0x404946
lea eax, [ebx + ebp + 0x260]
test edi, edi
mov word [eax], 0x6470
mov byte [eax + 2], 0x6b
lea eax, [ebp + 3]
jne 0x404d40
mov byte [ebx + eax + 0x260], 0x5c
mov byte [ebx + eax + 0x261], 0
jmp 0x40490f
mov dword [esp], edi
call sub.msvcrt.dll__mkdir
test eax, eax
je 0x404d11
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
cmp dword [eax], 0x11
je 0x404927
call ebx
mov eax, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.mkdir___s___failed__errno_d_n
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
xor edx, edx
jmp 0x404946
lea edx, [ebx + 0x260]
mov dword [esp], edx
lea ebp, [esp + 0x330]
mov dword [esp + 0x10], edx
call sub.msvcrt.dll_strlen
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0xc], 0x5c
mov dword [esp + 4], str._d_c
mov dword [esp], ebp
mov dword [esp + 8], eax
call sub.msvcrt.dll_sprintf
mov edx, dword [esp + 0x10]
mov dword [esp], esi
mov dword [esp + 4], edx
mov dword [esp + 0x14], eax
call sub.msvcrt.dll_strcpy
mov ecx, dword [esp + 0x14]
mov eax, 0x104
sub eax, edi
xor edx, edx
cmp ecx, eax
ja 0x404946
mov byte [ebx + edi + 0x364], 0x2d
add ecx, 1
lea eax, [ebx + edi + 0x365]
mov dword [esp + 8], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 4], ebp
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp], esi
call sub.msvcrt.dll__mkdir
test eax, eax
je 0x404b98
mov edi, dword [sym.imp.msvcrt.dll__errno]
call edi
cmp dword [eax], 0x11
jne 0x404d78
mov dword [esp], 0x417028
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x417040]
sub esp, 4
test edi, edi
jne 0x404bc1
jmp 0x404e25
mov edi, dword [edi]
test edi, edi
je 0x404e25
mov eax, dword [edi + 4]
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x404bb7
mov dword [esp], 0x417028
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebx + 0x25c], 1
sub esp, 4
jmp 0x404944
mov byte [esp + 0x22c], 0
jmp 0x404a2a
mov dword [esp + 0x10], edx
mov dword [esp], str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
sub esp, 4
test eax, eax
mov edx, dword [esp + 0x10]
je 0x4049f8
mov dword [esp + 4], str.GetUserNameW
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 8
test eax, eax
mov dword [esp + 0x33c], 0x208
mov edx, dword [esp + 0x10]
je 0x4049f8
lea ecx, [esp + 0x24]
xor edi, edi
mov dword [esp + 4], edx
mov dword [esp], ecx
mov dword [esp + 0x14], ecx
call eax
sub esp, 8
test eax, eax
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
je 0x4049f8
mov dword [esp + 0x1c], esi
mov esi, ebx
nop
lea esi, [esi]
mov edx, dword [esp + 0x18]
movzx ebx, word [edx]
test bx, bx
je 0x404dd2
movzx ebx, bx
add dword [esp + 0x18], 2
cmp ebx, 0x20
je 0x404da5
lea eax, [ebx - 0x20]
cmp eax, 0x5e
ja 0x404cc1
mov dword [esp + 4], ebx
mov dword [esp], str._:___
call sub.msvcrt.dll_strchr
test eax, eax
je 0x404daa
lea eax, [esp + 0x330]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.__x_
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea ebx, [eax + edi]
lea edx, [ebx + 1]
cmp edx, 0x103
ja 0x404c80
lea edx, [esp + 0x22c]
add edi, edx
mov dword [esp + 8], eax
lea eax, [esp + 0x330]
mov dword [esp], edi
mov edi, ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
jmp 0x404c80
mov dword [esp + 4], 0x1ed
mov dword [esp], edi
call sub.msvcrt.dll__chmod
test eax, eax
jne 0x404e78
mov dword [ebx + 0x258], 1
mov edx, edi
jmp 0x404946
mov byte [ebx + eax + 0x260], 0x2d
lea eax, [esp + 0x22c]
lea edx, [ebp + 4]
mov dword [esp + 4], eax
lea eax, [ebx + ebp + 0x264]
mov dword [esp + 0x18], edx
mov dword [esp + 8], edi
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov eax, dword [esp + 0x18]
add eax, edi
jmp 0x404a88
call edi
mov eax, dword [eax]
mov dword [esp + 8], esi
mov dword [esp + 4], str.mkdir___s___failed__errno_d_n
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [esp + 0x10]
jmp 0x404946
mov ebx, 0x5f
mov byte [esp + 0x330], bl
mov eax, 1
mov byte [esp + 0x331], 0
jmp 0x404cdc
mov dword [esp], ebp
call sub.msvcrt.dll_free
xor edx, edx
jmp 0x404946
mov ebx, esi
mov esi, dword [esp + 0x1c]
mov byte [esp + edi + 0x22c], 0
jmp 0x404a5c
lea edi, [ebx + 0x260]
mov dword [esp + 4], edi
mov dword [esp], 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
sub esp, 8
cmp eax, 0x104
jbe 0x4049c1
mov dword [esp + 4], 0x104
mov dword [esp], str.TEMP_path_need_more_than__d_characters
call fcn.00402e50
xor edx, edx
jmp 0x404946
mov edx, str.cleanup_entry
mov eax, 8
call fcn.00403f20
test eax, eax
mov edi, eax
je 0x404bd4
mov eax, dword [0x417040]
mov dword [edi], eax
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov edx, str.cleanup_path
add eax, 1
call fcn.00403f20
test eax, eax
mov dword [edi + 4], eax
je 0x404e6d
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov dword [0x417040], edi
jmp 0x404bd4
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.chmod___s___0755__failed__errno_d_n
mov dword [esp + 0xc], eax
jmp 0x404ad5