Function at 0x4def9d
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [0xa7e0c0]
test eax, eax
jne 0x4defc8
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.004ab68a
mov dword [0xa7e0c0], eax
mov dword [esp + 4], 1
mov dword [esp], 0x59e827
call fcn.004ab507
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004abfb5
mov edx, eax
mov eax, dword [0xa7e0c0]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004ab7f1
call fcn.004ddae9
mov dword [0xa7e0c4], eax
mov edx, dword [0x6f46dc]
mov eax, dword [0xa7e0c4]
shl eax, 3
mov ecx, eax
shl ecx, 4
mov ebx, ecx
sub ebx, eax
mov eax, ebx
add eax, edx
mov dword [0xa7e0c8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
movzx eax, al
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x53
je 0x4df048
cmp dword [ebp - 0x20], 0x73
jne 0x4df0c5
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
movzx eax, al
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x43
je 0x4df064
cmp dword [ebp - 0x20], 0x63
jne 0x4df0c5
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
movzx eax, al
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x52
je 0x4df080
cmp dword [ebp - 0x20], 0x72
jne 0x4df0c5
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
movzx eax, al
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x4e
je 0x4df09c
cmp dword [ebp - 0x20], 0x6e
jne 0x4df0c5
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
movzx eax, al
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x3a
jne 0x4df0c5
mov eax, dword [0xa7e0c8]
mov byte [eax + 0x70], 1
mov eax, dword [0xa7e0c4]
jmp 0x4df969
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x4df0d8
mov eax, dword [0xa7e0c8]
mov byte [eax + 9], 1
mov eax, dword [ebp + 0xc]
and eax, 2
test eax, eax
je 0x4df0eb
mov eax, dword [0xa7e0c8]
mov byte [eax + 0xa], 1
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x4df0fe
mov eax, dword [0xa7e0c8]
mov byte [eax + 0xb], 1
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x4df111
mov eax, dword [0xa7e0c8]
mov byte [eax + 0xc], 1
mov eax, dword [0xa7e0c8]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov edx, dword [0xa7e0c8]
mov eax, dword [0xa7e0c0]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004de10d
mov dword [0xa7e0cc], eax
mov eax, dword [0xa7e0cc]
test eax, eax
setne al
test al, al
je 0x4df16f
mov eax, dword [0xa7e0cc]
cmp eax, 0xffffffff
jne 0x4df16f
mov eax, dword [0xa7e0c4]
mov dword [esp], eax
call fcn.004ddde8
mov eax, 0xfffffff5
jmp 0x4df969
mov eax, dword [0x6f46d8]
mov edx, dword [0xa7e0c4]
shl edx, 2
add eax, edx
mov dword [0xa7e0d0], eax
mov dword [0xa7e0cc], 0
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x4df1a7
mov eax, dword [0xa7e0cc]
or eax, 0x80000000
mov dword [0xa7e0cc], eax
mov eax, dword [ebp + 0xc]
and eax, 2
test eax, eax
je 0x4df1c0
mov eax, dword [0xa7e0cc]
or eax, 0x40000000
mov dword [0xa7e0cc], eax
mov dword [0xa7e0d4], 3
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x4df1e1
mov eax, dword [0xa7e0d4]
xor eax, 1
mov dword [0xa7e0d4], eax
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x4df1f8
mov eax, dword [0xa7e0d4]
xor eax, 2
mov dword [0xa7e0d4], eax
mov eax, dword [0xa7e0c8]
movzx eax, byte [eax + 0x50]
test al, al
je 0x4df637
mov eax, dword [0xa7e0d8]
test eax, eax
jne 0x4df22b
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.004ab68a
mov dword [0xa7e0d8], eax
mov eax, dword [0xa7e0c8]
movzx eax, byte [eax + 0x50]
movzx eax, al
mov dword [esp], eax
call fcn.004adcac
mov ebx, eax
mov dword [esp], 0x59ed39
call fcn.004ab476
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004abfb5
mov edx, eax
mov eax, dword [0xa7e0d8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004ab7f1
mov dword [esp + 4], 2
mov dword [esp], 0x59ed3c
call fcn.004ab507
mov edx, eax
mov eax, dword [0xa7e0d8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004abfb5
mov edx, eax
mov eax, dword [0xa7e0d8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004ab7f1
mov eax, dword [0xa7e0d8]
mov eax, dword [eax]
add eax, 2
mov byte [eax], 0x4d
mov ebx, dword [0xa7e0d0]
mov eax, dword [0xa7e0cc]
mov edx, eax
mov eax, dword [0xa7e0d8]
mov eax, dword [eax]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebx], eax
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x4df325
mov eax, dword [0xa7e0c4]
mov dword [esp], eax
call fcn.004ddde8
mov eax, 0xfffffff8
jmp 0x4df969
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 0
mov dword [esp], 0xa7e0dc
call sub.msvcrt.dll_memset
mov dword [0xa7e0dc], 0x1c
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
mov dword [esp + 4], 0xa7e0dc
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCommState]
call eax
sub esp, 8
test eax, eax
sete al
test al, al
je 0x4df39b
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa7e0c4]
mov dword [esp], eax
call fcn.004ddde8
mov eax, 0xfffffff8
jmp 0x4df969
mov dword [esp + 8], 0x14
mov dword [esp + 4], 0
mov dword [esp], 0xa7e0f8
call sub.msvcrt.dll_memset
mov eax, dword [0xa7e0c8]
mov eax, dword [eax + 0x54]
mov dword [0xa7e0e0], eax
mov eax, dword [0xa7e0c8]
movzx eax, byte [eax + 0x5a]
movsx eax, al
mov dword [0xa7e0cc], eax
mov eax, dword [0xa7e0cc]
cmp eax, 0xa
jne 0x4df3e9
mov dword [0xa7e0d4], 0
mov eax, dword [0xa7e0cc]
cmp eax, 0xf
jne 0x4df3fd
mov dword [0xa7e0d4], 1
mov eax, dword [0xa7e0cc]
cmp eax, 0x14
jne 0x4df411
mov dword [0xa7e0d4], 2
mov eax, dword [0xa7e0d4]
mov byte [0xa7e0f0], al
mov eax, dword [0xa7e0c8]
movzx eax, byte [eax + 0x59]
mov byte [0xa7e0ee], al
mov eax, dword [0xa7e0c8]
movzx eax, byte [eax + 0x58]
movsx eax, al
mov dword [0xa7e0cc], eax
mov eax, dword [0xa7e0cc]
test eax, eax
jne 0x4df44d
mov dword [0xa7e0d4], 0
mov eax, dword [0xa7e0cc]
cmp eax, 1
jne 0x4df461
mov dword [0xa7e0d4], 2
mov eax, dword [0xa7e0cc]
cmp eax, 2
jne 0x4df475
mov dword [0xa7e0d4], 1
mov eax, dword [0xa7e0cc]
cmp eax, 3
jne 0x4df489
mov dword [0xa7e0d4], 4
mov eax, dword [0xa7e0cc]
cmp eax, 4
jne 0x4df49d
mov dword [0xa7e0d4], 3
mov eax, dword [0xa7e0d4]
mov byte [0xa7e0ef], al
mov eax, dword [0xa7e0d4]
test eax, eax
jne 0x4df4c1
movzx eax, byte [0xa7e0e4]
and eax, 0xfffffffd
mov byte [0xa7e0e4], al
jmp 0x4df4d0
movzx eax, byte [0xa7e0e4]
or eax, 2
mov byte [0xa7e0e4], al
mov eax, dword [0xa7e0c8]
movzx eax, byte [eax + 0x5d]
test al, al
je 0x4df4ec
movzx eax, byte [0xa7e0e5]
and eax, 0xffffffcf
mov byte [0xa7e0e5], al
mov eax, dword [0xa7e0c8]
movzx eax, byte [eax + 0x5b]
test al, al
jne 0x4df50a
movzx eax, byte [0xa7e0e4]
or eax, 1
mov byte [0xa7e0e4], al
jmp 0x4df519
movzx eax, byte [0xa7e0e4]
and eax, 0xfffffffe
mov byte [0xa7e0e4], al
mov byte [0xa7e0f4], 0x1a
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
mov dword [esp + 4], 0xa7e0dc
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetCommState]
call eax
sub esp, 8
test eax, eax
sete al
test al, al
je 0x4df570
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa7e0c4]
mov dword [esp], eax
call fcn.004ddde8
mov eax, 0xfffffff8
jmp 0x4df969
mov eax, dword [0xa7e0c8]
mov eax, dword [eax + 0x68]
test eax, eax
jne 0x4df59c
mov dword [0xa7e0f8], 0xffffffff
mov dword [0xa7e0fc], 0
mov dword [0xa7e100], 0
jmp 0x4df5bd
mov dword [0xa7e0f8], 0
mov dword [0xa7e0fc], 0
mov eax, dword [0xa7e0c8]
mov eax, dword [eax + 0x68]
mov dword [0xa7e100], eax
mov dword [0xa7e104], 0
mov eax, dword [0xa7e0c8]
mov eax, dword [eax + 0x64]
mov dword [0xa7e108], eax
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
mov dword [esp + 4], 0xa7e0f8
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
call eax
sub esp, 8
test eax, eax
sete al
test al, al
je 0x4df624
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa7e0c4]
mov dword [esp], eax
call fcn.004ddde8
mov eax, 0xfffffff8
jmp 0x4df969
mov eax, dword [0xa7e0c8]
mov byte [eax + 8], 1
mov eax, dword [0xa7e0c4]
jmp 0x4df969
mov dword [0xa7e10c], 3
cmp dword [ebp + 0x14], 0
je 0x4df651
mov dword [0xa7e10c], 4
mov ebx, dword [0xa7e0d0]
mov eax, dword [0xa7e10c]
mov dword [ebp - 0x2c], eax
mov eax, dword [0xa7e0d4]
mov edi, eax
mov eax, dword [0xa7e0cc]
mov esi, eax
mov eax, dword [0xa7e0c0]
mov dword [esp], eax
call fcn.004a043f
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebx], eax
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x4df7d9
cmp dword [ebp + 0x14], 3
jne 0x4df6eb
mov dword [0xa7e0cc], 0x80000000
mov eax, dword [0xa7e0c8]
mov byte [eax + 9], 1
mov eax, dword [0xa7e0c8]
mov byte [eax + 0xa], 0
add dword [ebp + 0x14], 1
jmp 0x4df651
cmp dword [ebp + 0x14], 4
jne 0x4df716
mov dword [0xa7e0cc], 0x40000000
mov eax, dword [0xa7e0c8]
mov byte [eax + 9], 0
mov eax, dword [0xa7e0c8]
mov byte [eax + 0xa], 1
add dword [ebp + 0x14], 1
jmp 0x4df651
mov eax, dword [0xa7e0c4]
mov dword [esp], eax
call fcn.004ddde8
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa7e110], eax
mov eax, dword [0xa7e110]
cmp eax, 3
jne 0x4df743
mov eax, 0xfffffffa
jmp 0x4df969
mov eax, dword [0xa7e110]
cmp eax, 4
je 0x4df761
mov eax, dword [0xa7e110]
cmp eax, 0x1d
je 0x4df761
mov eax, dword [0xa7e110]
cmp eax, 0x1e
jne 0x4df76b
mov eax, 0xfffffff7
jmp 0x4df969
mov eax, dword [0xa7e110]
cmp eax, 5
je 0x4df793
mov eax, dword [0xa7e110]
cmp eax, 0x13
je 0x4df793
mov eax, dword [0xa7e110]
cmp eax, 0x21
je 0x4df793
mov eax, dword [0xa7e110]
cmp eax, 0x20
jne 0x4df79d
mov eax, 0xfffffff9
jmp 0x4df969
mov eax, dword [0xa7e110]
cmp eax, 0xf
je 0x4df7b1
mov eax, dword [0xa7e110]
cmp eax, 0x15
jne 0x4df7bb
mov eax, 0xfffffff8
jmp 0x4df969
mov eax, dword [0xa7e110]
cmp eax, 2
jne 0x4df7cf
mov eax, 0xfffffffb
jmp 0x4df969
mov eax, 0xfffffffb
jmp 0x4df969
cmp dword [ebp + 0x14], 2
jne 0x4df95b
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
mov dword [esp + 4], 0xa7e114
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [0xa7e118], eax
mov eax, dword [0xa7e118]
test eax, eax
jne 0x4df81a
mov eax, dword [0xa7e114]
test eax, eax
je 0x4df95b
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [0xa7e10c], 5
mov ebx, dword [0xa7e0d0]
mov eax, dword [0xa7e10c]
mov dword [ebp - 0x30], eax
mov eax, dword [0xa7e0d4]
mov edi, eax
mov eax, dword [0xa7e0cc]
mov esi, eax
mov eax, dword [0xa7e0c0]
mov dword [esp], eax
call fcn.004a043f
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov edx, dword [ebp - 0x30]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebx], eax
mov eax, dword [0xa7e0d0]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x4df95b
mov eax, dword [0xa7e0c4]
mov dword [esp], eax
call fcn.004ddde8
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa7e110], eax
mov eax, dword [0xa7e110]
cmp eax, 3
jne 0x4df8d4
mov eax, 0xfffffffa
jmp 0x4df969
mov eax, dword [0xa7e110]
cmp eax, 4
je 0x4df8f2
mov eax, dword [0xa7e110]
cmp eax, 0x1d
je 0x4df8f2
mov eax, dword [0xa7e110]
cmp eax, 0x1e
jne 0x4df8f9
mov eax, 0xfffffff7
jmp 0x4df969
mov eax, dword [0xa7e110]
cmp eax, 5
je 0x4df921
mov eax, dword [0xa7e110]
cmp eax, 0x13
je 0x4df921
mov eax, dword [0xa7e110]
cmp eax, 0x21
je 0x4df921
mov eax, dword [0xa7e110]
cmp eax, 0x20
jne 0x4df928
mov eax, 0xfffffff9
jmp 0x4df969
mov eax, dword [0xa7e110]
cmp eax, 0xf
je 0x4df93c
mov eax, dword [0xa7e110]
cmp eax, 0x15
jne 0x4df943
mov eax, 0xfffffff8
jmp 0x4df969
mov eax, dword [0xa7e110]
cmp eax, 2
jne 0x4df954
mov eax, 0xfffffffb
jmp 0x4df969
mov eax, 0xfffffffb
jmp 0x4df969
mov eax, dword [0xa7e0c8]
mov byte [eax + 8], 1
mov eax, dword [0xa7e0c4]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret