Function at 0x402317
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
push edi
push 0x22
pop eax
push dword [ebp + 8]
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 4], eax
mov edi, eax
lea eax, [ebp - 0x408]
push eax
call ebx
mov esi, eax
push 2
pop edx
movzx eax, word [esi]
test ax, ax
je 0x40243d
mov ecx, eax
lea ebx, [esi + 2]
push 0x2f
pop eax
cmp cx, ax
jne 0x402425
add esi, edx
add ebx, edx
movzx eax, word [esi]
cmp eax, 0x64
ja 0x4023a7
je 0x40239b
sub eax, 0x44
je 0x40239b
sub eax, 1
je 0x4023c3
sub eax, 3
je 0x4023b5
sub eax, 6
je 0x4023ac
sub eax, 1
jne 0x402425
mov dword [0x41ce50], 1
jmp 0x4023bf
mov dword [0x41ce58], 1
jmp 0x4023bf
sub eax, 0x65
jmp 0x40237a
and dword [0x41ce54], 0
jmp 0x4023bf
mov dword [0x41ce5c], 1
mov edi, ebx
jmp 0x402425
add esi, edx
add ebx, edx
cmp word [esi], 0x3a
jne 0x402425
push 0x22
add esi, edx
add ebx, edx
pop ecx
push 0x20
pop eax
cmp word [esi], cx
jne 0x4023e6
mov word [esi], ax
add esi, edx
add ebx, edx
push ecx
jmp 0x4023e7
push eax
push esi
call fcn.004061f9
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4023fa
xor eax, eax
mov word [edi], ax
push esi
push 0x41cd50
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
test edi, edi
je 0x402412
push 0x20
pop eax
mov word [edi], ax
jmp 0x40241f
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax - 1]
lea edi, [esi + edi*2]
push 2
add edi, 2
pop edx
add esi, edx
add ebx, edx
movzx eax, word [esi]
mov ecx, eax
test ax, ax
jne 0x402358
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [0x41ce58]
xor ecx, ecx
cmp word [0x41cd50], cx
push 0x22
cmove eax, ecx
mov dword [0x41ce58], eax
lea eax, [ebp - 0x408]
push eax
call fcn.004061f9
mov esi, dword [ebp + 0xc]
pop ecx
pop ecx
test eax, eax
je 0x4024f0
push 0x20
pop ecx
jmp 0x402476
add eax, 2
cmp word [eax], cx
je 0x402473
xor edi, edi
lea ecx, [ebp - 8]
push edi
push ecx
push eax
call fcn.0040a5f9
add esp, 0xc
test eax, eax
je 0x402543
cmp word [eax], di
je 0x402543
push eax
push esi
call ebx
push edi
lea eax, [ebp - 8]
push eax
push edi
call fcn.0040a5f9
add esp, 0xc
test eax, eax
je 0x402543
push 0x20
pop ecx
cmp word [eax], cx
jne 0x402543
push edi
lea eax, [ebp - 8]
push eax
push edi
call fcn.0040a5f9
mov edi, eax
add esp, 0xc
test edi, edi
je 0x402543
xor eax, eax
cmp word [edi], ax
je 0x402543
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
je 0x402543
push edi
push 0x41cb48
jmp 0x402541
test edi, edi
jne 0x4024fd
lea eax, [ebp - 0x408]
push eax
jmp 0x402540
movzx eax, word [edi]
test ax, ax
jne 0x40252f
push 0x2f
pop eax
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.004061f9
pop ecx
pop ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x408]
push eax
push esi
call ebx
push esi
call fcn.004032f3
pop ecx
jmp 0x402543
push 0x20
pop ecx
cmp ax, cx
jne 0x40253f
add edi, 2
cmp word [edi], cx
je 0x402537
push edi
push esi
call ebx
xor ebx, ebx
cmp word [esi], bx
je 0x402570
push esi
call fcn.004032f3
pop ecx
push ebx
push ebx
push ebx
push ebx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
je 0x40256c
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
je 0x402570
xor eax, eax
jmp 0x402573
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret