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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, edx
push edi
push esi
mov ebx, ecx
call fcn.004dc041
add esp, 8
test eax, eax
jne 0x4a2b69
mov edx, esi
mov ecx, ebx
call fcn.004a0f50
test eax, eax
je 0x4a29ca
mov eax, dword [ebx + 0x10b98]
mov dword [ebp - 8], eax
jmp 0x4a29d1
mov dword [ebp - 8], 0
push 0
push 0x80
push 3
push 0
push 3
push bind
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a2b60
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4a2b60
cmp dword [ebp - 8], 0
jne 0x4a2b04
mov ecx, dword [ebp - 0x1c]
xor eax, eax
add eax, dword [ebp - 0x20]
adc ecx, 0
cmp ecx, 0x19db1de
ja 0x4a2a4f
jb 0x4a2a3f
cmp eax, 0xd53e8000
jae 0x4a2a4f
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
jmp 0x4a2a5c
push ecx
push eax
lea ecx, [edi + 0x20]
call fcn.004a0790
add esp, 8
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
test ebx, ebx
jne 0x4a2a78
test eax, eax
jne 0x4a2a78
mov eax, dword [edi + 0x20]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x24]
mov dword [edi + 0x1c], eax
jmp 0x4a2aad
xor ecx, ecx
add ecx, ebx
adc eax, 0
cmp eax, 0x19db1de
ja 0x4a2aa0
jb 0x4a2a90
cmp ecx, 0xd53e8000
jae 0x4a2aa0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
jmp 0x4a2aad
push eax
push ecx
lea ecx, [edi + 0x18]
call fcn.004a0790
add esp, 8
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
test edx, edx
jne 0x4a2abf
test eax, eax
je 0x4a2b40
xor ecx, ecx
add ecx, edx
adc eax, 0
cmp eax, 0x19db1de
ja 0x4a2aee
jb 0x4a2ad7
cmp ecx, 0xd53e8000
jae 0x4a2aee
mov dword [edi + 0x28], 0
xor eax, eax
mov dword [edi + 0x2c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
push ecx
lea ecx, [edi + 0x28]
call fcn.004a0790
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [edi + 0x20]
lea ecx, [ebp - 0x20]
call fcn.004a07f0
cmp dword [ebp - 0x10], 0
jne 0x4a2b29
cmp dword [ebp - 0xc], 0
jne 0x4a2b29
mov eax, dword [edi + 0x20]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x24]
mov dword [edi + 0x1c], eax
jmp 0x4a2b34
lea edx, [edi + 0x18]
lea ecx, [ebp - 0x10]
call fcn.004a07f0
cmp dword [ebp - 0x18], 0
jne 0x4a2b55
cmp dword [ebp - 0x14], 0
jne 0x4a2b55
mov eax, dword [edi + 0x20]
mov dword [edi + 0x28], eax
mov eax, dword [edi + 0x24]
mov dword [edi + 0x2c], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [edi + 0x28]
lea ecx, [ebp - 0x18]
call fcn.004a07f0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a2bc3
test bl, 0x10
je 0x4a2bc3
push 0x30
push 0
push edi
call fcn.004cddb0
add esp, 0xc
mov ecx, 0x210000
call fcn.004a4a00
shl ebx, 7
not ebx
mov dword [edi + 0x20], eax
and ebx, 0x80
mov dword [edi + 0x28], eax
or ebx, 0x4100
mov dword [edi + 0x18], eax
mov dword [edi + 0x24], edx
xor eax, eax
mov dword [edi + 0x2c], edx
mov dword [edi + 0x1c], edx
mov word [edi + 6], bx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret