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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x579d25
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push 1
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp + 8]
call fcn.0040b760
push ebx
push esi
mov ecx, 0x5c4288
mov eax, dword [eax]
push edi
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f0e6
test dx, dx
je 0x40f0e2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f0e6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f0c0
xor esi, esi
jmp 0x40f0eb
sbb esi, esi
or esi, 1
mov edx, dword [ebp - 0x18]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f106
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x40f196
mov eax, dword [ebp + 8]
lea ecx, [ebp + 8]
mov eax, dword [eax - 0xc]
dec eax
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0040b6a0
mov byte [ebp - 4], 1
mov ecx, dword [eax]
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, esi
je 0x40f177
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40f16b
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x40f16b
push edx
call fcn.0040c100
add esp, 4
mov ebx, eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x40f163
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [ebx + 0x10]
mov dword [ebp + 8], eax
jmp 0x40f177
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp + 8]
call fcn.0040c1e0
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f196
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 1
push 0xa
call fcn.0055ff89
lea esi, [eax + 8]
mov dword [ebp - 0x10], esi
push 1
push 0xa
call fcn.0055ff89
add esp, 0x10
lea edi, [eax + 8]
mov dword [ebp - 0x20], edi
xor edx, edx
mov byte [ebp - 4], 3
mov ebx, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], edx
test ecx, ecx
js 0x40f204
cmp ecx, dword [ebx - 0xc]
jg 0x40f204
lea eax, [ebx + ecx*2]
push 0x5c4288
push eax
call fcn.00558e00
mov ebx, dword [ebp + 8]
add esp, 8
test eax, eax
jne 0x40f1f1
or eax, 0xffffffff
jmp 0x40f1f5
sub eax, ebx
sar eax, 1
mov edx, dword [ebp - 0x14]
lea ecx, [eax + 1]
inc edx
mov dword [ebp - 0x14], edx
cmp eax, 0xffffffff
jne 0x40f1c5
xor eax, eax
cmp dword [ebp - 0x1c], eax
jl 0x40f326
nop
test eax, eax
js 0x40f2b0
cmp eax, dword [ebx - 0xc]
jg 0x40f2b0
lea eax, [ebx + eax*2]
push 0x5c4288
push eax
call fcn.00558e00
mov ebx, dword [ebp + 8]
add esp, 8
test eax, eax
jne 0x40f240
xor edx, edx
mov dword [ebp - 0x14], edx
jmp 0x40f2b7
sub eax, ebx
sar eax, 1
lea edx, [eax + 1]
mov dword [ebp - 0x14], edx
cmp eax, 0xffffffff
je 0x40f2b7
push edx
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp + 8]
call fcn.0040b6a0
mov ebx, dword [eax]
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f263
sub ecx, edx
sar ecx, 1
push ecx
lea ecx, [ebp - 0x10]
call fcn.0040f390
mov esi, dword [ebp - 0x10]
mov eax, dword [esi - 8]
lea eax, [eax*2 + 2]
push eax
push ebx
push esi
call fcn.00559510
mov edx, dword [ebp - 0x1c]
add esp, 0xc
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f2f0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40f2f0
mov dword [ebp - 0x14], 0
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f2c0
sub ecx, edx
sar ecx, 1
push ecx
lea ecx, [ebp - 0x10]
call fcn.0040f390
mov esi, dword [ebp - 0x10]
mov eax, dword [esi - 8]
lea eax, [eax*2 + 2]
push eax
push ebx
push esi
call fcn.00559510
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40f309
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40f31a
sub dword [ebp - 0x18], 1
mov ebx, dword [ebp + 8]
js 0x40f326
mov eax, dword [ebp - 0x14]
jmp 0x40f210
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x14], 0
jmp 0x40f32d
mov dword [ebp - 0x14], 1
test edi, edi
je 0x40f340
add edi, 0xfffffff8
push edi
call fcn.0055bf43
mov ebx, dword [ebp + 8]
add esp, 4
test esi, esi
je 0x40f353
add esi, 0xfffffff8
push esi
call fcn.0055bf43
mov ebx, dword [ebp + 8]
add esp, 4
mov dword [ebp - 4], 0xffffffff
add ebx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x40f372
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret