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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov edi, ecx
sub esp, 0x51c
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call fcn.004b7fa0
test eax, eax
js 0x4b4c56
mov esi, eax
lea eax, [eax + 1]
cmp word [ebx + eax*2], 0
lea edx, [eax + eax]
mov dword [ebp - 0x50c], edx
jne 0x4b4d23
lea eax, [ebp - 0x270]
mov dword [ebp - 0x4c8], 0xffffffff
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
sub esp, 8
cmp eax, 0xffffffff
mov dword [ebp - 0x4c8], eax
je 0x4b4f80
mov eax, dword [ebp - 0x270]
mov edx, dword [ebp - 0x268]
mov ebx, dword [ebp - 0x254]
mov ecx, dword [ebp - 0x250]
mov byte [edi + 0x24], 0
mov byte [edi + 0x25], 0
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x26c]
mov dword [edi + 0xc], edx
mov edx, dword [ebp - 0x260]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x264]
mov dword [edi + 0x14], edx
mov edx, dword [ebp - 0x258]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x25c]
mov dword [edi + 0x1c], edx
mov edx, ebx
xor ebx, ebx
mov dword [edi + 0x18], eax
xor eax, eax
add eax, ecx
lea ecx, [edi + 0x28]
mov dword [edi], eax
lea eax, [ebp - 0x244]
adc edx, ebx
mov dword [edi + 4], edx
mov dword [esp], eax
call fcn.00472ad0
sub esp, 4
mov esi, 1
mov eax, dword [ebp - 0x4c8]
cmp eax, 0xffffffff
je 0x4b4d17
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindClose]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret 4
lea eax, [ebx + edx - 2]
lea ecx, [ebp - 0x508]
mov dword [esp], eax
call fcn.00472990
lea ecx, [ebp - 0x4fc]
sub esp, 4
mov dword [esp], ebx
call fcn.00472990
sub esp, 4
cmp esi, dword [ebp - 0x4f8]
jae 0x4b4d6a
mov eax, dword [ebp - 0x4fc]
mov edx, dword [ebp - 0x50c]
xor ecx, ecx
mov dword [ebp - 0x4f8], esi
mov word [eax + edx - 2], cx
mov eax, dword [ebp - 0x504]
cmp eax, 6
ja 0x4b4f50
lea ecx, [ebp - 0x508]
mov dword [esp], 0x7330dc
call fcn.00472e80
sub esp, 4
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call fcn.004b7e00
test al, al
jne 0x4b4df0
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
mov ecx, edi
call fcn.004b4c20
sub esp, 4
test al, al
jne 0x4b56ac
mov eax, dword [ebp - 0x4fc]
test eax, eax
je 0x4b4dcd
mov dword [esp], eax
call fcn.006e9860
mov eax, dword [ebp - 0x508]
test eax, eax
je 0x4b4c56
mov dword [esp], eax
call fcn.006e9860
jmp 0x4b4c56
cmp esi, 2
je 0x4b5400
cmp esi, 3
jne 0x4b4da0
mov eax, dword [ebp - 0x4fc]
cmp word [eax + 4], 0x5c
jne 0x4b4da6
mov eax, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], 0
mov byte [edi + 0x24], 0
mov byte [edi + 0x25], 0
mov dword [edi + 0x2c], 0
mov word [eax], cx
xor eax, eax
nop
mov dword [edi + 0x20], eax
lea eax, [ebp - 0x4fc]
lea ecx, [ebp - 0x4ec]
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x4f0], 0xffffffff
call fcn.00472a10
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov esi, esi
lea edi, [edi]
lea ecx, [ebp - 0x4e0]
call fcn.00472910
mov eax, dword [ebp - 0x4f0]
cmp eax, 0xffffffff
je 0x4b5360
mov edx, dword [0x855bb0]
test edx, edx
je 0x4b53e2
lea ecx, [ebp - 0x4c8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call edx
sub esp, 8
test eax, eax
jne 0x4b52f3
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x26
je 0x4b5263
xor esi, esi
mov eax, dword [ebp - 0x4e0]
test eax, eax
je 0x4b4ef7
mov dword [esp], eax
call fcn.006e9860
mov eax, dword [ebp - 0x4ec]
test eax, eax
je 0x4b4f09
mov dword [esp], eax
call fcn.006e9860
mov eax, dword [ebp - 0x4f0]
cmp eax, 0xffffffff
je 0x4b4f20
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindClose]
sub esp, 4
mov eax, dword [ebp - 0x4fc]
test eax, eax
je 0x4b4f32
mov dword [esp], eax
call fcn.006e9860
mov eax, dword [ebp - 0x508]
test eax, eax
je 0x4b4d17
mov dword [esp], eax
call fcn.006e9860
jmp 0x4b4d17
mov edx, dword [ebp - 0x508]
mov dword [esp + 4], str.:_DATA
lea eax, [edx + eax*2 - 0xc]
mov dword [esp], eax
call fcn.00470a60
test al, al
je 0x4b4d79
jmp 0x4b4d8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov dword [ebp - 0x50c], eax
je 0x4b4fd0
cmp eax, 0x35
je 0x4b4fd0
cmp eax, 0x43
mov esi, eax
sete dl
cmp eax, 0x7b
sete al
or dl, al
jne 0x4b4fd0
cmp esi, 0xa1
je 0x4b4fd0
xor esi, esi
mov eax, dword [ebp - 0x4c8]
cmp eax, 0xffffffff
jne 0x4b4d0b
jmp 0x4b4d17
mov dword [esp], ebx
call fcn.004b7e20
cmp al, 1
movzx ecx, word [ebx]
sbb edx, edx
and edx, 0xfffffff8
add edx, 0xe
cmp al, 1
sbb eax, eax
not eax
and eax, 8
cmp cx, 0x5c
mov dword [ebp - 0x510], eax
sete al
cmp cx, 0x2f
sete cl
or al, cl
mov esi, eax
je 0x4b5013
cmp word [ebx + 2], 0
je 0x4b5280
mov eax, dword [ebp - 0x510]
mov dword [ebp - 0x514], edx
add eax, ebx
mov dword [esp], eax
mov dword [ebp - 0x510], eax
call fcn.004b7720
test al, al
mov esi, eax
jne 0x4b51c0
mov dword [esp], ebx
call fcn.004b7ae0
test eax, eax
je 0x4b4fb0
lea esi, [ebx + eax*2]
cmp word [esi], 0
je 0x4b4fb0
mov dword [esp], esi
call fcn.004b7680
test eax, eax
jns 0x4b4fb0
lea ecx, [ebp - 0x270]
mov dword [esp], ebx
call fcn.00472990
push eax
mov eax, dword [ebp - 0x26c]
cmp dword [ebp - 0x268], eax
je 0x4b55ed
mov edx, dword [ebp - 0x270]
mov eax, dword [ebp - 0x26c]
mov ecx, edx
mov dword [ebp - 0x514], edx
lea edx, [eax + 1]
cmp edx, dword [ebp - 0x268]
mov word [ecx + eax*2], 0x5c
mov word [ecx + eax*2 + 2], 0
mov dword [ebp - 0x26c], edx
je 0x4b55c5
mov eax, dword [ebp - 0x26c]
mov edx, dword [ebp - 0x514]
mov word [edx + eax*2], 0x2a
mov word [edx + eax*2 + 2], 0
add eax, 1
mov dword [ebp - 0x26c], eax
mov eax, dword [ebp - 0x4c8]
cmp eax, 0xffffffff
je 0x4b5106
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
push ecx
je 0x4b54db
mov dword [ebp - 0x4c8], 0xffffffff
mov edx, dword [ebp - 0x514]
lea eax, [ebp - 0x4c8]
mov dword [esp + 4], edi
mov ecx, eax
mov dword [ebp - 0x510], eax
mov dword [esp], edx
call fcn.004b4750
test al, al
mov byte [ebp - 0x514], al
push edx
push edx
je 0x4b54db
mov eax, dword [edi + 0x28]
mov dword [esp + 4], 0x7330d8
mov dword [esp], eax
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x4b55b5
lea eax, [ebp - 0x4c8]
mov dword [esp], ebx
mov dword [ebp - 0x510], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
push edx
je 0x4b555d
cmp byte [ebp - 0x514], 0
jne 0x4b54e7
test al, 0x10
jne 0x4b54e7
mov eax, dword [ebp - 0x50c]
mov dword [esp], eax
lea eax, [ebp - 0x4c8]
mov dword [ebp - 0x510], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x270]
push ecx
test eax, eax
je 0x4b4fb0
mov dword [esp], eax
xor esi, esi
call fcn.006e9860
jmp 0x4b4fb2
mov edx, dword [ebp - 0x514]
cmp word [ebx + edx], 0
jne 0x4b5039
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x4b4fb0
test al, 0x10
je 0x4b4fb0
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x510]
lea ecx, [edi + 0x28]
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], 0
mov byte [edi + 0x24], 0
mov byte [edi + 0x25], 0
mov dword [esp], eax
call fcn.00472ad0
sub esp, 4
cmp dword [edi + 0x2c], 2
jbe 0x4b4d00
mov eax, dword [edi + 0x28]
xor edx, edx
mov dword [edi + 0x2c], 2
mov word [eax + 4], dx
jmp 0x4b4d00
mov dword [esp], 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x4b4ee3
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x4b4fb0
test al, 0x10
je 0x4b4fb0
mov edx, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], 0
mov byte [edi + 0x24], 0
mov byte [edi + 0x25], 0
mov dword [edi + 0x2c], 0
mov word [edx], cx
mov dword [edi + 0x20], eax
jmp 0x4b4d00
mov eax, dword [ebp - 0x4c8]
mov edx, dword [ebp - 0x4c4]
lea ecx, [ebp - 0x4e0]
mov dword [ebp - 0x4d0], eax
lea eax, [ebp - 0x4c0]
mov dword [ebp - 0x4cc], edx
mov dword [esp], eax
call fcn.00472ad0
mov eax, dword [ebp - 0x508]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4e0]
mov dword [esp], eax
call fcn.00470790
test al, al
mov esi, eax
jne 0x4b5476
mov eax, dword [ebp - 0x4e0]
test eax, eax
je 0x4b4e90
mov dword [esp], eax
call fcn.006e9860
jmp 0x4b4e90
mov esi, dword [0x855bb4]
test esi, esi
je 0x4b53e2
mov esi, dword [ebp - 0x4ec]
mov dword [esp], 0
call ebx
lea eax, [ebp - 0x270]
sub esp, 4
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [0x855bb4]
sub esp, 0x10
cmp eax, 0xffffffff
mov dword [ebp - 0x4f0], eax
je 0x4b54b8
mov eax, dword [ebp - 0x270]
mov edx, dword [ebp - 0x26c]
lea ecx, [ebp - 0x4e0]
mov dword [ebp - 0x4d0], eax
lea eax, [ebp - 0x268]
mov dword [ebp - 0x4cc], edx
mov dword [esp], eax
call fcn.00472ad0
jmp 0x4b531f
mov dword [esp], 0x78
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x4b4ed2
mov eax, dword [edi + 0x28]
xor edx, edx
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
lea ecx, [edi + 0x28]
mov dword [edi + 8], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x20], 0
mov byte [edi + 0x24], 0
mov byte [edi + 0x25], 0
mov dword [edi + 0x2c], 0
mov word [eax], dx
lea eax, [ebp - 0x4fc]
mov dword [esp], eax
call fcn.00472b80
mov eax, dword [edi + 0x20]
sub esp, 4
and eax, 0xfffffbef
jmp 0x4b4e50
mov eax, dword [ebp - 0x4dc]
cmp eax, 7
jbe 0x4b548a
add eax, 0xfffffffa
jb 0x4b5674
lea eax, [ebp - 0x4e0]
lea ecx, [edi + 0x28]
mov dword [esp], eax
call fcn.00472f80
mov eax, dword [ebp - 0x4d0]
mov edx, dword [ebp - 0x4cc]
sub esp, 4
mov byte [edi + 0x24], 1
mov dword [edi], eax
mov dword [edi + 4], edx
jmp 0x4b4ee5
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x26
je 0x4b4ed8
cmp dword [ebp - 0x4f0], 0xffffffff
je 0x4b4ed8
jmp 0x4b53b1
mov byte [ebp - 0x514], 0
jmp 0x4b5151
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], 0
mov byte [edi + 0x24], 0
mov byte [edi + 0x25], 0
mov dword [edi + 0x20], eax
lea eax, [ebp - 0x4c8]
lea ecx, [edi + 0x28]
mov dword [esp], esi
mov dword [ebp - 0x510], eax
call fcn.00472ad0
mov eax, dword [ebp - 0x270]
push ebx
test eax, eax
je 0x4b5553
mov dword [esp], eax
call fcn.006e9860
mov esi, 1
jmp 0x4b4d00
cmp byte [ebp - 0x514], 0
je 0x4b5185
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], 0
mov byte [edi + 0x24], 0
mov byte [edi + 0x25], 0
mov dword [edi + 0x20], 0x10
jmp 0x4b5529
lea ecx, [edi + 0x28]
mov dword [esp], esi
call fcn.00472ad0
jmp 0x4b5540
lea eax, [ebp - 0x4c8]
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x510], eax
call fcn.004723e0
mov eax, dword [ebp - 0x270]
mov dword [ebp - 0x514], eax
jmp 0x4b50bd
lea eax, [ebp - 0x4c8]
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x510], eax
call fcn.004723e0
jmp 0x4b5087
mov edx, dword [ebp - 0x4e0]
mov dword [ebp - 0x4dc], eax
mov word [edx + eax*2], 0
jmp 0x4b548a
mov eax, dword [edi + 0x20]
and eax, 0xfffffbef
jmp 0x4b4e50