Function at 0x406950
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x515c80
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x549950]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x38], 4
call fcn.004c01dc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40699b
push 0x80004005
call fcn.00401ff0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x38], 5
mov ecx, dword [esp + 0x50]
cmp dword [ecx - 0xc], 0
jne 0x4069ca
push 5
push 0x522800
lea ecx, [esp + 0x58]
call fcn.00403570
lea edx, [esp + 0x24]
push 0x26
push edx
call fcn.0049ed16
push 0x5227e0
push eax
lea eax, [esp + 0x30]
mov bl, 6
push eax
mov byte [esp + 0x4c], bl
call fcn.00402970
add esp, 0x14
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c], 7
call fcn.00403060
mov byte [esp + 0x38], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a22
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 5
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a47
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x50]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.004030e0
mov ebp, dword [esp + 0x1c]
lea eax, [ebp - 0x10]
push eax
call fcn.00403680
lea esi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x20], esi
mov byte [esp + 0x38], 8
cmp dword [esi - 4], 1
jle 0x406a8c
mov ecx, dword [esi - 0xc]
push ecx
lea ecx, [esp + 0x24]
call fcn.00403270
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ebx, ebx
cmp eax, 0xffffffff
mov eax, dword [esi - 8]
push eax
push esi
setne bl
call fcn.004df755
add esp, 8
test eax, eax
jl 0x407010
cmp eax, dword [esi - 8]
jg 0x407010
mov dword [esi - 0xc], eax
xor edx, edx
mov word [esi + eax*2], dx
add esi, 0xfffffff0
mov byte [esp + 0x38], 5
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406ae3
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
test ebx, ebx
jne 0x406aef
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 1
push 0x5227e0
lea ecx, [esp + 0x24]
call fcn.004030e0
push 0x522764
lea ecx, [esp + 0x1c]
call fcn.00402480
mov byte [esp + 0x38], 9
cmp dword [esp + 0x54], 0
jne 0x406c65
mov eax, dword [esp + 0x40]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x58], esp
mov esi, esp
push eax
call fcn.00403680
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00405ed0
add esp, 4
test al, al
jne 0x406c73
mov eax, dword [esp + 0x40]
cmp dword [eax - 0xc], 0
je 0x406c73
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x58], esp
mov esi, esp
push eax
call fcn.00403680
lea ecx, [esp + 0x5c]
add esp, 4
add eax, 0x10
push ecx
mov dword [esi], eax
call fcn.0049ed82
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
mov bl, 0xa
push ecx
mov byte [esp + 0x4c], bl
call fcn.004028b0
add esp, 0x14
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3c], 0xb
call fcn.00403060
mov byte [esp + 0x38], bl
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406bc9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x28], esp
mov esi, esp
push eax
call fcn.00403680
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x40], 0xc
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
mov dword [esp + 0x28], esp
mov esi, esp
push eax
call fcn.00403680
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov byte [esp + 0x40], bl
call fcn.0040d3c0
mov eax, dword [esp + 0x20]
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x28], esp
mov esi, esp
push eax
call fcn.00403680
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004a1391
add esp, 4
test eax, eax
jne 0x406c3e
lea ecx, [esp + 0x18]
call fcn.00402ca0
mov byte [esp + 0x38], 9
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c73
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x406c73
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00403060
mov eax, dword [esp + 0x18]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x58], esp
mov esi, esp
push eax
call fcn.00403680
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00405ed0
add esp, 4
test al, al
jne 0x406d3d
call fcn.004c01dc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x406cb9
push 0x80004005
call fcn.00401ff0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x58]
mov bl, 0xd
push edx
mov byte [esp + 0x40], bl
call fcn.00497050
add esp, 8
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3c], 0xe
call fcn.00403060
mov byte [esp + 0x38], bl
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d18
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 9
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d3d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, edi
and cl, 0x20
movsx edx, cl
neg edx
sbb edx, edx
mov ecx, edi
and cl, 8
mov eax, edi
mov edi, dword [esp + 0x1c]
push 1
mov ebx, 3
and edx, ebx
shr eax, 4
push edx
movsx esi, cl
and eax, 1
push eax
neg esi
push ecx
sbb esi, esi
add edi, 0xfffffff0
mov dword [esp + 0x34], esp
mov ebp, esp
push edi
and esi, ebx
call fcn.00403680
add eax, 0x10
mov dword [ebp], eax
mov byte [esp + 0x4c], 0xf
mov eax, dword [esp + 0x60]
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov ebp, esp
push eax
call fcn.00403680
add eax, 0x10
add esp, 4
mov dword [ebp], eax
mov byte [esp + 0x4c], 0x10
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x5c]
push edx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x44], esp
mov ebp, esp
push eax
call fcn.00403680
add eax, 0x10
mov dword [ebp], eax
mov byte [esp + 0x58], 0x11
mov eax, dword [esp + 0x64]
add eax, 0xfffffff0
mov dword [esp + 0x4c], esp
mov ebp, esp
push eax
call fcn.00403680
add eax, 0x10
mov dword [ebp], eax
add esp, 4
mov ecx, esi
mov byte [esp + 0x58], 9
call fcn.00497fe0
add esp, 0x20
or edx, 0xffffffff
mov byte [esp + 0x38], 5
test eax, eax
mov eax, dword [esp + 0x18]
je 0x406f17
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e26
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 4
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e44
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov byte [esp + 0x38], bl
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e68
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 2
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e8d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406eb2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406ed7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406eff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x18
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f30
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 4
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f4e
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov byte [esp + 0x38], bl
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f72
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 2
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f97
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406fbc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406fe1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407009
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x406f01
push 0x80070057
call fcn.00401ff0
int3