Function at 0x401690
Capabilities:
Create directory
Delete directory
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4140d0
push 0x40b7b8
push dword fs:[0]
mov dword fs:[0], esp
sub esp, 0xc
mov eax, 0x3974
call fcn.0040b4a0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x397c], 0
mov eax, dword [ebp + 8]
mov dword [0x41af44], eax
call fcn.00405790
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 0x104
push 0x41ad20
push 0
push dword [0x41af44]
call dword [sym.imp.USER32.dll_LoadStringW]
mov byte [0x41af4c], 1
push 0x104
push 0x41af54
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x3980], eax
test eax, eax
je 0x401724
cmp dword [ebp - 0x3980], 0x104
jbe 0x40172e
mov dword [ebp - 0x397c], 1
push 0x41b570
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x3980], eax
test eax, eax
je 0x401754
cmp dword [ebp - 0x3980], 0x104
jbe 0x40175e
mov dword [ebp - 0x397c], 1
or eax, 0xffffffff
inc eax
cmp word [eax + eax + 0x41b570], 0
jne 0x401761
mov dword [0x41af50], eax
cmp dword [ebp - 0x397c], 0
jne 0x401c1d
push 0x41af30
push 0x41af38
push 0x41af3c
call fcn.00401490
test eax, eax
jne 0x4017a6
mov dword [ebp - 0x397c], 3
jmp 0x401e2e
cmp dword [0x41af38], 0
je 0x401797
mov eax, dword [0x41af30]
mov edx, dword [0x41af34]
test edx, edx
jne 0x4017c2
test eax, eax
je 0x401797
cmp dword [ebp - 0x397c], 0
jne 0x401c1d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
shl esi, 0xc
shl edi, 0xe
xor esi, edi
xor esi, eax
mov dword [ebp - 0x3988], esi
mov dword [ebp - 0x3984], 0
cmp dword [ebp - 0x3984], 0x64
jb 0x401817
mov dword [ebp - 0x397c], 1
jmp 0x4018ef
mov eax, dword [0x41af50]
lea edx, [eax + eax + 0x41b570]
xor ecx, ecx
mov ax, word [ecx + 0x41421a]
mov word [edx + ecx], ax
add ecx, 2
test ax, ax
jne 0x401825
or eax, 0xffffffff
inc eax
cmp word [eax + eax + 0x41b570], 0
jne 0x40183b
lea eax, [eax + eax + 0x41b570]
mov edx, dword [ebp - 0x3988]
xor ecx, ecx
jmp 0x401875
mov esi, edx
and esi, 0xf
shr edx, 4
lea edi, [esi + 0x30]
lea ebx, [esi + 0x37]
cmp esi, 0xa
cmovae edi, ebx
imul esi, ecx, 0xfffffffe
mov word [eax + esi + 0xe], di
inc ecx
cmp ecx, 8
jb 0x401858
mov word [eax + ecx*2], 0
push 0x41b570
call fcn.00412ee0
test al, al
jne 0x4018d8
push 0
push 0x41b570
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4018c7
push 0x414216
push 0x41b570
call fcn.0040ba30
add esp, 8
or eax, 0xffffffff
inc eax
cmp word [eax + eax + 0x41b570], 0
jne 0x4018b4
mov dword [0x41af50], eax
jmp 0x4018ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401808
inc dword [ebp - 0x3984]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add dword [ebp - 0x3988], eax
jmp 0x4017ff
cmp dword [ebp - 0x397c], 0
jne 0x401c1d
lea eax, [ebp - 0xd20]
push eax
push 0x61c
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x41b570
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x41b570
call fcn.004057e0
call fcn.00405600
mov dword [ebp - 0x24], 0x4059d0
mov dword [ebp - 0x20], 0x4059f0
mov dword [ebp - 0x2c], 0x405a00
mov dword [ebp - 0x28], 0x405a20
lea eax, [ebp - 0x44]
push eax
call fcn.00402300
push 0
lea eax, [ebp - 0x68]
push eax
call fcn.00405d80
mov dword [ebp - 0x4c], 0
push 0x41af54
lea eax, [ebp - 0x3c]
push eax
call fcn.00402010
test eax, eax
jne 0x4019a3
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.004012f0
test eax, eax
je 0x4019a3
push 0
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00402180
test eax, eax
je 0x4019ad
mov dword [ebp - 0x397c], 0xb
cmp dword [ebp - 0x397c], 0
jne 0x4019f2
push 0x40000
lea eax, [ebp - 0x24]
push eax
call dword [ebp - 0x24]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4019d7
mov dword [ebp - 0x397c], 2
jmp 0x4019f2
mov dword [ebp - 0x48], 0x40000
lea eax, [ebp - 0x44]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 0
lea eax, [ebp - 0xe8]
push eax
call fcn.00402520
cmp dword [ebp - 0x397c], 0
jne 0x401bf0
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0xe8]
push eax
call fcn.00405330
mov dword [ebp - 0x397c], eax
test eax, eax
jne 0x401bf0
or dword [ebp - 0x395c], 0xffffffff
mov dword [ebp - 0x3960], 0
mov dword [ebp - 0x3964], 0
xor esi, esi
jmp 0x401bd5
mov dword [ebp - 0x3968], 0
mov dword [ebp - 0x396c], 0
push 0
push esi
lea eax, [ebp - 0xe8]
push eax
call fcn.00405540
cmp eax, 0x104
jae 0x401b5f
mov eax, dword [0x41af50]
lea edi, [eax + eax + 0x41b570]
push edi
push esi
lea eax, [ebp - 0xe8]
push eax
call fcn.00405540
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x396c]
push eax
lea eax, [ebp - 0x3968]
push eax
lea eax, [ebp - 0x3964]
push eax
lea eax, [ebp - 0x3960]
push eax
lea eax, [ebp - 0x395c]
push eax
push esi
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0xe8]
push eax
call fcn.00405370
mov dword [ebp - 0x397c], eax
test eax, eax
jne 0x401be1
xor ebx, ebx
jmp 0x401b07
cmp word [edi + ebx*2], 0x2f
jne 0x401b06
mov word [edi + ebx*2], 0
push 0x41b570
call fcn.004132b0
mov word [edi + ebx*2], 0x5c
inc ebx
cmp word [edi + ebx*2], 0
jne 0x401ae9
mov eax, dword [ebp - 0xa0]
mov edx, esi
shr edx, 3
movzx eax, byte [eax + edx]
mov edx, pe_nt_image_headers32
mov ecx, esi
and ecx, 7
sar edx, cl
test eax, edx
je 0x401b3c
push 0x41b570
call fcn.004132b0
jmp 0x401bd4
push 0x41b570
call fcn.00412ee0
test al, al
jne 0x401b5f
push 0x41b570
lea eax, [ebp - 0x3970]
push eax
call fcn.00402030
test eax, eax
je 0x401b6b
mov dword [ebp - 0x397c], 2
jmp 0x401be1
mov eax, dword [ebp - 0x396c]
mov dword [ebp - 0x3974], eax
lea eax, [ebp - 0x3974]
push eax
mov eax, dword [ebp - 0x3960]
add eax, dword [ebp - 0x3968]
push eax
lea eax, [ebp - 0x3970]
push eax
call fcn.00402100
test eax, eax
jne 0x401ba9
mov eax, dword [ebp - 0x3974]
cmp eax, dword [ebp - 0x396c]
je 0x401bb3
mov dword [ebp - 0x397c], 2
lea eax, [ebp - 0x3970]
push eax
call fcn.00402050
cmp dword [ebp - 0x397c], 0
jne 0x401be1
test eax, eax
je 0x401bd4
mov dword [ebp - 0x397c], eax
jmp 0x401be1
inc esi
cmp esi, dword [ebp - 0xa8]
jb 0x401a53
push dword [ebp - 0x3960]
lea eax, [ebp - 0x24]
push eax
call dword [ebp - 0x20]
jmp 0x401bfa
mov dword [ebp - 0x397c], 3
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xe8]
push eax
call fcn.004025b0
push dword [ebp - 0x4c]
lea eax, [ebp - 0x24]
push eax
call dword [ebp - 0x20]
lea eax, [ebp - 0x3c]
push eax
call fcn.00402050
mov eax, dword [0x41af50]
mov word [eax + eax + 0x41b570], 0
mov dword [ebp - 0x398c], 0
cmp dword [ebp - 0x397c], 0
jne 0x401dbe
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push str.PBCore.dll
push 0x41b570
push 0x414208
push 0x30e
lea eax, [ebp - 0x133c]
push eax
call fcn.0040bac0
add esp, 0x14
lea eax, [ebp - 0x133c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x3990], eax
test eax, eax
jne 0x401c9c
push 0x40010
push 0x41ad20
push str.Unable_to_load_module_PBCore
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0x41ad20
push str.APPTITLE
call dword [0x416bf4]
push 0x41af54
push str.ARCNAME
call dword [0x416bf4]
push 0x41b570
push str.PBSFXPATH
call dword [0x416bf4]
lea eax, [ebp - 0xd20]
push eax
push 0x41417a
call dword [0x416bf4]
lea edx, [ebp - 0xd20]
xor ecx, ecx
mov ax, word [ecx + 0x41af54]
mov word [edx + ecx], ax
add ecx, 2
test ax, ax
jne 0x401ce6
lea eax, [ebp - 0xd20]
push eax
call fcn.00413250
lea eax, [ebp - 0xd20]
push eax
push str.ARCPATH
call dword [0x416bf4]
push dword [ebp + 8]
call dword [0x416c08]
call dword [0x416c0c]
cmp eax, 1
jne 0x401d9d
push 0
push 0x41af54
call fcn.00412d80
mov dword [ebp - 4], 0
call fcn.00401080
mov dword [ebp - 0x398c], eax
or dword [ebp - 4], 0xffffffff
jmp 0x401d9d
push str.PBCore.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x3990], eax
test eax, eax
je 0x401dbe
push dword [ebp - 0x3990]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x1958]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x3980], eax
test eax, eax
je 0x401edc
cmp dword [ebp - 0x3980], 0x104
ja 0x401edc
lea eax, [ebp - 0x1958]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x41b570
call fcn.00405810
call dword [sym.imp.ole32.dll_CoUninitialize]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x41b570
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp dword [ebp - 0x398c], 0
jne 0x401ee1
cmp dword [ebp - 0x397c], 0
je 0x401ed8
push 0x104
lea eax, [ebp - 0x2f0]
push eax
push 1
push dword [0x41af44]
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x4140dc
lea eax, [ebp - 0x2f0]
push eax
call fcn.0040ba30
add esp, 8
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x704]
push eax
call fcn.0040ba30
add esp, 8
push 0x104
lea eax, [ebp - 0x2f0]
push eax
mov eax, dword [ebp - 0x397c]
inc eax
push eax
push dword [0x41af44]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x704]
push eax
call fcn.0040ba30
add esp, 8
push 0x40010
push 0x41ad20
lea eax, [ebp - 0x704]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [ebp - 0x397c]
neg eax
jmp 0x401ee7
xor eax, eax
jmp 0x401ee7
or eax, 0xffffffff
jmp 0x401ee7
mov eax, dword [ebp - 0x398c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
lea esp, [ebp - 0x399c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10