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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42bebc
mov eax, dword fs:[0]
push eax
sub esp, 0x284
mov eax, dword [0x438040]
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 ebx, ecx
mov dword [ebp - 0x288], ebx
call fcn.00405880
call fcn.00401920
mov ecx, eax
test ecx, ecx
je 0x40876b
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x280], edi
mov dword [ebp - 4], 0
push 8
mov dword [ebp - 0x278], 0
mov dword [ebp - 0x274], 0
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 0
mov dword [ebp - 0x268], 0
call fcn.0040fb09
lea ecx, [ebp - 0x278]
add esp, 4
mov dword [eax + 4], 0
mov dword [ebp - 0x278], eax
mov dword [eax], ecx
mov byte [ebp - 4], 1
mov esi, dword [ebx]
mov eax, dword [esi - 0xc]
lea eax, [esi + eax*2]
mov dword [ebp - 0x27c], eax
cmp esi, eax
jae 0x407f5c
push 0x433f24
push esi
call fcn.004199c1
mov dword [ebp - 0x264], eax
add esp, 8
lea eax, [esi + eax*2]
cmp eax, dword [ebp - 0x27c]
jae 0x407f5c
push 0x433f24
push eax
call fcn.00419a1e
mov ecx, dword [ebp - 0x264]
add esp, 8
lea edx, [ecx + 1]
push eax
add edx, eax
lea eax, [ebp - 0x28c]
push ecx
push eax
mov ecx, ebx
mov dword [ebp - 0x284], edx
call fcn.0040ee40
mov eax, dword [ebp - 0x28c]
jmp 0x407f9d
mov eax, dword [ebx]
or edx, 0xffffffff
mov dword [ebp - 0x284], edx
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x407f79
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x407f8f
call fcn.00401920
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x408775
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28c], eax
lea edx, [eax - 0x10]
mov byte [ebp - 4], 2
lea ecx, [edi - 0x10]
mov dword [ebp - 0x27c], edx
or esi, 0xffffffff
mov dword [ebp - 0x264], ecx
cmp edx, ecx
je 0x408019
cmp dword [ecx + 0xc], 0
lea edi, [ecx + 0xc]
jl 0x408004
mov edx, dword [edx]
cmp edx, dword [ecx]
jne 0x408004
mov ecx, dword [ebp - 0x27c]
call fcn.00401350
mov dword [ebp - 0x27c], eax
mov ecx, esi
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x407ff9
mov edi, dword [ebp - 0x264]
push edi
mov ecx, dword [edi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x27c]
lea edi, [eax + 0x10]
mov dword [ebp - 0x280], edi
jmp 0x408019
push dword [eax - 0xc]
lea ecx, [ebp - 0x280]
push eax
call fcn.00403530
mov edi, dword [ebp - 0x280]
mov byte [ebp - 4], 1
mov eax, esi
mov edx, dword [ebp - 0x28c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408040
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
nop word [eax + eax]
mov ecx, 0x433f20
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40806d
test dx, dx
je 0x408069
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40806d
add eax, 4
add ecx, 4
test dx, dx
jne 0x408047
xor eax, eax
jmp 0x408072
sbb eax, eax
or eax, 1
test eax, eax
je 0x408477
mov edx, dword [ebp - 0x26c]
mov esi, dword [ebp - 0x268]
mov ecx, dword [ebp - 0x270]
lea eax, [edx + esi]
test al, 3
jne 0x4080bb
lea eax, [esi + 4]
shr eax, 2
cmp ecx, eax
ja 0x4080bb
push ecx
lea ecx, [ebp - 0x278]
call fcn.0040f090
mov esi, dword [ebp - 0x268]
mov edx, dword [ebp - 0x26c]
mov ecx, dword [ebp - 0x270]
lea eax, [ecx*4 - 1]
and edx, eax
lea eax, [ecx - 1]
mov dword [ebp - 0x26c], edx
add edx, esi
mov esi, edx
mov dword [ebp - 0x27c], edx
shr esi, 2
and eax, esi
shl eax, 2
mov dword [ebp - 0x264], eax
mov ebx, eax
mov eax, dword [ebp - 0x274]
cmp dword [ebx + eax], 0
mov ebx, dword [ebp - 0x288]
jne 0x40811e
push 0x10
call fcn.0040fb09
mov ecx, dword [ebp - 0x274]
add esp, 4
mov edx, dword [ebp - 0x264]
mov dword [edx + ecx], eax
mov ecx, dword [ebp - 0x270]
mov edx, dword [ebp - 0x27c]
lea eax, [ecx - 1]
and edx, 3
mov ecx, dword [ebp - 0x274]
and eax, esi
mov eax, dword [ecx + eax*4]
lea ecx, [edi - 0x10]
lea esi, [eax + edx*4]
call fcn.00401350
add eax, 0x10
mov dword [esi], eax
inc dword [ebp - 0x268]
mov eax, dword [ebp - 0x284]
test eax, eax
js 0x40877f
mov ecx, dword [ebx]
lea esi, [ecx + eax*2]
mov eax, dword [ecx - 0xc]
lea eax, [ecx + eax*2]
mov dword [ebp - 0x27c], eax
cmp esi, eax
jae 0x4081c4
push 0x433f24
push esi
call fcn.004199c1
mov dword [ebp - 0x264], eax
add esp, 8
lea eax, [esi + eax*2]
cmp eax, dword [ebp - 0x27c]
jae 0x4081c4
push 0x433f24
push eax
call fcn.00419a1e
mov ecx, dword [ebp - 0x264]
add esp, 8
add ecx, dword [ebp - 0x284]
push eax
lea edx, [ecx + 1]
add edx, eax
lea eax, [ebp - 0x290]
push ecx
push eax
mov ecx, ebx
mov dword [ebp - 0x284], edx
call fcn.0040ee40
mov eax, dword [ebp - 0x290]
jmp 0x408206
mov eax, dword [ebx]
mov dword [ebp - 0x284], 0xffffffff
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x4081e2
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x4081f8
call fcn.00401920
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x40876b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x290], eax
lea ecx, [eax - 0x10]
mov byte [ebp - 4], 3
lea esi, [edi - 0x10]
cmp ecx, esi
je 0x40825e
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x408249
mov edx, dword [ecx]
cmp edx, dword [esi]
jne 0x408249
call fcn.00401350
mov ebx, eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x40823e
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
lea edi, [ebx + 0x10]
mov dword [ebp - 0x280], edi
jmp 0x40825e
push dword [eax - 0xc]
lea ecx, [ebp - 0x280]
push eax
call fcn.00403530
mov edi, dword [ebp - 0x280]
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x290]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408280
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x284]
xor ebx, ebx
mov esi, dword [ebp - 0x288]
test eax, eax
cmovns ebx, eax
mov eax, dword [esi]
lea ecx, [eax - 0x10]
cmp ebx, dword [eax - 0xc]
jl 0x4082b0
call fcn.00401350
lea esi, [eax + 0x10]
mov dword [ebp - 0x27c], esi
jmp 0x40836e
mov ecx, dword [ecx]
test ecx, ecx
je 0x4082cd
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
je 0x4082cd
mov edx, dword [esi]
mov eax, edx
mov dword [ebp - 0x264], edx
jmp 0x4082eb
call fcn.00401920
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
mov eax, dword [esi]
mov dword [ebp - 0x264], eax
test ecx, ecx
je 0x40876b
test eax, eax
jne 0x4082f7
test ebx, ebx
jne 0x40877f
mov eax, dword [ecx]
push 2
push ebx
call dword [eax]
test eax, eax
je 0x408789
lea esi, [eax + 0x10]
mov dword [ebp - 0x27c], esi
test ebx, ebx
js 0x40877f
cmp ebx, dword [esi - 8]
jg 0x40877f
mov dword [esi - 0xc], ebx
xor eax, eax
add ebx, ebx
mov word [ebx + esi], ax
test ebx, ebx
je 0x40836e
test esi, esi
je 0x40835e
mov eax, dword [ebp - 0x264]
push ebx
test eax, eax
je 0x40834a
push eax
push esi
call fcn.00411210
add esp, 0xc
jmp 0x40836e
push 0
push esi
call fcn.00411790
add esp, 0xc
cmp dword [ebp - 0x264], 0
jne 0x40836e
call fcn.00414c8e
mov dword [eax], 0x16
call fcn.00414b90
push esi
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40845a
test al, 0x10
je 0x40845a
cmp dword [ebp - 0x268], 0
je 0x4083fc
mov eax, dword [ebp - 0x26c]
or esi, 0xffffffff
nop dword [eax]
mov ecx, dword [ebp - 0x270]
mov edx, eax
shr edx, 2
dec ecx
and edx, ecx
and eax, 3
mov ecx, dword [ebp - 0x274]
mov ecx, dword [ecx + edx*4]
mov edx, dword [ecx + eax*4]
mov eax, esi
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4083d4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub dword [ebp - 0x268], 1
je 0x4083ec
mov eax, dword [ebp - 0x26c]
inc eax
mov dword [ebp - 0x26c], eax
jmp 0x4083a0
mov esi, dword [ebp - 0x27c]
mov dword [ebp - 0x26c], 0
lea ecx, [esi - 0x10]
lea ebx, [edi - 0x10]
cmp ecx, ebx
je 0x40845a
cmp dword [ebx + 0xc], 0
lea edi, [ebx + 0xc]
jl 0x408445
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x408445
call fcn.00401350
mov dword [ebp - 0x264], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x40843a
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x264]
lea edi, [eax + 0x10]
mov dword [ebp - 0x280], edi
jmp 0x40845a
push dword [esi - 0xc]
lea ecx, [ebp - 0x280]
push esi
call fcn.00403530
mov edi, dword [ebp - 0x280]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
mov ebx, dword [ebp - 0x288]
jmp 0x40802e
mov ecx, dword [ebp - 0x268]
test ecx, ecx
je 0x408632
mov edx, dword [ebp - 0x26c]
mov ecx, edx
mov eax, dword [ebp - 0x270]
and edx, 3
dec eax
shr ecx, 2
and ecx, eax
mov eax, dword [ebp - 0x274]
mov eax, dword [eax + ecx*4]
mov ecx, ebx
lea eax, [eax + edx*4]
push eax
call fcn.00403180
mov edx, dword [ebp - 0x26c]
mov ecx, edx
mov eax, dword [ebp - 0x270]
and edx, 3
dec eax
shr ecx, 2
and ecx, eax
mov eax, dword [ebp - 0x274]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + edx*4]
mov eax, esi
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4084ea
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub dword [ebp - 0x268], 1
jne 0x408523
mov dword [ebp - 0x26c], 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40862c
test al, 0x10
je 0x40862c
mov ecx, dword [ebp - 0x268]
mov bl, 1
jmp 0x408634
mov edx, dword [ebp - 0x26c]
inc edx
mov dword [ebp - 0x26c], edx
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
lea eax, [ecx - 1]
test eax, eax
js 0x40877f
cmp eax, ecx
jg 0x40877f
mov ecx, dword [ebx]
cmp word [ecx + eax*2], 0x5c
je 0x408565
push 1
push 0x433f24
mov ecx, ebx
call fcn.00407b30
mov edx, dword [ebp - 0x26c]
mov eax, dword [ebp - 0x270]
mov ecx, edx
dec eax
shr ecx, 2
and ecx, eax
and edx, 3
mov eax, dword [ebp - 0x274]
mov eax, dword [eax + ecx*4]
mov ecx, ebx
mov eax, dword [eax + edx*4]
push dword [eax - 0xc]
push eax
call fcn.00407b30
mov edx, dword [ebp - 0x26c]
mov ecx, edx
mov eax, dword [ebp - 0x270]
and edx, 3
dec eax
shr ecx, 2
and ecx, eax
mov eax, dword [ebp - 0x274]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + edx*4]
mov eax, esi
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4085c7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub dword [ebp - 0x268], 1
jne 0x4085dc
mov dword [ebp - 0x26c], 0
jmp 0x4085e2
inc dword [ebp - 0x26c]
lea eax, [ebp - 0x260]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x408604
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jmp 0x408612
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp - 0x260], 0x10
je 0x40862c
cmp dword [ebp - 0x268], 0
je 0x4084fd
mov edx, dword [ebp - 0x26c]
jmp 0x408530
mov ecx, dword [ebp - 0x268]
xor bl, bl
mov byte [ebp - 4], 0
test ecx, ecx
je 0x408698
nop dword [eax]
mov edx, dword [ebp - 0x26c]
mov eax, dword [ebp - 0x270]
dec edx
add edx, ecx
dec eax
mov ecx, edx
and edx, 3
shr ecx, 2
and ecx, eax
mov eax, dword [ebp - 0x274]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + edx*4]
mov eax, esi
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40867d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x268]
sub ecx, 1
mov dword [ebp - 0x268], ecx
jne 0x408640
mov dword [ebp - 0x26c], 0
mov ecx, dword [ebp - 0x274]
test ecx, ecx
je 0x408702
mov esi, dword [ebp - 0x270]
test esi, esi
jle 0x4086d4
nop dword [eax]
mov eax, dword [ecx + esi*4 - 4]
dec esi
test eax, eax
je 0x4086ca
push 0x10
push eax
call fcn.0040fafb
mov ecx, dword [ebp - 0x274]
add esp, 8
test esi, esi
jg 0x4086b0
mov esi, dword [ebp - 0x270]
shl esi, 2
mov eax, ecx
cmp esi, 0x1000
jb 0x4086f5
mov ecx, dword [eax - 4]
add esi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40878e
push esi
push ecx
call fcn.0040fafb
add esp, 8
or esi, 0xffffffff
mov eax, dword [ebp - 0x278]
push 8
push eax
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x274], 0
mov dword [ebp - 0x278], 0
call fcn.0040fafb
add esp, 8
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], esi
dec esi
test esi, esi
jg 0x40874d
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
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.0040f7c4
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004016f0
push 0x80004005
call fcn.004016f0
push 0x80070057
call fcn.004016f0
call fcn.00401490
call fcn.00414ba0
int3