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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x455745
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x46e018]
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 edi, ecx
mov edx, edi
mov dword [ebp - 0x28], 0
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea ecx, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x410720
sub edx, ecx
lea ecx, [ebp - 0x28]
sar edx, 1
push edx
push edi
call fcn.00402a20
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4107d0
test al, 0x10
je 0x4107bc
test al, 2
je 0x41077a
push 0x90
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x41077a
push str.CreateDeepDirectory__failed_to_SetFileAttributes.
push 0x46eca0
call fcn.00416460
add esp, 8
mov esi, 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x410941
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x410937
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41095f
jmp 0x410937
mov edx, 1
mov ecx, edi
call fcn.00410a10
test eax, eax
jne 0x4107d0
xor esi, esi
jmp 0x41077f
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x41077a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41077a
cmp dword [ebp - 0x14], 8
lea esi, [ebp - 0x28]
cmovae esi, dword [ebp - 0x28]
call fcn.00402ca0
mov ecx, eax
test ecx, ecx
je 0x410964
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
push esi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0040f570
test al, al
jne 0x410849
test esi, esi
jne 0x410828
xor ecx, ecx
jmp 0x41083f
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410830
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.0040f7b0
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x2c]
push 0x5c
push esi
call fcn.0042f8b0
add esp, 8
or ebx, 0xffffffff
test eax, eax
je 0x4108a4
sub eax, esi
sar eax, 1
cmp eax, ebx
je 0x4108a4
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040f100
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.0040f280
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4108ac
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4108ac
lea ecx, [ebp - 0x2c]
call fcn.00410260
mov esi, dword [ebp - 0x2c]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4108b4
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00402a20
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4108e6
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x18], 0
jne 0x4108f3
xor esi, esi
jmp 0x41077f
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
call fcn.004106d0
test eax, eax
jne 0x41090e
xor esi, esi
jmp 0x41077f
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x41077a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41077a
xor esi, esi
jmp 0x41077f
push edx
push ecx
call fcn.0042dc50
add esp, 8
mov eax, esi
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.0042dc42
mov esp, ebp
pop ebp
ret
call fcn.0043276f
push 0x80004005
call fcn.00410440
int3