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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45f030
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x268
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], 0
xor esi, esi
call fcn.004158c3
mov ecx, eax
test ecx, ecx
jne 0x404a81
push 0x80004005
call fcn.0040f120
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 1
mov eax, dword [ebx + 0x48]
cmp eax, 1
je 0x404d40
test eax, eax
je 0x404d40
push ecx
lea ecx, [ebp + 8]
call fcn.0040cf40
push str..
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040ca60
add esp, 0xc
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.0040f050
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404aee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x274]
push eax
push edi
mov dword [0x481f14], 0x4719bc
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x404b40
cmp byte [ebx + 0x2c], 0
je 0x404b25
mov dword [ebx + 0x28], 0
xor esi, esi
jmp 0x404db9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x28], eax
mov esi, 0x10
jmp 0x404db9
mov ecx, 0x4719d0
lea eax, [ebp - 0x248]
jmp 0x404b50
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404b76
test dx, dx
je 0x404b72
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404b76
add eax, 4
add ecx, 4
test dx, dx
jne 0x404b50
xor eax, eax
jmp 0x404b7b
sbb eax, eax
or eax, 1
test eax, eax
je 0x404d1d
mov ecx, 0x4719d4
lea eax, [ebp - 0x248]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404bb6
test dx, dx
je 0x404bb2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404bb6
add eax, 4
add ecx, 4
test dx, dx
jne 0x404b90
xor eax, eax
jmp 0x404bbb
sbb eax, eax
or eax, 1
test eax, eax
je 0x404d1d
mov eax, dword [ebp - 0x274]
test al, 0x10
je 0x404c9c
test eax, 0x400
jne 0x404d1d
mov eax, dword [ebx + 0x48]
cmp eax, 2
je 0x404be9
cmp eax, 6
jne 0x404c5d
add dword [0x487440], 1
lea eax, [ebp + 8]
push 1
adc dword [0x487444], 0
push 0x472cf0
push eax
lea eax, [ebp - 0x14]
mov dword [0x481f14], 0x4719dc
push eax
call fcn.0040ca60
add esp, 8
mov byte [ebp - 4], 3
mov ecx, esp
lea edx, [ebp - 0x248]
push edx
push eax
push ecx
call fcn.0040ca60
add esp, 0xc
mov ecx, ebx
call dword [ebp + 0xc]
mov byte [ebp - 4], 1
mov esi, eax
mov edx, dword [ebp - 0x14]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404c55
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x404db9
push dword [ebp + 0xc]
lea eax, [ebp + 8]
push 0x472cf0
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0040ca60
add esp, 8
mov byte [ebp - 4], 4
mov ecx, esp
lea edx, [ebp - 0x248]
push edx
push eax
push ecx
call fcn.0040ca60
add esp, 0xc
mov ecx, ebx
call fcn.00404a40
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x20]
jmp 0x404cfb
mov eax, dword [ebx + 0x48]
cmp eax, 4
je 0x404ca9
cmp eax, 6
jne 0x404d1d
add dword [0x487440], 1
lea eax, [ebp + 8]
push 0
adc dword [0x487444], 0
push 0x472cf0
push eax
lea eax, [ebp - 0x24]
mov dword [0x481f14], 0x4719f8
push eax
call fcn.0040ca60
add esp, 8
mov byte [ebp - 4], 5
mov ecx, esp
lea edx, [ebp - 0x248]
push edx
push eax
push ecx
call fcn.0040ca60
add esp, 0xc
mov ecx, ebx
call dword [ebp + 0xc]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x24]
mov esi, eax
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404d15
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x404db9
lea eax, [ebp - 0x274]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404b40
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x404db9
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040eb20
mov esi, dword [ebp - 0x14]
push esi
mov byte [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404d70
test al, 0x10
mov ecx, 1
movzx eax, byte [ebp - 0x10]
cmovne eax, ecx
mov byte [ebp - 0x10], al
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x404d88
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x10]
add dword [0x487440], 1
lea eax, [ebp + 8]
push ecx
adc dword [0x487444], 0
mov ecx, esp
push eax
mov dword [0x481f14], 0x471998
mov dword [ebp - 0x18], ecx
call fcn.0040eb20
mov ecx, ebx
call dword [ebp + 0xc]
mov esi, eax
or ebx, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x404dd7
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x404df6
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8