Function at 0x406350
Capabilities:
Create directory

Disassembly:
sub esp, 0x384
push ebx
push ebp
mov ebp, dword [esp + 0x390]
push esi
xor esi, esi
push edi
cmp ebp, esi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], esi
je 0x4065fa
mov edi, dword [esp + 0x39c]
cmp edi, esi
je 0x4065fa
push 0x5c
push ebp
call fcn.00425000
add esp, 8
test eax, eax
je 0x4065fa
or ebx, 0xffffffff
xor eax, eax
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4065fa
lea ecx, [esp + 0x254]
call fcn.00421c40
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x4c]
push 0x104
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 0x4000
mov dword [esp + 0x40], esi
call fcn.004104d0
mov edi, str.Temp
mov ecx, ebx
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x4c]
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x4c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [0x4350b8]
push 0x5c
push ebp
mov dword [esp + 0x18], ecx
call fcn.00425000
add esp, 8
inc eax
lea edx, [esp + 0x4c]
push eax
push edx
lea eax, [esp + 0x18]
push str._s_s
push eax
call fcn.00401ff0
mov ecx, dword [esp + 0x20]
push edi
push ecx
push ebp
call fcn.00423550
mov edx, dword [esp + 0x2c]
add esp, 0x1c
lea eax, [esp + 0x28]
mov ebp, 1
push edx
push eax
push ebx
lea ecx, [esp + 0x260]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], 2
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], edi
call fcn.00421cf0
test eax, eax
jne 0x40655f
lea ecx, [esp + 0x254]
call fcn.00421f10
cmp eax, edi
je 0x406553
lea ecx, [esp + 0x14]
mov edx, dword [eax]
push ecx
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x48]
push ecx
mov ecx, eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x34], 3
call dword [edx + 0x4c]
cmp dword [esp + 0x14], edi
je 0x406553
mov esi, dword [esp + 0x39c]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x14]
push eax
push esi
push ebp
mov edx, dword [ecx]
call dword [edx + 0x2c]
cmp eax, edi
jne 0x406548
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
mov dword [esp + 0x18], edi
push edx
mov eax, dword [ecx]
push 3
call dword [eax + 0x24]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], ebp
mov dword [esi + 4], eax
lea eax, [esp + 0x18]
mov edx, dword [ecx]
push eax
push 0x80000009
call dword [edx + 0x24]
mov ecx, dword [esp + 0x18]
add ecx, 0xffffffd0
cmp ecx, 9
jne 0x406553
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x1c], edx
jmp 0x406553
cmp eax, 0x11012
jne 0x406553
mov dword [esp + 0x1c], ebp
lea ecx, [esp + 0x254]
call fcn.00421ed0
mov eax, dword [esp + 0x10]
push eax
call fcn.00423590
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x155]
mov byte [esp + 0x154], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
add esp, 4
stosw word es:[edi], ax
push ecx
lea edx, [esp + 0x154]
push str._s.bak
push edx
stosb byte es:[edi], al
call fcn.00426b7c
lea eax, [esp + 0x15c]
push eax
call fcn.00423590
mov eax, dword [esp + 0x20]
mov edx, dword [0x4350bc]
add esp, 0x10
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4065dd
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4065dd
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00426ac0
add esp, 4
lea ecx, [esp + 0x254]
call fcn.00421ca0
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x384
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x384
ret 8