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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53b57d
mov eax, dword fs:[0]
push eax
sub esp, 0x504
mov eax, dword [0x58d984]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
push ebx
call fcn.00432450
mov esi, eax
add esp, 4
test esi, esi
js 0x431cc6
cmp word [ebx + esi*2 + 2], 0
lea eax, [ebx + esi*2]
je 0x431cc6
push eax
lea ecx, [ebp - 0x500]
call fcn.00430a70
push ebx
lea ecx, [ebp - 0x4d0]
mov dword [ebp - 4], 0
call fcn.00430a70
mov byte [ebp - 4], 1
cmp esi, dword [ebp - 0x4cc]
jae 0x431a12
mov eax, dword [ebp - 0x4d0]
xor ecx, ecx
mov dword [ebp - 0x4cc], esi
mov word [eax + esi*2], cx
mov ecx, dword [ebp - 0x4fc]
cmp ecx, 6
jbe 0x431a3b
mov eax, dword [ebp - 0x500]
push str.:_DATA
lea eax, [eax + ecx*2]
add eax, 0xfffffff4
push eax
call fcn.004312b0
add esp, 8
test al, al
jne 0x431a4b
push str.:_DATA
lea ecx, [ebp - 0x500]
call fcn.00430d90
push dword [ebp - 0x4d0]
call fcn.00432750
add esp, 4
test al, al
mov eax, dword [ebp - 0x4d0]
je 0x431aa0
cmp esi, 2
je 0x431a74
cmp esi, 3
jne 0x431aa0
cmp word [eax + 4], 0x5c
jne 0x431aa0
mov ecx, edi
call fcn.004317c0
mov eax, dword [edi + 0x28]
lea ecx, [edi + 0x28]
xor edx, edx
mov dword [ecx + 4], 0
mov word [eax], dx
cmp esi, 2
jne 0x431ab3
lea eax, [ebp - 0x4d0]
push eax
call fcn.00430b60
jmp 0x431ab3
push dword [ebp + 0xc]
mov ecx, edi
push eax
call fcn.00431980
test al, al
je 0x431cad
and dword [edi + 0x20], 0xfffffbef
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [ebp - 0x510], 0xffffffff
lea eax, [ebp - 0x4d0]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x50c]
call fcn.00430a10
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4f4]
call fcn.00430ad0
mov ecx, dword [ebp - 0x510]
mov byte [ebp - 4], 4
cmp ecx, 0xffffffff
je 0x431b4a
mov eax, dword [0x597fe8]
test eax, eax
je 0x431c3f
lea edx, [ebp - 0x268]
push edx
push ecx
call eax
test eax, eax
je 0x431c43
mov eax, dword [ebp - 0x268]
mov dword [ebp - 0x4e4], eax
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x4e0], eax
lea eax, [ebp - 0x260]
jmp 0x431bb8
cmp dword [0x597fe4], 0
mov esi, dword [ebp - 0x50c]
je 0x431c3f
push 0
call ebx
push 0
lea eax, [ebp - 0x4c0]
push eax
push 0
push esi
call dword [0x597fe4]
mov dword [ebp - 0x510], eax
cmp eax, 0xffffffff
jne 0x431b9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x431c43
cmp dword [ebp - 0x510], 0xffffffff
je 0x431c43
mov eax, dword [ebp - 0x4c0]
mov dword [ebp - 0x4e4], eax
mov eax, dword [ebp - 0x4bc]
mov dword [ebp - 0x4e0], eax
lea eax, [ebp - 0x4b8]
push eax
lea ecx, [ebp - 0x4f4]
call fcn.00430bd0
push dword [ebp - 0x500]
push dword [ebp - 0x4f4]
call fcn.00431210
add esp, 8
test al, al
jne 0x431bf3
push dword [ebp - 0x4f4]
mov byte [ebp - 4], 3
call fcn.004eda86
add esp, 4
jmp 0x431af1
mov eax, dword [ebp - 0x4f0]
cmp eax, 7
jbe 0x431c17
lea ecx, [eax - 6]
cmp ecx, eax
jae 0x431c17
mov eax, dword [ebp - 0x4f4]
xor edx, edx
mov dword [ebp - 0x4f0], ecx
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x4f4]
lea ecx, [edi + 0x28]
push eax
call fcn.00430d50
mov eax, dword [ebp - 0x4e4]
mov bl, 1
mov dword [edi], eax
mov eax, dword [ebp - 0x4e0]
mov dword [edi + 4], eax
mov byte [edi + 0x24], 1
jmp 0x431c54
push 0x78
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
jne 0x431c52
push 2
call ebx
xor bl, bl
push dword [ebp - 0x4f4]
call fcn.004eda86
push dword [ebp - 0x50c]
call fcn.004eda86
mov eax, dword [ebp - 0x510]
add esp, 8
cmp eax, 0xffffffff
je 0x431c8d
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x431c8d
mov dword [ebp - 0x510], 0xffffffff
push dword [ebp - 0x4d0]
call fcn.004eda86
push dword [ebp - 0x500]
call fcn.004eda86
add esp, 8
mov al, bl
jmp 0x431fdd
push dword [ebp - 0x4d0]
call fcn.004eda86
push dword [ebp - 0x500]
call fcn.004eda86
add esp, 8
mov dword [ebp - 0x4d8], 0xffffffff
push ebx
mov dword [ebp - 4], 5
xor esi, esi
call fcn.00432840
add esp, 4
test al, al
je 0x431ceb
mov esi, 4
lea eax, [ebx + esi*2]
push eax
mov dword [ebp - 0x4d4], eax
call fcn.00432780
add esp, 4
test al, al
je 0x431d6a
cmp word [ebx + esi*2 + 6], 0
jne 0x431d6a
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x4dc], eax
cmp eax, 0xffffffff
je 0x431f6e
test al, 0x10
je 0x431f6e
mov ecx, edi
call fcn.004317c0
mov eax, dword [ebp - 0x4dc]
lea ecx, [edi + 0x28]
push dword [ebp - 0x4d4]
mov dword [edi + 0x20], eax
call fcn.00430bd0
cmp dword [edi + 0x2c], 2
jbe 0x431d5b
mov eax, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi + 0x2c], 2
mov word [eax + 4], cx
push ebx
mov ecx, edi
call fcn.004318a0
mov cl, 1
jmp 0x431fdb
movzx eax, word [ebx]
cmp eax, 0x5c
je 0x431d7b
cmp eax, 0x2f
jne 0x431f6e
cmp word [ebx + 2], 0
push ebx
jne 0x431dc6
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x4d4], eax
cmp eax, 0xffffffff
je 0x431f6e
test al, 0x10
je 0x431f6e
mov ecx, edi
call fcn.004317c0
mov eax, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi + 0x2c], 0
mov word [eax], cx
mov cl, 1
mov eax, dword [ebp - 0x4d4]
mov dword [edi + 0x20], eax
jmp 0x431fdb
call fcn.00432500
add esp, 4
test eax, eax
je 0x431f6e
cmp word [ebx + eax*2], 0
lea esi, [ebx + eax*2]
je 0x431f6e
push esi
call fcn.004324c0
add esp, 4
test eax, eax
jns 0x431f6e
push ebx
mov ecx, edi
call fcn.004318a0
test al, al
je 0x431e11
lea ecx, [edi + 0x28]
push esi
call fcn.00430bd0
mov cl, 1
jmp 0x431fdb
push ebx
lea ecx, [ebp - 0x4d0]
call fcn.00430a70
mov ecx, dword [ebp - 0x4cc]
mov byte [ebp - 4], 6
cmp dword [ebp - 0x4c8], ecx
jne 0x431e40
lea ecx, [ebp - 0x4d0]
call fcn.00430f90
mov ecx, dword [ebp - 0x4cc]
mov eax, dword [ebp - 0x4d0]
mov edx, 0x5c
push 0x2a
mov word [eax + ecx*2], dx
inc ecx
xor edx, edx
mov word [eax + ecx*2], dx
mov dword [ebp - 0x4cc], ecx
lea ecx, [ebp - 0x4d0]
call fcn.00431780
push edi
push dword [ebp - 0x4d0]
lea ecx, [ebp - 0x4d8]
mov byte [ebp - 0x4c1], 0
call fcn.00432000
test al, al
je 0x431ed7
lea eax, [edi + 0x28]
mov ecx, 0x545900
mov dword [ebp - 0x4d4], eax
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x431ebc
test dx, dx
je 0x431eb8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x431ebc
add eax, 4
add ecx, 4
test dx, dx
jne 0x431e96
xor eax, eax
jmp 0x431ec1
sbb eax, eax
or eax, 1
test eax, eax
jne 0x431ed0
mov ecx, dword [ebp - 0x4d4]
jmp 0x431f50
mov byte [ebp - 0x4c1], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x4dc], eax
cmp eax, 0xffffffff
jne 0x431ef1
or eax, eax
mov dword [ebp - 0x4dc], eax
cmp byte [ebp - 0x4c1], 0
jne 0x431f2f
cmp eax, 0xffffffff
je 0x431f03
test al, 0x10
jne 0x431f2f
push dword [ebp - 0x4d0]
mov byte [ebp - 4], 5
call fcn.004eda86
mov esi, dword [ebp - 0x4d8]
add esp, 4
cmp esi, 0xffffffff
je 0x431f6e
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x431f6e
xor cl, cl
jmp 0x431f9f
mov ecx, edi
call fcn.004317c0
mov eax, dword [ebp - 0x4dc]
cmp eax, 0xffffffff
je 0x431f46
mov dword [edi + 0x20], eax
jmp 0x431f4d
mov dword [edi + 0x20], 0x10
lea ecx, [edi + 0x28]
push esi
call fcn.00430bd0
push dword [ebp - 0x4d0]
call fcn.004eda86
mov esi, dword [ebp - 0x4d8]
add esp, 4
mov cl, 1
jmp 0x431fc3
lea eax, [ebp - 0x260]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x4d8], esi
cmp esi, 0xffffffff
jne 0x431f8d
xor cl, cl
jmp 0x431f9f
lea eax, [ebp - 0x260]
push edi
push eax
call fcn.00431840
add esp, 8
mov cl, 1
cmp byte [ebp + 0xc], 0
mov byte [ebp - 0x4c1], cl
je 0x431fc9
test cl, cl
je 0x431fc9
mov eax, dword [edi + 0x20]
shr eax, 0xa
test al, 1
je 0x431fc9
push ebx
mov ecx, edi
call fcn.004318a0
mov cl, al
mov byte [ebp - 0x4c1], cl
cmp esi, 0xffffffff
je 0x431fdb
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov cl, byte [ebp - 0x4c1]
mov al, cl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004eda39
mov esp, ebp
pop ebp
ret 8