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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46385b
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x48d0d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x250], 0
mov byte [ebp - 0x249], 0
test edi, edi
je 0x4018a1
cmp word [edi], 0
jne 0x4018b3
cmp dword [esi + 0x48], 8
lea edi, [esi + 0x34]
mov byte [ebp - 0x249], 1
jb 0x4018b3
mov edi, dword [edi]
test edx, edx
je 0x4018e2
cmp word [edx], 0
je 0x4018e2
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4018c2
sub ecx, ebx
lea ebx, [esi + 0x4c]
sar ecx, 1
push ecx
push edx
mov ecx, ebx
call fcn.00401e90
jmp 0x401a30
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x40192f
cmp word [ebp - 0x218], 0
jne 0x401906
xor edx, edx
jmp 0x40191f
lea edx, [ebp - 0x218]
lea ecx, [edx + 2]
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x401910
sub edx, ecx
sar edx, 1
push edx
lea eax, [ebp - 0x218]
lea ecx, [esi + 0x4c]
push eax
call fcn.00401e90
cmp dword [esi + 0x60], 8
lea ebx, [esi + 0x4c]
jb 0x40193c
mov edx, dword [ebx]
jmp 0x40193e
mov edx, ebx
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
cmp word [edx], ax
jne 0x401964
xor ecx, ecx
jmp 0x401983
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x258], eax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401970
sub ecx, dword [ebp - 0x258]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x230]
call fcn.00401e90
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
mov eax, dword [ebp - 0x21c]
setne byte [ebp - 0x24a]
cmp eax, 8
jb 0x4019d2
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.00402340
cmp byte [ebp - 0x24a], 0
jne 0x401a30
cmp dword [ebx + 0x14], 8
jb 0x4019e5
mov eax, dword [ebx]
jmp 0x4019e7
mov eax, ebx
push eax
lea ecx, [ebp - 0x230]
call fcn.00401cd0
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 0
cmovae eax, dword [ebp - 0x230]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x401a30
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.00402340
cmp byte [ebp - 0x249], 0
jne 0x401ab1
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
cmp word [edi], ax
jne 0x401a5f
xor ecx, ecx
jmp 0x401a73
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401a64
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x230]
call fcn.00401e90
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
mov dword [ebp - 0x250], 1
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
mov byte [ebp - 0x249], 1
cmp eax, 1
jne 0x401ab8
mov byte [ebp - 0x249], 0
test byte [ebp - 0x250], 1
je 0x401adf
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x401adf
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.00402340
cmp byte [ebp - 0x249], 0
je 0x401af3
mov byte [esi + 0x6c], 0
xor al, al
jmp 0x401c0c
xor eax, eax
mov dword [ebp - 0x234], 7
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
cmp word [edi], ax
jne 0x401b19
xor ecx, ecx
jmp 0x401b2f
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401b20
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x248]
call fcn.00401e90
lea edx, [ebp - 0x248]
mov dword [ebp - 4], 0
mov ecx, ebx
call fcn.0040bcf0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x234]
mov byte [ebp - 0x24a], al
cmp ecx, 8
jb 0x401b81
inc ecx
push ecx
push dword [ebp - 0x248]
lea ecx, [ebp - 0x248]
call fcn.00402340
mov al, byte [ebp - 0x24a]
xor ecx, ecx
mov dword [ebp - 0x234], 7
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], cx
test al, al
jne 0x401ba7
mov byte [esi + 0x6c], cl
jmp 0x401c0c
mov eax, dword [esi + 0x68]
lea edi, [esi + 0x68]
test eax, eax
je 0x401bbe
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
lea edx, [esi + 0x34]
mov dword [ebp - 0x254], 0
mov ecx, ebx
call fcn.0040c100
cmp byte [esi + 0x6d], 0
mov eax, dword [esi]
mov eax, dword [eax]
je 0x401be6
push edi
mov ecx, esi
call eax
mov byte [esi + 0x6c], al
jmp 0x401c09
lea ecx, [ebp - 0x254]
push ecx
mov ecx, esi
call eax
mov byte [esi + 0x6c], al
test al, al
je 0x401c09
mov eax, dword [ebp - 0x254]
test eax, eax
je 0x401c09
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esi + 0x6c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00429e52
mov esp, ebp
pop ebp
ret 8