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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459866
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x471080]
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 esi, ecx
push 0x20a
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0043fa60
push 8
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
call fcn.0043dbc3
mov dword [ebp - 0x248], eax
lea ecx, [ebp - 0x248]
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x248]
mov dword [eax], ecx
push esi
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 0
push 0x104
push eax
call fcn.004464ed
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x21c]
add esp, 0x1c
push eax
call esi
lea eax, [ebp - 0x21c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40fa51
sub eax, edx
sar eax, 1
cmp eax, 3
jbe 0x40fb28
nop dword [eax]
xor ecx, ecx
mov dword [ebp - 0x224], 0
push eax
lea eax, [ebp - 0x21c]
mov word [ebp - 0x234], cx
push eax
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], 7
call fcn.004017c0
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x248]
call fcn.00411b90
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x220]
cmp edx, 8
jb 0x40fafa
mov ecx, dword [ebp - 0x234]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40faf0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fd3f
push edx
push ecx
call fcn.0043dbf3
add esp, 8
lea eax, [ebp - 0x21c]
push eax
call esi
lea eax, [ebp - 0x21c]
lea edx, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40fb10
sub eax, edx
sar eax, 1
cmp eax, 3
ja 0x40fa70
mov ecx, dword [ebp - 0x238]
test ecx, ecx
je 0x40fca0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, dword [ebp - 0x23c]
xor eax, eax
add edx, ecx
mov ecx, dword [ebp - 0x248]
test ecx, ecx
je 0x40fb5e
mov ecx, dword [ecx]
test ecx, ecx
je 0x40fb5e
mov eax, dword [ecx]
dec edx
test eax, eax
je 0x40fb73
mov eax, dword [eax]
test eax, eax
je 0x40fb73
mov eax, dword [eax]
test eax, eax
je 0x40fb73
mov eax, dword [eax]
jmp 0x40fb75
xor eax, eax
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, edx
push dword [eax + ecx*4]
lea ecx, [ebp - 0x234]
call fcn.004016b0
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push eax
call ebx
test eax, eax
jne 0x40fbc0
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 0
cmovae eax, dword [ebp - 0x234]
push eax
call edi
mov eax, dword [ebp - 0x23c]
mov ecx, dword [ebp - 0x238]
dec eax
add ecx, eax
mov eax, dword [ebp - 0x240]
dec eax
and ecx, eax
mov eax, dword [ebp - 0x244]
mov esi, dword [eax + ecx*4]
mov ecx, dword [esi + 0x14]
cmp ecx, 8
jb 0x40fc1a
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x40fc10
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fd3f
mov eax, edx
push ecx
push eax
call fcn.0043dbf3
add esp, 8
mov dword [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 7
mov edx, 0
mov word [esi], ax
mov ecx, dword [ebp - 0x238]
mov eax, dword [ebp - 0x23c]
sub ecx, 1
mov dword [ebp - 0x238], ecx
cmove eax, edx
mov edx, dword [ebp - 0x220]
mov dword [ebp - 0x23c], eax
cmp edx, 8
jb 0x40fc96
mov ecx, dword [ebp - 0x234]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40fc86
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fd3f
push edx
push ecx
call fcn.0043dbf3
mov ecx, dword [ebp - 0x238]
add esp, 8
test ecx, ecx
jne 0x40fb42
nop
mov esi, dword [ebp - 0x240]
mov ecx, dword [ebp - 0x244]
test esi, esi
je 0x40fcd4
mov eax, dword [ecx + esi*4 - 4]
dec esi
test eax, eax
je 0x40fcca
push 0x18
push eax
call fcn.0043dbf3
mov ecx, dword [ebp - 0x244]
add esp, 8
test esi, esi
jne 0x40fcb0
mov esi, dword [ebp - 0x240]
test ecx, ecx
je 0x40fcff
shl esi, 2
mov eax, ecx
cmp esi, 0x1000
jb 0x40fcf5
mov ecx, dword [ecx - 4]
add esi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fd3f
push esi
push ecx
call fcn.0043dbf3
add esp, 8
push 8
push dword [ebp - 0x248]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x244], 0
call fcn.0043dbf3
add esp, 8
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.0043dbb2
mov esp, ebp
pop ebp
ret
call fcn.004420bc
int3