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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x86eaa8
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push ebp
push esi
mov esi, dword [esp + 0x64]
push edi
mov edi, ecx
mov eax, dword [esi + 0x48]
test eax, eax
jne 0x51b83a
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call ebx
mov eax, dword [esi + 0x48]
test eax, eax
je 0x51b82f
mov ebp, dword [esp + 0x6c]
xor ebx, ebx
push ebp
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x51ba73
test al, 0x10
mov ecx, esi
je 0x51ba8c
call fcn.00577500
mov ecx, esi
call fcn.00577640
test eax, eax
jne 0x51ba73
push ebp
lea ecx, [esp + 0x14]
call fcn.00831f5f
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
mov dword [esp + 0x64], ebx
call fcn.00831c58
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x60], 1
mov eax, dword [ecx - 8]
mov cx, word [ecx + eax*2 - 2]
cmp cx, 0x5c
jne 0x51b8d2
dec eax
lea ecx, [esp + 0x68]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00825c35
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x64], 2
call fcn.00832032
lea ecx, [esp + 0x68]
mov byte [esp + 0x60], 1
call fcn.00831eeb
push 0x5c
lea ecx, [esp + 0x20]
call fcn.00825d01
inc eax
lea edx, [esp + 0x68]
push eax
push edx
lea ecx, [esp + 0x24]
call fcn.00825b00
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 3
call fcn.00832032
lea ecx, [esp + 0x68]
mov byte [esp + 0x60], 1
call fcn.00831eeb
mov eax, dword [edi + 0x1034]
test eax, eax
je 0x51b927
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x10]
push eax
push ecx
mov ecx, edi
call fcn.0051c710
mov ebx, eax
push ebp
lea ecx, [esp + 0x28]
call fcn.00831f5f
push str..
lea ecx, [esp + 0x28]
mov byte [esp + 0x64], 4
call fcn.008322dc
lea ecx, [esp + 0x30]
call fcn.005f3c35
mov edx, dword [esp + 0x24]
push 0
push edx
lea ecx, [esp + 0x38]
mov byte [esp + 0x68], 5
call fcn.005f3cfa
test eax, eax
je 0x51ba38
lea ecx, [esp + 0x30]
call fcn.005f3f20
lea ecx, [esp + 0x30]
mov dword [esp + 0x6c], eax
call fcn.005f3ee3
test eax, eax
jne 0x51ba2c
mov eax, dword [esp + 0x30]
push 0x10
lea ecx, [esp + 0x34]
call dword [eax + 0x38]
test eax, eax
je 0x51b9ea
mov eax, dword [edi + 0x1034]
test eax, eax
je 0x51ba2c
lea ecx, [esp + 0x70]
push ecx
lea ecx, [esp + 0x34]
call fcn.005f3fef
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov eax, dword [eax]
push edx
push ecx
push ebx
push eax
push esi
mov ecx, edi
mov byte [esp + 0x74], 6
call fcn.0051b800
mov ecx, dword [esp + 0x18]
mov byte [esp + 0x60], 5
add ecx, eax
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x70]
call fcn.00831eeb
jmp 0x51ba2c
lea edx, [esp + 0x68]
lea ecx, [esp + 0x30]
push edx
call fcn.005f3fef
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
mov eax, dword [eax]
push ecx
push edx
push ebx
push eax
push esi
mov ecx, edi
mov byte [esp + 0x74], 7
call fcn.0051b800
lea ecx, [esp + 0x68]
mov ebp, eax
mov byte [esp + 0x60], 5
call fcn.00831eeb
cmp ebp, 0xffffffff
je 0x51ba38
add dword [esp + 0x18], ebp
mov eax, dword [esp + 0x6c]
test eax, eax
jne 0x51b96a
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 4
call fcn.005f3c74
lea ecx, [esp + 0x24]
mov byte [esp + 0x60], 1
call fcn.00831eeb
lea ecx, [esp + 0x1c]
mov byte [esp + 0x60], 0
call fcn.00831eeb
lea ecx, [esp + 0x10]
mov dword [esp + 0x60], 0xffffffff
call fcn.00831eeb
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x58]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x54
ret 0x14
call fcn.00577500
mov ecx, esi
call fcn.00577640
test eax, eax
jne 0x51ba73
mov eax, dword [edi + 0x1c]
mov ebx, dword [sym.imp.USER32.dll_GetParent]
push eax
call ebx
push eax
call fcn.0082dfdb
mov ecx, dword [eax + 0x1c]
push ecx
call ebx
push eax
call fcn.0082dfdb
mov edx, dword [eax + 0x1c]
push ebp
push 0
push 0x71e
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
cmp eax, 2
je 0x51bc15
cmp eax, 3
je 0x51bf58
test eax, eax
jne 0x51bf62
mov eax, dword [edi + 0xfc4]
mov ecx, dword [edi + 0xfe4]
cmp eax, ecx
jge 0x51bf99
push ebp
lea ecx, [esp + 0x70]
call fcn.00617650
mov eax, dword [esp + 0x6c]
mov ecx, 0x9ce3b8
push eax
mov dword [esp + 0x64], 8
call fcn.005239e0
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x2c], eax
push ecx
mov ecx, 0x9ce3b8
call fcn.00523b00
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0x1034]
test eax, eax
jne 0x51bbd1
mov ebx, dword [edi + 0xfbc]
test ebx, ebx
je 0x51bbd1
mov esi, ebx
mov ebx, dword [ebx]
add esi, 8
lea ecx, [esp + 0x30]
push esi
call fcn.00831c58
mov edx, dword [esi + 8]
lea ecx, [esi + 0x10]
mov dword [esp + 0x38], edx
mov eax, dword [esi + 0xc]
push ecx
lea ecx, [esp + 0x44]
mov byte [esp + 0x64], 9
mov dword [esp + 0x40], eax
call fcn.00831c58
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x50], ecx
mov edx, dword [esi + 0x24]
mov dword [esp + 0x54], edx
mov eax, dword [esp + 0x40]
push ebp
push eax
call fcn.005fc4b7
add esp, 8
test eax, eax
je 0x51bbe8
lea ecx, [esp + 0x40]
mov byte [esp + 0x60], 0xc
call fcn.00831eeb
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 8
call fcn.00831eeb
test ebx, ebx
jne 0x51bb4e
mov esi, dword [esp + 0x68]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x51bc1f
test byte [edi + 0xfe0], 0x10
je 0x51bf42
jmp 0x51bc36
lea ecx, [esp + 0x40]
mov byte [esp + 0x60], 0xb
call fcn.00831eeb
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 8
call fcn.00831eeb
lea ecx, [esp + 0x6c]
mov dword [esp + 0x60], 0xffffffff
call fcn.00617ec0
mov eax, 1
jmp 0x51ba77
mov eax, dword [esp + 0x28]
test eax, eax
je 0x51bc36
mov eax, dword [edi + 0xfe0]
test ah, 1
je 0x51bf42
push ebp
lea ecx, [esp + 0x6c]
call fcn.00831f5f
push 0x5c
lea ecx, [esp + 0x6c]
mov byte [esp + 0x64], 0xd
call fcn.00825d01
inc eax
lea ecx, [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0x70]
call fcn.00825b00
lea edx, [esp + 0x14]
lea ecx, [esp + 0x68]
push edx
mov byte [esp + 0x64], 0xe
call fcn.00832032
mov ecx, dword [esp + 0x74]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x74]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x6c]
push edx
push eax
push ecx
push ebp
mov ecx, edi
mov dword [esp + 0x34], 0
call fcn.0051c0f0
mov ebx, eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x51bee6
dec eax
je 0x51bcbd
dec eax
je 0x51bfc7
dec eax
je 0x51bf6c
jmp 0x51bee6
mov eax, dword [esp + 0x78]
mov ecx, esi
test eax, eax
je 0x51bde2
call fcn.005774d0
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x24], 0
push edx
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0082dfdb
mov eax, dword [eax + 0x1c]
push eax
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0082dfdb
mov edx, dword [eax + 0x1c]
lea ecx, [esp + 0x24]
push ebp
push ecx
push 0x784
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, esi
mov dword [esp + 0x78], eax
call fcn.00577540
mov ecx, esi
call fcn.00577500
cmp dword [esp + 0x78], 2
je 0x51bfc7
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], 0
cmp eax, 0x64
jl 0x51bd4a
sub eax, 0x64
mov dword [esp + 0x28], 1
mov dword [esp + 0x24], eax
sub eax, 0
mov esi, 3
je 0x51bd5e
dec eax
jne 0x51bdac
mov esi, 2
jmp 0x51bdac
mov ebx, dword [ebx + 4]
lea ecx, [esp + 0x78]
add ebx, 0x18
push ebx
call fcn.00831c58
mov eax, dword [edi + 0x1c]
mov byte [esp + 0x60], 0xf
push eax
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0082dfdb
mov ecx, dword [esp + 0x78]
mov edx, dword [eax + 0x1c]
push ecx
push 1
push 0x71d
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [esp + 0x78]
mov esi, 1
mov byte [esp + 0x60], 0xe
call fcn.00831eeb
mov eax, dword [esp + 0x28]
test eax, eax
je 0x51bdba
mov eax, dword [esp + 0x74]
mov dword [eax], esi
cmp esi, 3
je 0x51bfc7
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x20]
push ecx
push esi
push edx
push eax
push ebp
mov ecx, edi
call fcn.0051c0f0
mov ebx, eax
jmp 0x51bee6
call fcn.005774d0
push 0x9b5220
lea ecx, [esp + 0x2c]
call fcn.00831f5f
push 0x11aa
lea ecx, [esp + 0x2c]
mov byte [esp + 0x64], 0x10
call fcn.008325e8
push 0x9b5220
lea ecx, [esp + 0x7c]
call fcn.00831f5f
push 0x11b1
lea ecx, [esp + 0x7c]
mov byte [esp + 0x64], 0x11
call fcn.008325e8
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x28]
push 0x124
push ecx
push edx
mov ecx, edi
call fcn.0082f847
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00577540
mov ecx, esi
call fcn.00577500
cmp dword [esp + 0x2c], 6
jne 0x51bfa1
mov ebx, dword [ebx + 4]
lea ecx, [esp + 0x2c]
add ebx, 0x18
push ebx
call fcn.00831c58
mov eax, dword [edi + 0x1c]
mov byte [esp + 0x60], 0x12
push eax
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0082dfdb
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + 0x1c]
push ecx
push 1
push 0x71d
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x70]
lea ecx, [esp + 0x20]
mov dword [eax], 1
mov eax, dword [esp + 0x68]
push ecx
push 1
push edx
push eax
push ebp
mov ecx, edi
call fcn.0051c0f0
lea ecx, [esp + 0x2c]
mov ebx, eax
mov byte [esp + 0x60], 0x11
call fcn.00831eeb
lea ecx, [esp + 0x78]
mov byte [esp + 0x60], 0x10
call fcn.00831eeb
lea ecx, [esp + 0x28]
mov byte [esp + 0x60], 0xe
call fcn.00831eeb
mov ecx, dword [esp + 0x70]
mov eax, dword [edi + 0x1030]
cmp ecx, eax
mov dword [esp + 0x18], 1
jne 0x51bf04
push ebx
mov ecx, edi
call fcn.0051cd80
mov edx, dword [edi + 0x1c]
push edx
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0082dfdb
mov eax, dword [eax + 0x1c]
push ebp
push 0
push 0x71d
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 0xd
call fcn.00831eeb
lea ecx, [esp + 0x68]
mov byte [esp + 0x60], 8
call fcn.00831eeb
lea ecx, [esp + 0x6c]
mov dword [esp + 0x60], 0xffffffff
call fcn.00617ec0
jmp 0x51ba73
mov eax, 0xfffffffd
jmp 0x51ba77
mov eax, 0xfffffffe
jmp 0x51ba77
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 0xd
call fcn.00831eeb
lea ecx, [esp + 0x68]
mov byte [esp + 0x60], 8
call fcn.00831eeb
lea ecx, [esp + 0x6c]
mov dword [esp + 0x60], 0xffffffff
call fcn.00617ec0
or eax, 0xffffffff
jmp 0x51ba77
mov ecx, dword [esp + 0x74]
mov byte [esp + 0x60], 0x10
mov dword [ecx], 3
lea ecx, [esp + 0x78]
call fcn.00831eeb
lea ecx, [esp + 0x28]
mov byte [esp + 0x60], 0xe
call fcn.00831eeb
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 0xd
call fcn.00831eeb
lea ecx, [esp + 0x68]
mov byte [esp + 0x60], 8
call fcn.00831eeb
lea ecx, [esp + 0x6c]
mov dword [esp + 0x60], 0xffffffff
call fcn.00617ec0
xor eax, eax
jmp 0x51ba77