Function at 0x40f480
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4a86f0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [ebp - 0xc], ebx
cmp esi, ebx
je 0x40f6a4
mov eax, esi
lea edx, [eax + 2]
jmp 0x40f4b0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f4b0
sub eax, edx
sar eax, 1
cmp eax, 3
jbe 0x40f6a4
cmp word [esi + 2], 0x3a
jne 0x40f6a4
cmp word [esi + 4], 0x5c
lea eax, [esi + 4]
jne 0x40f6a4
push ebx
push 1
lea ecx, [ebp - 0x10]
push ecx
push 0x487854
push ebx
push str._:____
push eax
mov dword [ebp - 0x10], ebx
call fcn.0040dc20
mov edi, dword [ebp - 0x10]
add esp, 0x1c
mov dword [ebp - 8], eax
test edi, edi
je 0x40f6ab
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f512
sub eax, edx
sar eax, 1
add eax, 2
mov dword [ebp - 0x18], eax
lea eax, [eax + eax + 0xc]
cmp eax, 0x400
ja 0x40f54c
call fcn.0046dbb0
mov ebx, esp
test ebx, ebx
je 0x40f686
mov dword [ebx], 0xcccc
add ebx, 8
jmp 0x40f564
push eax
call fcn.0046a5db
add esp, 4
test eax, eax
je 0x40f562
mov dword [eax], 0xdddd
add eax, 8
mov ebx, eax
test ebx, ebx
je 0x40f686
push 2
push esi
push ebx
mov dword [ebp - 0x14], 0
call fcn.0040ca80
mov eax, edi
add esp, 0xc
mov ecx, eax
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x40f583
mov edi, ebx
sub eax, ecx
mov esi, ecx
add edi, 0xfffffffe
jmp 0x40f5a0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40f5a0
mov edx, dword [ebp - 0x18]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp word [ebx + edx*2 - 2], 0x5c
je 0x40f5e4
mov edi, ebx
mov dword [ebp - 0x14], 1
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40f5d1
mov eax, dword [0x488db8]
mov dword [edi], eax
lea ecx, [ebx + 6]
push 0x5c
push ecx
call fcn.0046cba7
mov esi, eax
add esp, 8
test esi, esi
je 0x40f64e
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor edx, edx
push edx
push ebx
mov word [esi], dx
call edi
test eax, eax
jne 0x40f61d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp eax, 0xb7
jne 0x40f651
jmp 0x40f620
mov eax, dword [ebp - 8]
mov ecx, 0x5c
mov word [esi], cx
add esi, 2
test eax, eax
jne 0x40f634
inc dword [ebp - 0xc]
jmp 0x40f63b
mov dword [ebp - 8], 0
push 0x5c
push esi
call fcn.0046cba7
mov esi, eax
add esp, 8
test esi, esi
jne 0x40f5fe
jmp 0x40f655
mov eax, dword [ebp - 8]
test eax, eax
jne 0x40f68d
cmp dword [ebp - 0x14], 0
je 0x40f66e
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
push edx
push ebx
push eax
call fcn.0040ca80
add esp, 0xc
jmp 0x40f68d
mov edx, dword [ebp + 8]
mov eax, ebx
sub edx, ebx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40f675
jmp 0x40f68d
mov dword [ebp - 8], 8
push ebx
call fcn.00434320
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004697b3
mov ebx, dword [ebp - 0xc]
add esp, 8
jmp 0x40f6ab
mov dword [ebp - 8], 0xa1
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40f6b7
mov edx, dword [ebp - 8]
mov dword [eax], edx
mov eax, ebx
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004698aa
mov esp, ebp
pop ebp
ret