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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42be7c
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 - 0x290], ebx
call fcn.00405880
call fcn.00401920
mov ecx, eax
test ecx, ecx
je 0x40874b
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.0040fac9
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.00419981
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.004199de
mov ecx, dword [ebp - 0x264]
add esp, 8
lea edx, [ecx + 1]
push eax
add edx, eax
lea eax, [ebp - 0x288]
push ecx
push eax
mov ecx, ebx
mov dword [ebp - 0x284], edx
call fcn.0040ee20
mov eax, dword [ebp - 0x288]
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 0x408755
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x288], 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 - 0x288]
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 0x40845a
mov ecx, dword [ebp - 0x26c]
mov esi, dword [ebp - 0x268]
mov edx, dword [ebp - 0x270]
lea eax, [ecx + esi]
test al, 3
jne 0x4080bb
lea eax, [esi + 4]
shr eax, 2
cmp edx, eax
ja 0x4080bb
push ecx
lea ecx, [ebp - 0x278]
call fcn.0040f070
mov esi, dword [ebp - 0x268]
mov ecx, dword [ebp - 0x26c]
mov edx, dword [ebp - 0x270]
lea eax, [edx*4 - 1]
and ecx, eax
add esi, ecx
mov dword [ebp - 0x26c], ecx
mov eax, esi
lea ecx, [edx - 1]
shr eax, 2
and ecx, eax
lea eax, [ecx*4]
mov ecx, dword [ebp - 0x274]
mov dword [ebp - 0x264], eax
cmp dword [ecx + eax], 0
jne 0x408110
push 0x10
call fcn.0040fac9
mov ecx, dword [ebp - 0x274]
add esp, 4
mov edx, dword [ebp - 0x264]
mov dword [edx + ecx], eax
mov eax, edx
mov ecx, dword [ebp - 0x274]
mov eax, dword [eax + ecx]
and esi, 3
lea ecx, [edi - 0x10]
lea esi, [eax + esi*4]
call fcn.00401350
add eax, 0x10
mov dword [esi], eax
inc dword [ebp - 0x268]
mov eax, dword [ebp - 0x284]
test eax, eax
js 0x40875f
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 0x4081ab
push 0x433f24
push esi
call fcn.00419981
mov dword [ebp - 0x264], eax
add esp, 8
lea eax, [esi + eax*2]
cmp eax, dword [ebp - 0x27c]
jae 0x4081ab
push 0x433f24
push eax
call fcn.004199de
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 - 0x28c]
push ecx
push eax
mov ecx, ebx
mov dword [ebp - 0x284], edx
call fcn.0040ee20
mov eax, dword [ebp - 0x28c]
jmp 0x4081ed
mov eax, dword [ebx]
mov dword [ebp - 0x284], 0xffffffff
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x4081c9
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x4081df
call fcn.00401920
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x40874b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28c], eax
lea ecx, [eax - 0x10]
mov byte [ebp - 4], 3
lea esi, [edi - 0x10]
cmp ecx, esi
je 0x408245
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x408230
mov edx, dword [ecx]
cmp edx, dword [esi]
jne 0x408230
call fcn.00401350
mov ebx, eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x408225
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
lea edi, [ebx + 0x10]
mov dword [ebp - 0x280], edi
jmp 0x408245
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 - 0x28c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408267
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 - 0x290]
test eax, eax
cmovns ebx, eax
mov eax, dword [esi]
lea ecx, [eax - 0x10]
cmp ebx, dword [eax - 0xc]
jl 0x408297
call fcn.00401350
lea esi, [eax + 0x10]
mov dword [ebp - 0x27c], esi
jmp 0x408355
mov ecx, dword [ecx]
test ecx, ecx
je 0x4082b4
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
je 0x4082b4
mov edx, dword [esi]
mov eax, edx
mov dword [ebp - 0x264], edx
jmp 0x4082d2
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 0x40874b
test eax, eax
jne 0x4082de
test ebx, ebx
jne 0x40875f
mov eax, dword [ecx]
push 2
push ebx
call dword [eax]
test eax, eax
je 0x408769
lea esi, [eax + 0x10]
mov dword [ebp - 0x27c], esi
test ebx, ebx
js 0x40875f
cmp ebx, dword [esi - 8]
jg 0x40875f
mov dword [esi - 0xc], ebx
xor eax, eax
add ebx, ebx
mov word [esi + ebx], ax
test ebx, ebx
je 0x408355
test esi, esi
je 0x408345
mov eax, dword [ebp - 0x264]
push ebx
test eax, eax
je 0x408331
push eax
push esi
call fcn.004111d0
add esp, 0xc
jmp 0x408355
push 0
push esi
call fcn.00411750
add esp, 0xc
cmp dword [ebp - 0x264], 0
jne 0x408355
call fcn.00414c4c
mov dword [eax], 0x16
call fcn.00414b4e
push esi
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40843d
test al, 0x10
je 0x40843d
cmp dword [ebp - 0x268], 0
je 0x4083df
mov edx, dword [ebp - 0x26c]
or esi, 0xffffffff
mov ecx, dword [ebp - 0x270]
mov eax, edx
shr eax, 2
dec ecx
and ecx, eax
and edx, 3
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 0x4083b7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub dword [ebp - 0x268], 1
je 0x4083cf
mov edx, dword [ebp - 0x26c]
inc edx
mov dword [ebp - 0x26c], edx
jmp 0x408383
mov esi, dword [ebp - 0x27c]
mov dword [ebp - 0x26c], 0
lea ecx, [esi - 0x10]
lea ebx, [edi - 0x10]
cmp ecx, ebx
je 0x40843d
cmp dword [ebx + 0xc], 0
lea edi, [ebx + 0xc]
jl 0x408428
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x408428
call fcn.00401350
mov dword [ebp - 0x264], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x40841d
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 0x40843d
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 - 0x290]
jmp 0x40802e
mov ecx, dword [ebp - 0x268]
test ecx, ecx
je 0x408615
mov edx, dword [ebp - 0x26c]
mov eax, edx
mov ecx, dword [ebp - 0x270]
and edx, 3
shr eax, 2
dec ecx
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 ecx, dword [ebp - 0x26c]
mov eax, ecx
mov edx, dword [ebp - 0x270]
and ecx, 3
shr eax, 2
dec edx
and edx, eax
mov eax, dword [ebp - 0x274]
mov eax, dword [eax + edx*4]
mov edx, dword [eax + ecx*4]
mov eax, esi
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4084cd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub dword [ebp - 0x268], 1
jne 0x408506
mov dword [ebp - 0x26c], 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40860f
test al, 0x10
je 0x40860f
mov ecx, dword [ebp - 0x268]
mov bl, 1
jmp 0x408617
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 0x40875f
cmp eax, ecx
jg 0x40875f
mov ecx, dword [ebx]
cmp word [ecx + eax*2], 0x5c
je 0x408548
push 1
push 0x433f24
mov ecx, ebx
call fcn.00407b30
mov edx, dword [ebp - 0x26c]
mov ecx, dword [ebp - 0x270]
mov eax, edx
shr eax, 2
dec ecx
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 ecx, dword [ebp - 0x26c]
mov eax, ecx
mov edx, dword [ebp - 0x270]
and ecx, 3
shr eax, 2
dec edx
and edx, eax
mov eax, dword [ebp - 0x274]
mov eax, dword [eax + edx*4]
mov edx, dword [eax + ecx*4]
mov eax, esi
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4085aa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub dword [ebp - 0x268], 1
jne 0x4085bf
mov dword [ebp - 0x26c], 0
jmp 0x4085c5
inc dword [ebp - 0x26c]
lea eax, [ebp - 0x260]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x4085e7
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jmp 0x4085f5
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp - 0x260], 0x10
je 0x40860f
cmp dword [ebp - 0x268], 0
je 0x4084e0
mov edx, dword [ebp - 0x26c]
jmp 0x408513
mov ecx, dword [ebp - 0x268]
xor bl, bl
mov byte [ebp - 4], 0
test ecx, ecx
je 0x408678
nop
mov edx, dword [ebp - 0x26c]
dec edx
add edx, ecx
mov ecx, dword [ebp - 0x270]
mov eax, edx
dec ecx
shr eax, 2
and edx, 3
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 0x40865d
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 0x408620
mov dword [ebp - 0x26c], 0
mov ecx, dword [ebp - 0x274]
test ecx, ecx
je 0x4086e2
mov esi, dword [ebp - 0x270]
test esi, esi
je 0x4086b4
nop dword [eax]
mov eax, dword [ecx + esi*4 - 4]
dec esi
test eax, eax
je 0x4086aa
push 0x10
push eax
call fcn.0040fabb
mov ecx, dword [ebp - 0x274]
add esp, 8
test esi, esi
jne 0x408690
mov esi, dword [ebp - 0x270]
shl esi, 2
mov eax, ecx
cmp esi, 0x1000
jb 0x4086d5
mov ecx, dword [eax - 4]
add esi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40876e
push esi
push ecx
call fcn.0040fabb
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.0040fabb
add esp, 8
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], esi
dec esi
test esi, esi
jg 0x40872d
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.0040f784
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.00414b5e
int3