Function at 0x410240
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x14
push ebp
push edi
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x41079c
push ebp
call fcn.0040b350
add esp, 4
test eax, eax
jne 0x41079c
push ebx
push esi
push ebp
call fcn.004107b0
mov esi, eax
add esp, 4
test esi, esi
je 0x4104f6
call fcn.00411350
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x41077b
mov ebp, esi
push ebp
call fcn.0040b350
add esp, 4
test eax, eax
je 0x41043f
mov dword [esp + 0x1c], str.system32_
lea ebx, [esp + 0x1c]
mov dword [esp + 0x20], str.SystemRoot_system32_
nop word [eax + eax]
mov ecx, dword [ebx]
mov esi, ecx
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4102c7
sub esi, edx
sar esi, 1
push esi
push ecx
push ebp
call fcn.0045a8ca
add esp, 0xc
test eax, eax
je 0x4102f5
add ebx, 4
lea eax, [esp + 0x24]
cmp ebx, eax
jb 0x4102c0
jmp 0x4103ea
mov edi, dword [esp + 0x14]
lea esi, [esi*2]
mov ecx, edi
add esi, ebp
mov dword [esp + 0x1c], esi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410310
sub ecx, edx
sar ecx, 1
test esi, esi
jne 0x41034c
lea esi, [ecx + 1]
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4103e8
push dword [esp + 0x14]
push esi
push edi
call fcn.0040f5c0
jmp 0x4103da
mov edx, esi
lea eax, [edx + 2]
mov dword [esp + 0x18], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x410355
sub edx, dword [esp + 0x18]
sar edx, 1
test ecx, ecx
je 0x410383
cmp word [edi + ecx*2 - 2], 0x5c
je 0x410383
test edx, edx
je 0x410383
cmp word [esi], 0x5c
je 0x410383
mov eax, 1
jmp 0x410385
xor eax, eax
mov dword [esp + 0x18], eax
add eax, ecx
add eax, edx
lea esi, [eax*2 + 2]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4103ea
push dword [esp + 0x14]
push esi
push edi
call fcn.0040f460
test eax, eax
js 0x4103de
cmp dword [esp + 0x18], 0
je 0x4103cc
push 0x48909c
push esi
push edi
lfence
call fcn.0040f3c0
test eax, eax
js 0x4103de
lfence
push dword [esp + 0x1c]
push esi
push edi
call fcn.0040f3c0
test eax, eax
jns 0x4103ea
push edi
lfence
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
lea eax, [esp + 0x24]
cmp ebx, eax
jne 0x4104eb
movzx eax, word [ebp]
cmp eax, 0x5c
je 0x410432
cmp eax, 0x2f
je 0x410432
push eax
call fcn.0045a070
add esp, 4
test eax, eax
je 0x4104eb
cmp word [ebp + 2], 0x3a
jne 0x4104eb
movzx eax, word [ebp + 4]
cmp eax, 0x5c
je 0x410432
cmp eax, 0x2f
jne 0x4104eb
push dword [esp + 0x14]
mov edi, ebp
xor esi, esi
jmp 0x410775
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410444
sub ecx, edx
mov edx, ebp
sar ecx, 1
lea esi, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x410460
sub edx, esi
sar edx, 1
test ecx, ecx
je 0x41048d
cmp word [ebx + ecx*2 - 2], 0x5c
je 0x41048d
test edx, edx
je 0x41048d
cmp word [ebp], 0x5c
je 0x41048d
mov ebx, 1
jmp 0x41048f
xor ebx, ebx
lea eax, [ebx + edx]
add eax, ecx
lea esi, [eax*2 + 2]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4104eb
push dword [esp + 0x14]
push esi
push edi
call fcn.0040f460
test eax, eax
js 0x4104df
test ebx, ebx
je 0x4104d0
push 0x48909c
push esi
push edi
lfence
call fcn.0040f3c0
test eax, eax
js 0x4104df
push ebp
push esi
push edi
lfence
call fcn.0040f3c0
test eax, eax
jns 0x4104eb
push edi
lfence
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
push dword [esp + 0x14]
mov esi, ebp
jmp 0x410775
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7e
jne 0x41066d
mov esi, ebp
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x410510
sub esi, ecx
push ebp
sar esi, 1
call fcn.0040c130
mov ecx, eax
add esp, 4
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410530
sub ecx, edx
sar ecx, 1
sub ecx, edi
je 0x41062e
sub ecx, 1
je 0x41058b
mov ecx, ebp
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410551
sub ecx, edx
sar ecx, 1
lea ebx, [ecx + 1]
lea eax, [ebx + ebx]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x41066d
push ebp
push ebx
push esi
call fcn.0040f5c0
test eax, eax
jns 0x41060d
jmp 0x410601
lea ecx, [esi - 1]
mov dword [esp + 0x1c], ecx
test ecx, ecx
js 0x41066d
mov ebx, ebp
lfence
lea edx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x4105a2
sub ebx, edx
sar ebx, 1
cmp ecx, ebx
cmovb ebx, ecx
inc ebx
lea eax, [ebx + ebx]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x41066d
test ebx, ebx
je 0x410601
cmp ebx, 0x7fffffff
ja 0x4105f8
mov eax, dword [esp + 0x1c]
cmp eax, 0x7ffffffe
ja 0x4105fc
push eax
push ebp
push 0
push ebx
push esi
lfence
call fcn.0040f630
test eax, eax
jns 0x41060d
jmp 0x410601
test ebx, ebx
je 0x410601
xor eax, eax
mov word [esi], ax
push esi
lfence
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
test esi, esi
je 0x41066d
push 0x37e4
call fcn.0040e470
add esp, 4
test eax, eax
je 0x410689
push 0
call fcn.00410f90
add esp, 4
jmp 0x41068e
lea ebx, [esi*2 + 0xa]
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x41066d
push ebp
push ebx
push esi
call fcn.0040f460
lfence
test eax, eax
js 0x410666
push str..dll
push ebx
push esi
call fcn.0040f3c0
test eax, eax
jns 0x410611
lfence
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41067f
push 0x7e
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebx
mov eax, edi
pop edi
pop ebp
add esp, 0x14
ret
call fcn.00411350
mov ebx, eax
test ebx, ebx
je 0x41077b
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4106a0
sub ecx, edx
mov edx, esi
sar ecx, 1
lea edi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4106b4
sub edx, edi
sar edx, 1
test ecx, ecx
je 0x4106e0
cmp word [ebx + ecx*2 - 2], 0x5c
je 0x4106e0
test edx, edx
je 0x4106e0
cmp word [esi], 0x5c
je 0x4106e0
mov eax, 1
jmp 0x4106e2
xor eax, eax
mov dword [esp + 0x18], eax
add eax, edx
add eax, ecx
lea ebp, [eax*2 + 2]
push ebp
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x410774
push ebx
push ebp
push edi
call fcn.0040f460
test eax, eax
jns 0x410711
lfence
jmp 0x41076b
cmp dword [esp + 0x18], 0
je 0x410730
push 0x48909c
push ebp
push edi
lfence
call fcn.0040f3c0
test eax, eax
jns 0x410730
lfence
jmp 0x41076b
push esi
push ebp
push edi
lfence
call fcn.0040f3c0
test eax, eax
jns 0x410744
lfence
jmp 0x41076b
test edi, edi
je 0x410774
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x410758
test al, 0x50
je 0x410774
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x41076b
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x41066d
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebx
mov eax, edi
pop edi
pop ebp
add esp, 0x14
ret
push 0xa0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop ebp
add esp, 0x14
ret