Function at 0x401ffd
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
push esi
push edi
mov dword [ebp - 0x224], 0x13b0
mov eax, dword [ebp - 0x224]
or eax, eax
jl 0x402037
cmp eax, dword [0x4040e0]
jge 0x402037
movsx eax, byte [eax + 0x4040e4]
cmp eax, 0x80
jg 0x402163
mov dword [ebp - 0x228], 0x1465
jmp 0x402136
mov eax, dword [ebp - 0x228]
or eax, eax
jl 0x402066
cmp eax, dword [0x4040e0]
jge 0x402066
cmp byte [eax + 0x4040e4], 0x3a
jg 0x40214c
mov dword [ebp - 0x22c], 0x1a6d
mov eax, dword [ebp - 0x22c]
or eax, eax
jl 0x402090
cmp eax, dword [0x4040e0]
jge 0x402090
cmp byte [eax + 0x4040e4], 0x77
je 0x40212c
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x230], eax
jmp 0x4020ff
mov dword [ebp - 0x234], 0x113c
mov eax, dword [ebp - 0x234]
or eax, eax
jl 0x4020c4
cmp eax, dword [0x4040e0]
jge 0x4020c4
cmp byte [eax + 0x4040e4], 0x7a
je 0x4020f8
mov eax, dword [ebp - 0x234]
or eax, eax
jl 0x4020e5
cmp eax, dword [0x4040e0]
jge 0x4020e5
movsx eax, byte [eax + 0x4040e4]
cmp eax, 0x85
jl 0x4020f8
sub dword [ebp - 0x234], 0x174
cmp dword [ebp - 0x234], 0x49
jg 0x4020a8
add dword [ebp - 0x230], 0x5b
mov eax, dword [ebp - 0x230]
cmp eax, dword [ebp - 0x22c]
jle 0x402115
cmp eax, dword [0x4040e0]
jl 0x40209e
sub dword [ebp - 0x22c], 0x22b
cmp dword [ebp - 0x22c], 0x14
jg 0x402070
add dword [ebp - 0x228], 0x29c
mov eax, dword [ebp - 0x228]
cmp eax, dword [ebp - 0x224]
jge 0x40214c
or eax, eax
jg 0x402046
sub dword [ebp - 0x224], 0x1ee
cmp dword [ebp - 0x224], 0
jg 0x402012
call sub.KERNEL32.dll_GetLastError
mov edi, eax
lea eax, [ebp - 0x104]
push eax
push 0x104
call sub.KERNEL32.dll_GetTempPathA
or edi, edi
je 0x40218d
lea eax, [ebp - 0x104]
push eax
call sub.SHLWAPI.DLL_StrToIntA
mov edi, eax
push 0
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_CreateDirectoryA
mov dword [ebp - 0x224], 0x1b78
mov dword [ebp - 0x228], 0x31
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x22c], eax
jmp 0x4021fc
mov eax, dword [ebp - 0x22c]
or eax, eax
jl 0x4021d9
cmp eax, dword [0x4040e0]
jge 0x4021d9
cmp byte [eax + 0x4040e4], 0x79
je 0x402212
mov eax, dword [ebp - 0x22c]
or eax, eax
jl 0x4021f5
cmp eax, dword [0x4040e0]
jge 0x4021f5
cmp byte [eax + 0x4040e4], 0x27
jg 0x402212
add dword [ebp - 0x22c], 0x55
mov eax, dword [ebp - 0x22c]
cmp eax, dword [ebp - 0x228]
jle 0x402212
cmp eax, dword [0x4040e0]
jl 0x4021bd
add dword [ebp - 0x228], 0x84
cmp dword [ebp - 0x228], 0x593
jl 0x4021af
add dword [ebp - 0x224], 0xfffffd5d
cmp dword [ebp - 0x224], 0x3a
jg 0x4021a5
and dword [ebp - 0x10c], 0
and dword [ebp - 0x108], 0
push 0
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_GetFileAttributesExA
mov dword [ebp - 0x118], 0xc
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x224], 0x2515
mov eax, dword [ebp - 0x224]
or eax, eax
jl 0x4022a7
cmp eax, dword [0x4040e0]
jge 0x4022a7
movsx eax, byte [eax + 0x4040e4]
cmp eax, 0xc7
jl 0x4023d7
mov dword [ebp - 0x228], 0x4e
mov eax, dword [ebp - 0x228]
or eax, eax
jl 0x4022d1
cmp eax, dword [0x4040e0]
jge 0x4022d1
cmp byte [eax + 0x4040e4], 0x45
je 0x4023c0
mov dword [ebp - 0x22c], 0xed3
jmp 0x402390
mov eax, dword [ebp - 0x22c]
or eax, eax
jl 0x402305
cmp eax, dword [0x4040e0]
jge 0x402305
movsx eax, byte [eax + 0x4040e4]
cmp eax, 0xab
jge 0x4023a6
mov dword [ebp - 0x230], 0x23f2
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x234], eax
jmp 0x402361
mov eax, dword [ebp - 0x234]
or eax, eax
jl 0x40233e
cmp eax, dword [0x4040e0]
jge 0x40233e
movsx eax, byte [eax + 0x4040e4]
cmp eax, 0x9f
jl 0x402373
mov eax, dword [ebp - 0x234]
or eax, eax
jl 0x40235a
cmp eax, dword [0x4040e0]
jge 0x40235a
cmp byte [eax + 0x4040e4], 0x69
je 0x402373
add dword [ebp - 0x234], 0x59
mov eax, dword [ebp - 0x234]
cmp eax, dword [ebp - 0x22c]
jge 0x402373
or eax, eax
jg 0x40231d
add dword [ebp - 0x230], 0xfffffcf7
cmp dword [ebp - 0x230], 0x22
jg 0x40230f
add dword [ebp - 0x22c], 0x21a
mov eax, dword [ebp - 0x22c]
cmp eax, dword [ebp - 0x228]
jge 0x4023a6
or eax, eax
jg 0x4022e0
add dword [ebp - 0x228], 0x1ff
cmp dword [ebp - 0x228], 0xe2d
jl 0x4022b1
add dword [ebp - 0x224], 0xfffffd68
cmp dword [ebp - 0x224], 0x31
jg 0x402282
call sub.KERNEL32.dll_GetLastError
mov esi, eax
call sub.KERNEL32.dll_GetCurrentProcessId
mov dword [ebp - 0x220], eax
mov edi, esi
sub edi, 0x57
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x21c]
push eax
call sub.KERNEL32.dll_lstrcpyA
mov eax, edi
pop edi
pop esi
leave
ret