Function at 0x40fd70
Capabilities:
Check if file exists
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x49bb36
mov eax, dword fs:[0]
push eax
sub esp, 0x234
mov eax, dword [0x4c1bd8]
xor eax, esp
mov dword [esp + 0x230], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c1bd8]
xor eax, esp
push eax
lea eax, [esp + 0x248]
mov dword fs:[0], eax
mov edi, dword [esp + 0x258]
mov ebp, ecx
mov dword [esp + 0x20], ebp
test edi, edi
je 0x40fe83
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40fdc5
sub eax, edx
sar eax, 1
mov esi, eax
lea eax, [esi - 4]
cmp eax, 0x100
ja 0x40fe83
xor ecx, ecx
push 0x21a
push ecx
lea edx, [esp + 0x32]
push edx
mov word [esp + 0x34], cx
call fcn.00454ce0
add esp, 0xc
push edi
push 0x21c
lea eax, [esp + 0x30]
push eax
call fcn.0040d2b0
mov ecx, 0x5c
cmp cx, word [esp + esi*2 + 0x26]
je 0x40fe29
mov edx, ecx
mov word [esp + esi*2 + 0x28], dx
inc esi
xor eax, eax
mov word [esp + esi*2 + 0x28], ax
lea ecx, [esp + 0x2e]
push 0x5c
push ecx
call fcn.00453ab2
add esp, 8
cmp word [esp + 0x2e], 0
mov esi, eax
mov dword [esp + 0x14], esi
je 0x40ffc8
jmp 0x40fe54
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40ffc8
lea eax, [esp + 0x28]
xor edx, edx
push eax
mov word [esi], dx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40feaf
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x40ffa5
xor eax, eax
mov ecx, dword [esp + 0x248]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00454cc7
add esp, 0x240
ret 4
push 0
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40fe83
lea ebx, [ebp + 0x90]
push ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4c44d8]
mov edx, dword [eax + 0xc]
xor esi, esi
mov ecx, 0x4c44d8
mov dword [esp + 0x250], esi
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x28]
mov byte [esp + 0x250], 1
mov dword [esp + 0x18], esi
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, si
jne 0x40ff03
sub eax, ecx
sar eax, 1
push eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x24]
call fcn.0040df70
mov edi, dword [ebp + 0xdc]
mov edx, dword [edi + 4]
lea esi, [ebp + 0xc8]
lea ecx, [esp + 0x18]
push ecx
push edx
push edi
mov ecx, esi
call fcn.0040ef90
push 1
mov ecx, esi
mov ebp, eax
call fcn.0040f030
mov dword [edi + 4], ebp
mov eax, dword [ebp + 4]
mov dword [eax], ebp
lea eax, [esp + 0x28]
push eax
push 0x4a071c
call fcn.0040cd20
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
add esp, 8
mov byte [esp + 0x250], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ff8b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
mov dword [esp + 0x254], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
mov ecx, 0x5c
mov word [esi], cx
push ecx
add esi, 2
push esi
call fcn.00453ab2
add esp, 8
cmp word [esi], 0
mov dword [esp + 0x14], eax
jne 0x40fe50
mov eax, 1
jmp 0x40fe85