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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
mov ebp, ebx
and ebp, 0xffff7fff
jne 0x4df1a0
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
je 0x4df1c5
test al, 0x10
je 0x4df1a0
mov eax, dword [esp + 0x50]
mov dword [esp + 0x18], 0
xor esi, esi
mov dword [esp + 0x14], 0x2000001
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
mov dword [esp], esi
call sub.msvcrt.dll_free
cmp ebx, 0xffffffff
je 0x4df453
mov dword [esp], ebx
mov dword [esp + 4], 0
call dword [sym.imp.msvcrt.dll__open_osfhandle]
add esp, 0x3c
mov ebp, eax
pop ebx
mov eax, ebp
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x50]
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__open]
test eax, eax
mov ebp, eax
js 0x4df200
add esp, 0x3c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
mov dword [esp + 0x28], eax
call eax
cmp eax, 3
je 0x4df370
mov eax, dword [esp + 0x28]
call eax
test eax, eax
jne 0x4df2bc
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0
jmp 0x4df2d4
mov eax, dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 0x28], eax
call eax
cmp dword [eax], 0xd
je 0x4df330
mov eax, dword [esp + 0x28]
call eax
cmp dword [eax], 2
jne 0x4df1bb
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov esi, eax
lea eax, [eax + eax + 2]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov ebp, eax
je 0x4df4a1
mov eax, dword [esp + 0x50]
mov dword [esp + 8], esi
mov dword [esp], ebp
mov dword [esp + 4], eax
call sub.msvcrt.dll_mbstowcs
cmp eax, 0xffffffff
je 0x4df499
xor edx, edx
mov word [ebp + eax*2], dx
mov dword [esp], ebp
call fcn.004de7a0
mov dword [esp], ebp
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
je 0x4df4a1
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__wopen]
test eax, eax
mov ebp, eax
js 0x4df2f0
mov dword [esp], esi
call sub.msvcrt.dll_free
add esp, 0x3c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
add ebp, 1
cmp ebp, 0x2e
je 0x4df4f8
cmp eax, dword [ebp*8 + 0x5fad40]
jne 0x4df2b0
call dword [sym.imp.msvcrt.dll__errno]
mov edx, dword [ebp*8 + 0x5fad44]
mov dword [eax], edx
mov dword [esp], esi
mov ebp, 0xffffffff
call sub.msvcrt.dll_free
jmp 0x4df1bb
mov edi, dword [sym.imp.msvcrt.dll__errno]
call edi
cmp dword [eax], 0xd
jne 0x4df298
and bh, 1
je 0x4df298
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x4df4b5
test al, 0x10
je 0x4df48c
call edi
mov dword [eax], 0x15
jmp 0x4df298
test bh, 1
je 0x4df214
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
je 0x4df509
test al, 0x10
mov eax, dword [esp + 0x28]
je 0x4df441
call eax
mov ebp, 0xffffffff
mov dword [eax], 0x15
jmp 0x4df1bb
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov esi, eax
lea eax, [eax + eax + 2]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov edx, eax
je 0x4df4d0
mov eax, dword [esp + 0x50]
mov dword [esp], edx
mov dword [esp + 8], esi
mov dword [esp + 0x2c], edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_mbstowcs
cmp eax, 0xffffffff
mov edx, dword [esp + 0x2c]
je 0x4df4c8
xor ecx, ecx
mov dword [esp + 0x2c], edx
mov word [edx + eax*2], cx
mov dword [esp], edx
call fcn.004de7a0
mov edx, dword [esp + 0x2c]
mov esi, eax
mov dword [esp], edx
call sub.msvcrt.dll_free
test esi, esi
je 0x4df4d0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x4df1db
test al, 0x10
je 0x4df281
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x2000001
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
jmp 0x4df16e
call eax
mov ebp, 0xffffffff
mov dword [eax], 0xd
jmp 0x4df1bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4df46a
jmp 0x4df4e4
add ebp, 1
cmp ebp, 0x2e
je 0x4df4d0
cmp eax, dword [ebp*8 + 0x5fad40]
jne 0x4df462
call dword [sym.imp.msvcrt.dll__errno]
mov edx, dword [ebp*8 + 0x5fad44]
mov ebp, 0xffffffff
mov dword [eax], edx
jmp 0x4df1bb
call edi
mov dword [eax], 0xd
jmp 0x4df298
mov dword [esp], ebp
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x28]
or ebp, 0xffffffff
call eax
mov dword [eax], 0x16
jmp 0x4df1bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
call fcn.004df080
jmp 0x4df298
mov dword [esp], edx
call sub.msvcrt.dll_free
call dword [sym.imp.msvcrt.dll__errno]
or ebp, 0xffffffff
mov dword [eax], 0x16
jmp 0x4df1bb
call dword [sym.imp.msvcrt.dll__errno]
or ebp, 0xffffffff
mov dword [eax], 0
jmp 0x4df1bb
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x16
jmp 0x4df2d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
or ebp, 0xffffffff
call fcn.004df080
jmp 0x4df1bb