Function at 0x490291
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [0xa2e680]
test eax, eax
jne 0x4902bc
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0045c97e
mov dword [0xa2e680], eax
mov dword [esp + 4], 1
mov dword [esp], 0x54f567
call fcn.0045c7fb
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0045d2a9
mov edx, eax
mov eax, dword [0xa2e680]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0045cae5
call fcn.0048eddd
mov dword [0xa2e684], eax
mov edx, dword [0x6a4c9c]
mov eax, dword [0xa2e684]
shl eax, 3
mov ecx, eax
shl ecx, 4
mov ebx, ecx
sub ebx, eax
mov eax, ebx
add eax, edx
mov dword [0xa2e688], 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 0x49033c
cmp dword [ebp - 0x20], 0x73
jne 0x4903b9
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 0x490358
cmp dword [ebp - 0x20], 0x63
jne 0x4903b9
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 0x490374
cmp dword [ebp - 0x20], 0x72
jne 0x4903b9
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 0x490390
cmp dword [ebp - 0x20], 0x6e
jne 0x4903b9
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 0x4903b9
mov eax, dword [0xa2e688]
mov byte [eax + 0x70], 1
mov eax, dword [0xa2e684]
jmp 0x490c5d
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x4903cc
mov eax, dword [0xa2e688]
mov byte [eax + 9], 1
mov eax, dword [ebp + 0xc]
and eax, 2
test eax, eax
je 0x4903df
mov eax, dword [0xa2e688]
mov byte [eax + 0xa], 1
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x4903f2
mov eax, dword [0xa2e688]
mov byte [eax + 0xb], 1
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x490405
mov eax, dword [0xa2e688]
mov byte [eax + 0xc], 1
mov eax, dword [0xa2e688]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov edx, dword [0xa2e688]
mov eax, dword [0xa2e680]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0048f401
mov dword [0xa2e68c], eax
mov eax, dword [0xa2e68c]
test eax, eax
setne al
test al, al
je 0x490463
mov eax, dword [0xa2e68c]
cmp eax, 0xffffffff
jne 0x490463
mov eax, dword [0xa2e684]
mov dword [esp], eax
call fcn.0048f0dc
mov eax, 0xfffffff5
jmp 0x490c5d
mov eax, dword [0x6a4c98]
mov edx, dword [0xa2e684]
shl edx, 2
add eax, edx
mov dword [0xa2e690], eax
mov dword [0xa2e68c], 0
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x49049b
mov eax, dword [0xa2e68c]
or eax, 0x80000000
mov dword [0xa2e68c], eax
mov eax, dword [ebp + 0xc]
and eax, 2
test eax, eax
je 0x4904b4
mov eax, dword [0xa2e68c]
or eax, 0x40000000
mov dword [0xa2e68c], eax
mov dword [0xa2e694], 3
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x4904d5
mov eax, dword [0xa2e694]
xor eax, 1
mov dword [0xa2e694], eax
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x4904ec
mov eax, dword [0xa2e694]
xor eax, 2
mov dword [0xa2e694], eax
mov eax, dword [0xa2e688]
movzx eax, byte [eax + 0x50]
test al, al
je 0x49092b
mov eax, dword [0xa2e698]
test eax, eax
jne 0x49051f
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0045c97e
mov dword [0xa2e698], eax
mov eax, dword [0xa2e688]
movzx eax, byte [eax + 0x50]
movzx eax, al
mov dword [esp], eax
call fcn.0045efa0
mov ebx, eax
mov dword [esp], 0x54fa79
call fcn.0045c76a
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0045d2a9
mov edx, eax
mov eax, dword [0xa2e698]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0045cae5
mov dword [esp + 4], 2
mov dword [esp], 0x54fa7c
call fcn.0045c7fb
mov edx, eax
mov eax, dword [0xa2e698]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0045d2a9
mov edx, eax
mov eax, dword [0xa2e698]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0045cae5
mov eax, dword [0xa2e698]
mov eax, dword [eax]
add eax, 2
mov byte [eax], 0x4d
mov ebx, dword [0xa2e690]
mov eax, dword [0xa2e68c]
mov edx, eax
mov eax, dword [0xa2e698]
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 [0xa2e690]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x490619
mov eax, dword [0xa2e684]
mov dword [esp], eax
call fcn.0048f0dc
mov eax, 0xfffffff8
jmp 0x490c5d
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 0
mov dword [esp], 0xa2e69c
call sub.msvcrt.dll_memset
mov dword [0xa2e69c], 0x1c
mov eax, dword [0xa2e690]
mov eax, dword [eax]
mov dword [esp + 4], 0xa2e69c
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 0x49068f
mov eax, dword [0xa2e690]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa2e684]
mov dword [esp], eax
call fcn.0048f0dc
mov eax, 0xfffffff8
jmp 0x490c5d
mov dword [esp + 8], 0x14
mov dword [esp + 4], 0
mov dword [esp], 0xa2e6b8
call sub.msvcrt.dll_memset
mov eax, dword [0xa2e688]
mov eax, dword [eax + 0x54]
mov dword [0xa2e6a0], eax
mov eax, dword [0xa2e688]
movzx eax, byte [eax + 0x5a]
movsx eax, al
mov dword [0xa2e68c], eax
mov eax, dword [0xa2e68c]
cmp eax, 0xa
jne 0x4906dd
mov dword [0xa2e694], 0
mov eax, dword [0xa2e68c]
cmp eax, 0xf
jne 0x4906f1
mov dword [0xa2e694], 1
mov eax, dword [0xa2e68c]
cmp eax, 0x14
jne 0x490705
mov dword [0xa2e694], 2
mov eax, dword [0xa2e694]
mov byte [0xa2e6b0], al
mov eax, dword [0xa2e688]
movzx eax, byte [eax + 0x59]
mov byte [0xa2e6ae], al
mov eax, dword [0xa2e688]
movzx eax, byte [eax + 0x58]
movsx eax, al
mov dword [0xa2e68c], eax
mov eax, dword [0xa2e68c]
test eax, eax
jne 0x490741
mov dword [0xa2e694], 0
mov eax, dword [0xa2e68c]
cmp eax, 1
jne 0x490755
mov dword [0xa2e694], 2
mov eax, dword [0xa2e68c]
cmp eax, 2
jne 0x490769
mov dword [0xa2e694], 1
mov eax, dword [0xa2e68c]
cmp eax, 3
jne 0x49077d
mov dword [0xa2e694], 4
mov eax, dword [0xa2e68c]
cmp eax, 4
jne 0x490791
mov dword [0xa2e694], 3
mov eax, dword [0xa2e694]
mov byte [0xa2e6af], al
mov eax, dword [0xa2e694]
test eax, eax
jne 0x4907b5
movzx eax, byte [0xa2e6a4]
and eax, 0xfffffffd
mov byte [0xa2e6a4], al
jmp 0x4907c4
movzx eax, byte [0xa2e6a4]
or eax, 2
mov byte [0xa2e6a4], al
mov eax, dword [0xa2e688]
movzx eax, byte [eax + 0x5d]
test al, al
je 0x4907e0
movzx eax, byte [0xa2e6a5]
and eax, 0xffffffcf
mov byte [0xa2e6a5], al
mov eax, dword [0xa2e688]
movzx eax, byte [eax + 0x5b]
test al, al
jne 0x4907fe
movzx eax, byte [0xa2e6a4]
or eax, 1
mov byte [0xa2e6a4], al
jmp 0x49080d
movzx eax, byte [0xa2e6a4]
and eax, 0xfffffffe
mov byte [0xa2e6a4], al
mov byte [0xa2e6b4], 0x1a
mov eax, dword [0xa2e690]
mov eax, dword [eax]
mov dword [esp + 4], 0xa2e69c
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 0x490864
mov eax, dword [0xa2e690]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa2e684]
mov dword [esp], eax
call fcn.0048f0dc
mov eax, 0xfffffff8
jmp 0x490c5d
mov eax, dword [0xa2e688]
mov eax, dword [eax + 0x68]
test eax, eax
jne 0x490890
mov dword [0xa2e6b8], 0xffffffff
mov dword [0xa2e6bc], 0
mov dword [0xa2e6c0], 0
jmp 0x4908b1
mov dword [0xa2e6b8], 0
mov dword [0xa2e6bc], 0
mov eax, dword [0xa2e688]
mov eax, dword [eax + 0x68]
mov dword [0xa2e6c0], eax
mov dword [0xa2e6c4], 0
mov eax, dword [0xa2e688]
mov eax, dword [eax + 0x64]
mov dword [0xa2e6c8], eax
mov eax, dword [0xa2e690]
mov eax, dword [eax]
mov dword [esp + 4], 0xa2e6b8
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 0x490918
mov eax, dword [0xa2e690]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa2e684]
mov dword [esp], eax
call fcn.0048f0dc
mov eax, 0xfffffff8
jmp 0x490c5d
mov eax, dword [0xa2e688]
mov byte [eax + 8], 1
mov eax, dword [0xa2e684]
jmp 0x490c5d
mov dword [0xa2e6cc], 3
cmp dword [ebp + 0x14], 0
je 0x490945
mov dword [0xa2e6cc], 4
mov ebx, dword [0xa2e690]
mov eax, dword [0xa2e6cc]
mov dword [ebp - 0x2c], eax
mov eax, dword [0xa2e694]
mov edi, eax
mov eax, dword [0xa2e68c]
mov esi, eax
mov eax, dword [0xa2e680]
mov dword [esp], eax
call fcn.00451733
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 [0xa2e690]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x490acd
cmp dword [ebp + 0x14], 3
jne 0x4909df
mov dword [0xa2e68c], 0x80000000
mov eax, dword [0xa2e688]
mov byte [eax + 9], 1
mov eax, dword [0xa2e688]
mov byte [eax + 0xa], 0
add dword [ebp + 0x14], 1
jmp 0x490945
cmp dword [ebp + 0x14], 4
jne 0x490a0a
mov dword [0xa2e68c], 0x40000000
mov eax, dword [0xa2e688]
mov byte [eax + 9], 0
mov eax, dword [0xa2e688]
mov byte [eax + 0xa], 1
add dword [ebp + 0x14], 1
jmp 0x490945
mov eax, dword [0xa2e684]
mov dword [esp], eax
call fcn.0048f0dc
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa2e6d0], eax
mov eax, dword [0xa2e6d0]
cmp eax, 3
jne 0x490a37
mov eax, 0xfffffffa
jmp 0x490c5d
mov eax, dword [0xa2e6d0]
cmp eax, 4
je 0x490a55
mov eax, dword [0xa2e6d0]
cmp eax, 0x1d
je 0x490a55
mov eax, dword [0xa2e6d0]
cmp eax, 0x1e
jne 0x490a5f
mov eax, 0xfffffff7
jmp 0x490c5d
mov eax, dword [0xa2e6d0]
cmp eax, 5
je 0x490a87
mov eax, dword [0xa2e6d0]
cmp eax, 0x13
je 0x490a87
mov eax, dword [0xa2e6d0]
cmp eax, 0x21
je 0x490a87
mov eax, dword [0xa2e6d0]
cmp eax, 0x20
jne 0x490a91
mov eax, 0xfffffff9
jmp 0x490c5d
mov eax, dword [0xa2e6d0]
cmp eax, 0xf
je 0x490aa5
mov eax, dword [0xa2e6d0]
cmp eax, 0x15
jne 0x490aaf
mov eax, 0xfffffff8
jmp 0x490c5d
mov eax, dword [0xa2e6d0]
cmp eax, 2
jne 0x490ac3
mov eax, 0xfffffffb
jmp 0x490c5d
mov eax, 0xfffffffb
jmp 0x490c5d
cmp dword [ebp + 0x14], 2
jne 0x490c4f
mov eax, dword [0xa2e690]
mov eax, dword [eax]
mov dword [esp + 4], 0xa2e6d4
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [0xa2e6d8], eax
mov eax, dword [0xa2e6d8]
test eax, eax
jne 0x490b0e
mov eax, dword [0xa2e6d4]
test eax, eax
je 0x490c4f
mov eax, dword [0xa2e690]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [0xa2e6cc], 5
mov ebx, dword [0xa2e690]
mov eax, dword [0xa2e6cc]
mov dword [ebp - 0x30], eax
mov eax, dword [0xa2e694]
mov edi, eax
mov eax, dword [0xa2e68c]
mov esi, eax
mov eax, dword [0xa2e680]
mov dword [esp], eax
call fcn.00451733
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 [0xa2e690]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x490c4f
mov eax, dword [0xa2e684]
mov dword [esp], eax
call fcn.0048f0dc
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa2e6d0], eax
mov eax, dword [0xa2e6d0]
cmp eax, 3
jne 0x490bc8
mov eax, 0xfffffffa
jmp 0x490c5d
mov eax, dword [0xa2e6d0]
cmp eax, 4
je 0x490be6
mov eax, dword [0xa2e6d0]
cmp eax, 0x1d
je 0x490be6
mov eax, dword [0xa2e6d0]
cmp eax, 0x1e
jne 0x490bed
mov eax, 0xfffffff7
jmp 0x490c5d
mov eax, dword [0xa2e6d0]
cmp eax, 5
je 0x490c15
mov eax, dword [0xa2e6d0]
cmp eax, 0x13
je 0x490c15
mov eax, dword [0xa2e6d0]
cmp eax, 0x21
je 0x490c15
mov eax, dword [0xa2e6d0]
cmp eax, 0x20
jne 0x490c1c
mov eax, 0xfffffff9
jmp 0x490c5d
mov eax, dword [0xa2e6d0]
cmp eax, 0xf
je 0x490c30
mov eax, dword [0xa2e6d0]
cmp eax, 0x15
jne 0x490c37
mov eax, 0xfffffff8
jmp 0x490c5d
mov eax, dword [0xa2e6d0]
cmp eax, 2
jne 0x490c48
mov eax, 0xfffffffb
jmp 0x490c5d
mov eax, 0xfffffffb
jmp 0x490c5d
mov eax, dword [0xa2e688]
mov byte [eax + 8], 1
mov eax, dword [0xa2e684]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret