Function at 0x4cad00
Capabilities:
Check if file exists
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51b206
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x57b728]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov eax, dword [esi + 0x10]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x58], esi
cmp eax, 0xffffffff
je 0x4cad4f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10], 0xffffffff
mov ecx, dword [esi]
mov eax, dword [ecx]
call dword [eax + 0x24]
lea ecx, [esi + 0x50]
call fcn.00419080
lea ecx, [esi + 0x74]
call fcn.00419080
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
test edi, edi
je 0x4cafc7
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, 1
jne 0x4cafc7
push edi
lea ecx, [esi + 0x74]
call fcn.00417e70
push edi
lea ecx, [esi + 0x50]
call fcn.00417e70
mov ecx, dword [esi + 0x5c]
dec ecx
cmp ecx, dword [esi + 0x5c]
jae 0x4cadb5
mov eax, dword [esi + 0x54]
mov byte [ecx + eax], 0x68
mov eax, dword [esi + 0x58]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 0
mov edx, 0x68
push 3
mov word [eax + ecx*2], dx
push dword [esi + 0x78]
call edi
mov dword [esi + 0x10], eax
cmp eax, 0xffffffff
je 0x4cadec
mov byte [esi + 0x98], 1
jmp 0x4cae1a
push 0
push 0x80
push 3
push 0
push 1
push 1
push dword [esi + 0x78]
call edi
mov dword [esi + 0x10], eax
cmp eax, 0xffffffff
jne 0x4cae13
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4cafcc
mov byte [esi + 0x98], 0
lea eax, [ebp - 0x54]
push eax
push dword [esi + 0x10]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4cae08
mov eax, dword [ebp - 0x54]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x50]
push 1
push 0
lea ecx, [ebp - 0x84]
mov dword [esi + 0x1c], eax
call fcn.00413c20
push dword [esi + 0x54]
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 0
call fcn.00413ef0
mov edi, eax
test edi, edi
jne 0x4cafa5
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.004c9760
push 0x33
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x84]
call fcn.00417490
lea ecx, [ebp - 0x48]
cmp word [ecx], 0x4153
jne 0x4caea1
cmp byte [ecx + 2], 0x48
je 0x4caf4d
lea ecx, [ebp - 0x48]
lea edx, [ebp - 0x4c]
movzx eax, word [ecx]
mov word [ebp - 0x4c], 0xebcb
mov byte [ebp - 0x4a], 0x78
cmp ax, word [edx]
jne 0x4caf79
movzx eax, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x4caf79
push 1
push 0
lea ecx, [ebp - 0xb0]
call fcn.00413c20
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x84]
push eax
mov byte [ebp - 4], 2
call fcn.004ca700
add esp, 8
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x84]
call fcn.00413d20
push 0x33
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x84]
call fcn.00417490
lea ecx, [ebp - 0x48]
cmp word [ecx], 0x4153
jne 0x4caf2a
cmp byte [ecx + 2], 0x48
jne 0x4caf2a
xor edi, edi
jmp 0x4caf2f
mov edi, 0xd
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 1
call fcn.00413cc0
lea ecx, [ebp - 0x9c]
call fcn.00416dc0
test edi, edi
jne 0x4caf7e
mov eax, dword [ebp - 0x41]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + eax - 0x80]
sub ecx, dword [ebp + eax - 0x7c]
lea eax, [esi + 0x24]
sub ecx, 8
push ecx
push eax
lea ecx, [ebp - 0x84]
call fcn.004860f0
jmp 0x4caf7e
mov edi, 0xd
mov dword [ebp - 4], 0
test edi, edi
je 0x4cafac
jmp 0x4cafa5
mov ecx, esi
call fcn.004c9a10
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 0xffffffff
call fcn.00413cc0
lea ecx, [ebp - 0x70]
call fcn.00416dc0
mov eax, edi
jmp 0x4cafcc
mov eax, 0xa1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004eff68
mov esp, ebp
pop ebp
ret 4