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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x51b350
push eax
mov al, byte [0x56e254]
mov dword fs:[0], esp
sub esp, 0x18
test al, 1
push ebx
push ebp
push esi
push edi
jne 0x403fcc
mov bl, al
push 0x55d2c8
or bl, 1
mov ecx, 0x56e250
mov byte [0x56e254], bl
call fcn.00507da8
push 0x404a70
call fcn.004f2341
add esp, 4
mov al, byte [0x56e254]
test al, 2
jne 0x403ffc
mov bl, al
push 0x55d2c0
or bl, 2
mov ecx, 0x56e24c
mov byte [0x56e254], bl
call fcn.00507da8
push 0x404a60
call fcn.004f2341
add esp, 4
mov al, byte [0x56e254]
test al, 4
jne 0x40402c
mov bl, al
push 0x55d2b8
or bl, 4
mov ecx, 0x56e248
mov byte [0x56e254], bl
call fcn.00507da8
push 0x404a50
call fcn.004f2341
add esp, 4
mov al, byte [0x56e254]
test al, 8
jne 0x40405c
mov bl, al
push 0x55d2b0
or bl, 8
mov ecx, 0x56e244
mov byte [0x56e254], bl
call fcn.00507da8
push 0x404a40
call fcn.004f2341
add esp, 4
mov al, byte [0x56e254]
test al, 0x10
jne 0x40408c
mov bl, al
push 0x55d2a8
or bl, 0x10
mov ecx, 0x56e240
mov byte [0x56e254], bl
call fcn.00507da8
push 0x404a30
call fcn.004f2341
add esp, 4
mov cl, byte [0x56e254]
mov al, 0x20
test al, cl
jne 0x4040be
mov bl, cl
push 0x55d2a0
or bl, al
mov ecx, 0x56e23c
mov byte [0x56e254], bl
call fcn.00507da8
push 0x404a20
call fcn.004f2341
add esp, 4
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x10]
push eax
call fcn.00507da8
mov ecx, dword [0x569c90]
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], ecx
mov edx, dword [0x56e244]
lea ecx, [esp + 0x10]
push edx
mov byte [esp + 0x34], 1
call fcn.00505156
mov esi, eax
test esi, esi
jl 0x4042dd
mov eax, dword [0x56e244]
lea ecx, [esp + 0x3c]
mov eax, dword [eax - 8]
add eax, esi
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00504f5c
lea ecx, [esp + 0x3c]
mov byte [esp + 0x30], 2
call fcn.005055cd
lea ecx, [esp + 0x3c]
call fcn.005056c4
push 0x5c
push 0x2f
lea ecx, [esp + 0x44]
call fcn.00504d6b
push 0x5c
lea ecx, [esp + 0x40]
call fcn.00505681
mov edx, dword [esp + 0x3c]
mov eax, dword [edx - 8]
test eax, eax
jne 0x404159
lea ecx, [esp + 0x3c]
jmp 0x404938
lea eax, [esp + 0x18]
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.00505091
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 3
call fcn.00507e73
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], 2
call fcn.00507d3a
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
push 0
push ecx
lea ebp, [esi + 0x1dc]
lea edi, [esi + 0x1e0]
push ebp
lea edx, [esi + 4]
push edi
push edx
call fcn.00403dd0
add esp, 0x14
test eax, eax
jne 0x4041b7
lea ecx, [esp + 0x3c]
jmp 0x404938
mov eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4041d0
lea ecx, [esp + 0x3c]
jmp 0x404938
and eax, 0x10
mov ecx, esi
cmp al, 0x10
jne 0x4041dd
push 0
jmp 0x4041df
push 3
call fcn.00405390
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
call fcn.00507aaf
call fcn.00403d30
add esp, 4
lea edx, [esp + 0x3c]
mov ebx, eax
push 0x5c
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
call fcn.00507aaf
lea eax, [esp + 0x24]
push eax
call fcn.00423e60
add esp, 0xc
push 0x2f
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push edi
mov byte [esp + 0x3c], 4
call fcn.00507aaf
lea ecx, [esp + 0x28]
push ecx
call fcn.00423e60
add esp, 0xc
mov ecx, esi
mov byte [esp + 0x30], 5
call fcn.00405370
cmp eax, 3
jne 0x404285
test ebx, ebx
jne 0x404285
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
push edx
push eax
call fcn.004f298c
add esp, 8
test eax, eax
je 0x404285
push 0x2f
mov ecx, edi
call fcn.0050558b
push 0x2f
mov ecx, edi
call fcn.0050813d
lea ecx, [esp + 0x1c]
push ecx
mov ecx, edi
call fcn.00508152
mov eax, dword [edi]
push 0x55cfa0
push eax
call fcn.004f27d5
add esp, 8
test eax, eax
je 0x4042a2
push 0x2f
mov ecx, edi
call fcn.0050558b
lea edx, [esp + 0x3c]
mov ecx, ebp
push edx
call fcn.00507e73
lea ecx, [esp + 0x20]
mov dword [esi + 0x1ec], 0x20003
mov byte [esp + 0x30], 4
call fcn.00507d3a
lea ecx, [esp + 0x1c]
mov byte [esp + 0x30], 2
call fcn.00507d3a
lea ecx, [esp + 0x3c]
jmp 0x4049d5
mov eax, dword [0x56e250]
lea ecx, [esp + 0x10]
push eax
call fcn.00505156
mov esi, eax
test esi, esi
jl 0x404481
mov ecx, dword [0x56e250]
lea edx, [esp + 0x3c]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x10]
add eax, esi
push eax
push edx
call fcn.00504f5c
lea ecx, [esp + 0x3c]
mov byte [esp + 0x30], 6
call fcn.005055cd
lea ecx, [esp + 0x3c]
call fcn.005056c4
lea eax, [esp + 0x20]
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.00505091
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 7
call fcn.00507e73
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], 6
call fcn.00507d3a
mov ebp, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x18]
lea edi, [ebp + 0x1e0]
push ecx
push edx
lea eax, [ebp + 4]
push edi
push eax
call fcn.00403dd0
add esp, 0x14
test eax, eax
jne 0x404383
lea ecx, [esp + 0x3c]
jmp 0x404938
mov ecx, dword [esp + 0x3c]
push 0
lea edx, [esp + 0x18]
lea esi, [ebp + 0x1dc]
push ecx
push edx
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.00403dd0
add esp, 0x14
test eax, eax
jne 0x4043b2
lea ecx, [esp + 0x3c]
jmp 0x404938
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
call fcn.00507aaf
call fcn.00403d30
mov ecx, esp
mov dword [esp + 0x3c], esp
push esi
mov ebx, eax
call fcn.00507aaf
call fcn.00403d30
add esp, 4
cmp ebx, 3
jne 0x40442c
test eax, eax
jne 0x40442c
push 0x2f
mov ecx, esi
call fcn.0050558b
push 0x2f
mov ecx, esi
call fcn.0050813d
push 0x2f
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push edi
call fcn.00507aaf
lea ecx, [esp + 0x40]
push ecx
call fcn.00423e60
add esp, 0xc
push eax
mov ecx, esi
mov byte [esp + 0x34], 8
call fcn.00508152
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], 6
call fcn.00507d3a
mov eax, dword [edi]
push 0x55cfa0
push eax
call fcn.004f27d5
add esp, 8
test eax, eax
je 0x404449
push 0x2f
mov ecx, edi
call fcn.0050558b
mov eax, dword [esi]
push 0x55cfa0
push eax
call fcn.004f27d5
add esp, 8
test eax, eax
je 0x404466
push 0x2f
mov ecx, esi
call fcn.0050558b
push ebx
mov ecx, ebp
call fcn.00405390
mov dword [ebp + 0x1ec], 0x20016
lea ecx, [esp + 0x3c]
jmp 0x4049d5
mov edx, dword [0x56e240]
lea ecx, [esp + 0x10]
push edx
call fcn.00505156
mov esi, eax
test esi, esi
jl 0x4045cc
mov eax, dword [0x56e240]
lea ecx, [esp + 0x3c]
mov eax, dword [eax - 8]
add eax, esi
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00504f5c
mov bl, 9
lea ecx, [esp + 0x3c]
mov byte [esp + 0x30], bl
call fcn.005055cd
lea ecx, [esp + 0x3c]
call fcn.005056c4
push 0x5c
push 0x2f
lea ecx, [esp + 0x44]
call fcn.00504d6b
push 0x5c
lea ecx, [esp + 0x40]
call fcn.00505681
mov edx, dword [esp + 0x3c]
mov eax, dword [edx - 8]
test eax, eax
jne 0x4044f8
lea ecx, [esp + 0x3c]
jmp 0x404938
lea eax, [esp + 0x20]
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.00505091
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 0xa
call fcn.00507e73
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], bl
call fcn.00507d3a
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x18]
lea edi, [esi + 0x1e0]
push ecx
push edx
lea eax, [esi + 4]
push edi
push eax
call fcn.00403dd0
add esp, 0x14
test eax, eax
jne 0x404553
lea ecx, [esp + 0x3c]
jmp 0x404938
mov eax, dword [edi]
push 0x55cfa0
push eax
call fcn.004f27d5
add esp, 8
test eax, eax
je 0x404570
push 0x2f
mov ecx, edi
call fcn.0050558b
push 0
mov ecx, esi
call fcn.00405390
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esi + 0x1dc]
call fcn.00507e73
mov edx, dword [esi + 0x194]
mov dword [esi + 0x1ec], 0x20003
and edx, 0xfffffff3
mov dword [esi + 0x190], 1
or edx, 0x11
mov dword [esi + 0x184], 2
mov dword [esi + 0x198], 0
mov dword [esi + 0x194], edx
lea ecx, [esp + 0x3c]
jmp 0x4049d5
mov eax, dword [0x56e248]
lea ecx, [esp + 0x10]
push eax
call fcn.00505156
mov esi, eax
test esi, esi
jl 0x40470b
mov ecx, dword [0x56e248]
lea edx, [esp + 0x3c]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x10]
add eax, esi
push eax
push edx
call fcn.00504f5c
mov bl, 0xb
lea ecx, [esp + 0x3c]
mov byte [esp + 0x30], bl
call fcn.005055cd
lea ecx, [esp + 0x3c]
call fcn.005056c4
push 0x5c
push 0x2f
lea ecx, [esp + 0x44]
call fcn.00504d6b
push 0x5c
lea ecx, [esp + 0x40]
call fcn.00505681
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x404643
lea ecx, [esp + 0x3c]
jmp 0x404938
lea ecx, [esp + 0x20]
push esi
push ecx
lea ecx, [esp + 0x18]
call fcn.00505091
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 0xc
call fcn.00507e73
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], bl
call fcn.00507d3a
mov esi, dword [esp + 0x38]
mov edx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x18]
lea edi, [esi + 0x1e0]
push edx
push eax
lea ecx, [esi + 4]
push edi
push ecx
call fcn.00403dd0
add esp, 0x14
test eax, eax
jne 0x40469e
lea ecx, [esp + 0x3c]
jmp 0x404938
mov eax, dword [edi]
push 0x55cfa0
push eax
call fcn.004f27d5
add esp, 8
test eax, eax
je 0x4046bb
push 0x2f
mov ecx, edi
call fcn.0050558b
push 0
mov ecx, esi
call fcn.00405390
lea edx, [esp + 0x3c]
lea ecx, [esi + 0x1dc]
push edx
call fcn.00507e73
mov eax, dword [esi + 0x194]
mov dword [esi + 0x190], 1
and al, 0xf3
mov dword [esi + 0x184], 2
or al, 0x11
mov dword [esi + 0x198], 0
mov dword [esi + 0x194], eax
lea ecx, [esp + 0x3c]
jmp 0x4049cb
mov ecx, dword [0x56e23c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00505156
mov esi, eax
test esi, esi
jl 0x404857
mov edx, dword [0x56e23c]
lea ecx, [esp + 0x10]
mov eax, dword [edx - 8]
add eax, esi
push eax
lea eax, [esp + 0x40]
push eax
call fcn.00504f5c
mov bl, 0xd
lea ecx, [esp + 0x3c]
mov byte [esp + 0x30], bl
call fcn.005055cd
lea ecx, [esp + 0x3c]
call fcn.005056c4
push 0x5c
push 0x2f
lea ecx, [esp + 0x44]
call fcn.00504d6b
push 0x5c
lea ecx, [esp + 0x40]
call fcn.00505681
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx - 8]
test eax, eax
jne 0x404783
lea ecx, [esp + 0x3c]
jmp 0x404938
lea edx, [esp + 0x20]
push esi
push edx
lea ecx, [esp + 0x18]
call fcn.00505091
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 0xe
call fcn.00507e73
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], bl
call fcn.00507d3a
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x18]
lea edi, [esi + 0x1e0]
push eax
push ecx
lea edx, [esi + 4]
push edi
push edx
call fcn.00403dd0
add esp, 0x14
test eax, eax
jne 0x4047de
lea ecx, [esp + 0x3c]
jmp 0x404938
mov eax, dword [edi]
push 0x55cfa0
push eax
call fcn.004f27d5
add esp, 8
test eax, eax
je 0x4047fb
push 0x2f
mov ecx, edi
call fcn.0050558b
push 0
mov ecx, esi
call fcn.00405390
lea eax, [esp + 0x3c]
lea ecx, [esi + 0x1dc]
push eax
call fcn.00507e73
mov ecx, dword [esi + 0x194]
mov dword [esi + 0x1ec], 0x20014
and ecx, 0xfffffff3
mov dword [esi + 0x190], 7
or ecx, 0x11
mov dword [esi + 0x184], 2
mov dword [esi + 0x194], ecx
mov dword [esi + 0x198], 0
lea ecx, [esp + 0x3c]
jmp 0x4049d5
mov edx, dword [0x569c90]
mov dword [esp + 0x18], edx
mov eax, dword [0x56e24c]
mov bl, 0xf
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], bl
call fcn.00505156
mov esi, eax
test esi, esi
jl 0x40490b
mov ecx, dword [0x56e24c]
lea edx, [esp + 0x3c]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x10]
add eax, esi
push eax
push edx
call fcn.00504f5c
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x34], 0x10
call fcn.00507e73
lea ecx, [esp + 0x3c]
mov byte [esp + 0x30], bl
call fcn.00507d3a
lea ecx, [esp + 0x18]
call fcn.005055cd
lea ecx, [esp + 0x18]
call fcn.005056c4
push 0x5c
push 0x2f
lea ecx, [esp + 0x20]
call fcn.00504d6b
push 0x5c
lea ecx, [esp + 0x1c]
call fcn.00505681
lea eax, [esp + 0x24]
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.00505091
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 0x11
call fcn.00507e73
lea ecx, [esp + 0x24]
mov byte [esp + 0x30], bl
call fcn.00507d3a
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
push 0
push ecx
lea ebx, [esi + 0x1dc]
lea edi, [esi + 0x1e0]
push ebx
lea edx, [esi + 4]
push edi
push edx
call fcn.00403dd0
add esp, 0x14
test eax, eax
jne 0x404976
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], 1
call fcn.00507d3a
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 0
call fcn.00507d3a
lea ecx, [esp + 0x10]
mov dword [esp + 0x30], 0xffffffff
call fcn.00507d3a
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x40498d
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebx
call fcn.00507e73
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
call fcn.00507aaf
call fcn.00403d30
add esp, 4
mov ecx, esi
push eax
call fcn.00405390
mov eax, dword [edi]
push 0x55cfa0
push eax
call fcn.004f27d5
add esp, 8
test eax, eax
je 0x4049c7
push 0x2f
mov ecx, edi
call fcn.0050558b
lea ecx, [esp + 0x18]
mov dword [esi + 0x1ec], 0x20002
mov byte [esp + 0x30], 1
call fcn.00507d3a
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 0
call fcn.00507d3a
lea ecx, [esp + 0x10]
mov dword [esp + 0x30], 0xffffffff
call fcn.00507d3a
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebp
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x24
ret