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

Disassembly:
sub esp, 0x24c
mov eax, dword [0x449250]
xor eax, esp
mov dword [esp + 0x248], eax
push ebx
mov ebx, ecx
cmp byte [ebx + 0x11c], 0
push esi
push edi
lea eax, [ebx + 0xc]
jne 0x40b148
mov eax, dword [ebx + 8]
mov esi, 0x3a
cmp word [eax + 6], si
jne 0x40b22e
cmp byte [ebx + 0x11c], 0
lea eax, [ebx + 0xc]
jne 0x40b166
mov eax, dword [ebx + 8]
cmp word [eax + 8], 0
jne 0x40b22e
push ebx
lea edi, [esp + 0x134]
call fcn.0040be00
push 0x441820
push 0x441f54
mov edx, edi
call fcn.0040c340
add esp, 8
cmp byte [esp + 0x24c], 0
lea eax, [esp + 0x13c]
jne 0x40b1aa
mov eax, dword [esp + 0x138]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
mov dword [esp + method.t_str.virtual_0], vtable.t_str.0
cmp eax, 0xffffffff
jne 0x40b203
cmp byte [esp + 0x24c], 0
jne 0x40b1e9
mov eax, dword [esp + 0x138]
lea ecx, [esp + 0x13c]
cmp eax, ecx
je 0x40b1e9
push eax
call fcn.004229f3
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.004223b0
add esp, 0x24c
ret
mov ebx, eax
shr ebx, 4
and bl, 1
cmp byte [esp + 0x24c], 0
jne 0x40b3a4
mov eax, dword [esp + 0x138]
lea edx, [esp + 0x13c]
cmp eax, edx
jmp 0x40b399
push ebx
lea edi, [esp + 0x10]
call fcn.0040be00
cmp byte [ebx + 0x11c], 0
lea eax, [ebx + 0xc]
jne 0x40b247
mov eax, dword [ebx + 8]
cmp word [eax + 6], si
jne 0x40b279
cmp byte [ebx + 0x11c], 0
lea eax, [ebx + 0xc]
jne 0x40b25c
mov eax, dword [ebx + 8]
cmp word [eax + 8], 0x5c
jne 0x40b279
cmp byte [ebx + 0x11c], 0
lea eax, [ebx + 0xc]
jne 0x40b272
mov eax, dword [ebx + 8]
cmp word [eax + 0xa], 0
je 0x40b2c9
mov eax, dword [ebx + 4]
test eax, eax
je 0x40b2c9
cmp byte [ebx + 0x11c], 0
lea ecx, [ebx + 0xc]
jne 0x40b28f
mov ecx, dword [ebx + 8]
movzx ecx, word [ecx + eax*2 + 2]
cmp cx, 0x5c
jne 0x40b2c9
dec eax
lea ecx, [eax + 1]
lea esi, [esp + 0x14]
mov dword [esp + 0x10], eax
mov edi, eax
call fcn.0040c6d0
cmp byte [esp + 0x128], 0
lea eax, [esp + 0x18]
jne 0x40b2bf
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov word [eax + edi*2 + 4], cx
lea esi, [ecx + 0x3a]
cmp byte [esp + 0x128], 0
lea eax, [esp + 0x18]
jne 0x40b2db
mov eax, dword [esp + 0x14]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40b30f
cmp byte [esp + 0x128], 0
mov dword [esp + 0xc], vtable.t_str.0
jne 0x40b1e9
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
cmp eax, edx
jmp 0x40b1de
cmp byte [ebx + 0x11c], 0
lea ecx, [ebx + 0xc]
jne 0x40b31e
mov ecx, dword [ebx + 8]
cmp word [ecx + 6], si
jne 0x40b375
cmp byte [ebx + 0x11c], 0
lea ecx, [ebx + 0xc]
jne 0x40b333
mov ecx, dword [ebx + 8]
cmp word [ecx + 8], 0x5c
jne 0x40b375
cmp byte [ebx + 0x11c], 0
je 0x40b348
add ebx, 0xc
jmp 0x40b34b
mov ebx, dword [ebx + 8]
cmp word [ebx + 0xa], 0
jne 0x40b375
lea ecx, [esp + 0xc]
call fcn.0040bef0
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.004223b0
add esp, 0x24c
ret
mov ebx, eax
shr ebx, 4
and bl, 1
cmp byte [esp + 0x128], 0
mov dword [esp + 0xc], vtable.t_str.0
jne 0x40b3a4
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
cmp eax, ecx
je 0x40b3a4
push eax
call fcn.004229f3
add esp, 4
mov ecx, dword [esp + 0x254]
pop edi
pop esi
mov al, bl
pop ebx
xor ecx, esp
call fcn.004223b0
add esp, 0x24c
ret