Function at 0x407604
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x429c89
mov eax, dword fs:[0]
push eax
mov eax, 0x32b0
call fcn.0041a300
mov eax, dword [0x433774]
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, edx
xor edi, edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x32ac], ecx
cmp dword [esi + 0x70], edi
jne 0x407650
or eax, 0xffffffff
jmp 0x407bba
mov eax, dword [ebp + 8]
sub eax, edi
mov dword [ebp - 0x32a8], edi
je 0x407b7d
push 2
pop ebx
sub eax, ebx
je 0x40790b
dec eax
je 0x4076c3
dec eax
jne 0x407bb4
lea eax, [ebp - 0x3288]
push eax
mov eax, ecx
mov ecx, dword [eax + 4]
call fcn.00407101
pop ecx
mov ebx, eax
lea eax, [esi + 0x74]
mov dword [ebp - 4], 1
call fcn.0040bf6c
push 1
xor edi, edi
lea esi, [ebp - 0x3288]
call fcn.0040c1b5
mov eax, dword [ebp - 0x32ac]
cmp dword [eax + 0x24], edi
je 0x407bb4
or dword [ebp - 0x32a8], 0xffffffff
jmp 0x407bb4
lea eax, [ebp - 0x32a4]
push eax
mov eax, ecx
mov ecx, dword [eax + 4]
call fcn.00407101
pop ecx
lea ecx, [esi + 0x74]
mov ebx, eax
mov eax, ecx
mov dword [ebp - 4], 3
mov dword [ebp - 0x32b4], ecx
call fcn.0040bf6c
or dword [ebp - 4], 0xffffffff
push 1
xor edi, edi
lea esi, [ebp - 0x32a4]
call fcn.0040c1b5
push dword [ebp - 0x32b4]
lea esi, [ebp - 0x3250]
call fcn.0040b561
mov dword [ebp - 4], 4
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x68]
test eax, eax
je 0x4077e6
cmp dword [ebp - 0x323c], 8
mov ecx, dword [ebp - 0x3250]
jae 0x407738
mov ecx, esi
push ecx
mov ecx, dword [ebp - 0x18]
push dword [ecx + 0x6c]
call eax
mov esi, eax
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x407746
sub eax, ecx
sar eax, 1
mov ebx, eax
push esi
lea eax, [ebp - 0x3250]
call fcn.0040c629
test al, al
je 0x407791
cmp dword [ebp - 0x323c], 8
mov eax, dword [ebp - 0x3250]
jae 0x40777c
lea eax, [ebp - 0x3250]
sub esi, eax
push ebx
sar esi, 1
lea eax, [ebp - 0x3250]
push esi
mov ecx, eax
call fcn.0040c057
jmp 0x4077e6
push 0
lea eax, [ebp - 0x3250]
call fcn.0040c5bd
test al, al
je 0x4077e6
cmp dword [ebp - 0x323c], 8
mov eax, dword [ebp - 0x3250]
jae 0x4077b7
lea eax, [ebp - 0x3250]
lea edi, [ebx + ebx]
push edi
push esi
push eax
call fcn.004118e0
mov eax, dword [ebp - 0x3250]
add esp, 0xc
cmp dword [ebp - 0x323c], 8
mov dword [ebp - 0x3240], ebx
jae 0x4077e0
lea eax, [ebp - 0x3250]
xor ecx, ecx
mov word [edi + eax], cx
cmp dword [ebp - 0x323c], 8
mov ecx, dword [ebp - 0x3250]
jae 0x4077fb
lea ecx, [ebp - 0x3250]
mov eax, dword [ebp - 0x18]
add eax, 0x48
cmp dword [eax + 0x14], 8
jb 0x407809
mov eax, dword [eax]
xor ebx, ebx
push ebx
push ecx
push eax
push ebx
lea eax, [ebp - 0x3218]
push 0x800
push eax
call fcn.0040feb6
mov esi, dword [ebp - 0x32ac]
push dword [esi + 0x14]
call fcn.004115ea
add esp, 0x1c
push ebx
push 0x80
push 3
push ebx
push 1
push 0xc0000000
lea eax, [ebp - 0x3218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40789f
lea eax, [ebp - 0x32bc]
push eax
movzx eax, word [esi + 0x1a]
push eax
movzx eax, word [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
test eax, eax
je 0x407898
lea eax, [ebp - 0x32b0]
push eax
lea eax, [ebp - 0x32bc]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x407898
lea eax, [ebp - 0x32b0]
push eax
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [esi + 0x1c]
xor ecx, ecx
test al, 1
je 0x4078aa
inc ecx
test al, 4
je 0x4078b1
or ecx, 4
test al, 2
je 0x4078b8
or ecx, 2
test al, 0x20
je 0x4078bf
or ecx, 0x20
push ecx
lea eax, [ebp - 0x3218]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x64]
cmp eax, ebx
je 0x4078f6
cmp dword [ebp - 0x323c], 8
mov edx, dword [ebp - 0x3250]
jae 0x4078ec
lea edx, [ebp - 0x3250]
push dword [esi]
push edx
push 1
push dword [ecx + 0x6c]
call eax
xor eax, eax
inc eax
mov dword [ebp - 0x32a8], eax
push eax
lea esi, [ebp - 0x3250]
jmp 0x407bad
mov ecx, dword [ecx + 4]
lea eax, [ebp - 0x3234]
push eax
call fcn.00407101
pop ecx
mov dword [ebp - 4], ebx
mov eax, dword [esi + 0x68]
cmp eax, edi
je 0x4079f4
cmp dword [ebp - 0x3220], 8
mov ecx, dword [ebp - 0x3234]
jae 0x40793e
lea ecx, [ebp - 0x3234]
push ecx
push dword [esi + 0x6c]
call eax
mov edi, eax
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, ebx
test dx, dx
jne 0x407949
sub eax, ecx
sar eax, 1
mov ebx, eax
push edi
lea eax, [ebp - 0x3234]
call fcn.0040c629
test al, al
je 0x407993
cmp dword [ebp - 0x3220], 8
mov eax, dword [ebp - 0x3234]
jae 0x40797e
lea eax, [ebp - 0x3234]
sub edi, eax
push ebx
sar edi, 1
lea eax, [ebp - 0x3234]
push edi
mov ecx, eax
call fcn.0040c057
jmp 0x4079f4
push 0
lea eax, [ebp - 0x3234]
call fcn.0040c5bd
test al, al
je 0x4079f4
cmp dword [ebp - 0x3220], 8
mov ecx, dword [ebp - 0x3234]
jae 0x4079b9
lea ecx, [ebp - 0x3234]
lea eax, [ebx + ebx]
push eax
push edi
push ecx
mov dword [ebp - 0x32b4], eax
call fcn.004118e0
mov eax, dword [ebp - 0x3234]
add esp, 0xc
cmp dword [ebp - 0x3220], 8
mov dword [ebp - 0x3224], ebx
jae 0x4079e8
lea eax, [ebp - 0x3234]
mov edx, dword [ebp - 0x32b4]
xor ecx, ecx
mov word [edx + eax], cx
mov ecx, dword [esi + 0xa0]
mov edx, dword [ebp - 0x3234]
push 8
pop ebx
cmp dword [ebp - 0x3220], ebx
jae 0x407a11
lea edx, [ebp - 0x3234]
lea eax, [esi + 0x90]
cmp dword [eax + 0x14], ebx
jb 0x407a1e
mov eax, dword [eax]
push ecx
push edx
push eax
call fcn.0040f617
add esp, 0xc
xor edi, edi
test eax, eax
je 0x407a43
push 1
lea esi, [ebp - 0x3234]
call fcn.0040c1b5
xor eax, eax
jmp 0x407bba
mov eax, dword [esi + 0x64]
cmp eax, edi
je 0x407a83
mov ecx, dword [ebp - 0x3234]
cmp dword [ebp - 0x3220], ebx
jae 0x407a5e
lea ecx, [ebp - 0x3234]
mov edx, dword [ebp - 0x32ac]
push dword [edx]
push ecx
push edi
push dword [esi + 0x6c]
call eax
test al, al
jne 0x407a83
or dword [ebp - 0x32a8], 0xffffffff
lea esi, [ebp - 0x3234]
jmp 0x407bab
mov ecx, dword [ebp - 0x3234]
cmp dword [ebp - 0x3220], ebx
jae 0x407a97
lea ecx, [ebp - 0x3234]
lea eax, [esi + 0x48]
cmp dword [eax + 0x14], ebx
jb 0x407aa1
mov eax, dword [eax]
push edi
push ecx
push eax
push edi
mov edi, 0x800
lea eax, [ebp - 0x1218]
push edi
push eax
call fcn.0040feb6
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push 0x100
lea eax, [ebp - 0x218]
push eax
push 3
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1218]
push eax
call fcn.0040f801
push ebx
push ebx
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x2218]
push edi
push eax
call fcn.0040feb6
lea eax, [ebp - 0x2218]
add esp, 0x54
push eax
call fcn.004073c4
pop ecx
test al, al
je 0x407a71
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x407b34
test al, 1
je 0x407b34
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x180
push 0x40
push 0x8121
lea eax, [ebp - 0x1218]
push eax
lea eax, [ebp - 0x32a8]
push eax
call fcn.0040f33c
add esp, 0x14
xor edi, edi
push 1
cmp dword [ebp - 0x32a8], ebx
jg 0x407b75
cmp dword [esi + 0xac], ebx
lea esi, [ebp - 0x3234]
je 0x407baf
jmp 0x407a37
lea esi, [ebp - 0x3234]
jmp 0x407baf
cmp dword [esi + 0x84], edi
jne 0x407bb4
lea eax, [ebp - 0x326c]
push eax
mov eax, ecx
mov ecx, dword [eax + 4]
call fcn.00407101
pop ecx
mov ebx, eax
and dword [ebp - 4], 0
lea eax, [esi + 0x74]
call fcn.0040bf6c
lea esi, [ebp - 0x326c]
push 1
xor edi, edi
call fcn.0040c1b5
mov eax, dword [ebp - 0x32a8]
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.0040db3d
leave
ret 4