Function at 0x47e3a1
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [0xa1c120]
test eax, eax
jne 0x47e3cc
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0044aa8e
mov dword [0xa1c120], eax
mov dword [esp + 4], 1
mov dword [esp], 0x53d7c7
call fcn.0044a90b
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0044b3b9
mov edx, eax
mov eax, dword [0xa1c120]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044abf5
call fcn.0047ceed
mov dword [0xa1c124], eax
mov edx, dword [0x69273c]
mov eax, dword [0xa1c124]
shl eax, 3
mov ecx, eax
shl ecx, 4
mov ebx, ecx
sub ebx, eax
mov eax, ebx
add eax, edx
mov dword [0xa1c128], 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 0x47e44c
cmp dword [ebp - 0x20], 0x73
jne 0x47e4c9
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 0x47e468
cmp dword [ebp - 0x20], 0x63
jne 0x47e4c9
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 0x47e484
cmp dword [ebp - 0x20], 0x72
jne 0x47e4c9
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 0x47e4a0
cmp dword [ebp - 0x20], 0x6e
jne 0x47e4c9
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 0x47e4c9
mov eax, dword [0xa1c128]
mov byte [eax + 0x70], 1
mov eax, dword [0xa1c124]
jmp 0x47ed6d
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x47e4dc
mov eax, dword [0xa1c128]
mov byte [eax + 9], 1
mov eax, dword [ebp + 0xc]
and eax, 2
test eax, eax
je 0x47e4ef
mov eax, dword [0xa1c128]
mov byte [eax + 0xa], 1
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x47e502
mov eax, dword [0xa1c128]
mov byte [eax + 0xb], 1
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x47e515
mov eax, dword [0xa1c128]
mov byte [eax + 0xc], 1
mov eax, dword [0xa1c128]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov edx, dword [0xa1c128]
mov eax, dword [0xa1c120]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0047d511
mov dword [0xa1c12c], eax
mov eax, dword [0xa1c12c]
test eax, eax
setne al
test al, al
je 0x47e573
mov eax, dword [0xa1c12c]
cmp eax, 0xffffffff
jne 0x47e573
mov eax, dword [0xa1c124]
mov dword [esp], eax
call fcn.0047d1ec
mov eax, 0xfffffff5
jmp 0x47ed6d
mov eax, dword [0x692738]
mov edx, dword [0xa1c124]
shl edx, 2
add eax, edx
mov dword [0xa1c130], eax
mov dword [0xa1c12c], 0
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x47e5ab
mov eax, dword [0xa1c12c]
or eax, 0x80000000
mov dword [0xa1c12c], eax
mov eax, dword [ebp + 0xc]
and eax, 2
test eax, eax
je 0x47e5c4
mov eax, dword [0xa1c12c]
or eax, 0x40000000
mov dword [0xa1c12c], eax
mov dword [0xa1c134], 3
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x47e5e5
mov eax, dword [0xa1c134]
xor eax, 1
mov dword [0xa1c134], eax
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x47e5fc
mov eax, dword [0xa1c134]
xor eax, 2
mov dword [0xa1c134], eax
mov eax, dword [0xa1c128]
movzx eax, byte [eax + 0x50]
test al, al
je 0x47ea3b
mov eax, dword [0xa1c138]
test eax, eax
jne 0x47e62f
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0044aa8e
mov dword [0xa1c138], eax
mov eax, dword [0xa1c128]
movzx eax, byte [eax + 0x50]
movzx eax, al
mov dword [esp], eax
call fcn.0044d0b0
mov ebx, eax
mov dword [esp], 0x53dcd9
call fcn.0044a87a
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0044b3b9
mov edx, eax
mov eax, dword [0xa1c138]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044abf5
mov dword [esp + 4], 2
mov dword [esp], 0x53dcdc
call fcn.0044a90b
mov edx, eax
mov eax, dword [0xa1c138]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044b3b9
mov edx, eax
mov eax, dword [0xa1c138]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044abf5
mov eax, dword [0xa1c138]
mov eax, dword [eax]
add eax, 2
mov byte [eax], 0x4d
mov ebx, dword [0xa1c130]
mov eax, dword [0xa1c12c]
mov edx, eax
mov eax, dword [0xa1c138]
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 [0xa1c130]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x47e729
mov eax, dword [0xa1c124]
mov dword [esp], eax
call fcn.0047d1ec
mov eax, 0xfffffff8
jmp 0x47ed6d
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 0
mov dword [esp], 0xa1c13c
call sub.msvcrt.dll_memset
mov dword [0xa1c13c], 0x1c
mov eax, dword [0xa1c130]
mov eax, dword [eax]
mov dword [esp + 4], 0xa1c13c
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 0x47e79f
mov eax, dword [0xa1c130]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa1c124]
mov dword [esp], eax
call fcn.0047d1ec
mov eax, 0xfffffff8
jmp 0x47ed6d
mov dword [esp + 8], 0x14
mov dword [esp + 4], 0
mov dword [esp], 0xa1c158
call sub.msvcrt.dll_memset
mov eax, dword [0xa1c128]
mov eax, dword [eax + 0x54]
mov dword [0xa1c140], eax
mov eax, dword [0xa1c128]
movzx eax, byte [eax + 0x5a]
movsx eax, al
mov dword [0xa1c12c], eax
mov eax, dword [0xa1c12c]
cmp eax, 0xa
jne 0x47e7ed
mov dword [0xa1c134], 0
mov eax, dword [0xa1c12c]
cmp eax, 0xf
jne 0x47e801
mov dword [0xa1c134], 1
mov eax, dword [0xa1c12c]
cmp eax, 0x14
jne 0x47e815
mov dword [0xa1c134], 2
mov eax, dword [0xa1c134]
mov byte [0xa1c150], al
mov eax, dword [0xa1c128]
movzx eax, byte [eax + 0x59]
mov byte [0xa1c14e], al
mov eax, dword [0xa1c128]
movzx eax, byte [eax + 0x58]
movsx eax, al
mov dword [0xa1c12c], eax
mov eax, dword [0xa1c12c]
test eax, eax
jne 0x47e851
mov dword [0xa1c134], 0
mov eax, dword [0xa1c12c]
cmp eax, 1
jne 0x47e865
mov dword [0xa1c134], 2
mov eax, dword [0xa1c12c]
cmp eax, 2
jne 0x47e879
mov dword [0xa1c134], 1
mov eax, dword [0xa1c12c]
cmp eax, 3
jne 0x47e88d
mov dword [0xa1c134], 4
mov eax, dword [0xa1c12c]
cmp eax, 4
jne 0x47e8a1
mov dword [0xa1c134], 3
mov eax, dword [0xa1c134]
mov byte [0xa1c14f], al
mov eax, dword [0xa1c134]
test eax, eax
jne 0x47e8c5
movzx eax, byte [0xa1c144]
and eax, 0xfffffffd
mov byte [0xa1c144], al
jmp 0x47e8d4
movzx eax, byte [0xa1c144]
or eax, 2
mov byte [0xa1c144], al
mov eax, dword [0xa1c128]
movzx eax, byte [eax + 0x5d]
test al, al
je 0x47e8f0
movzx eax, byte [0xa1c145]
and eax, 0xffffffcf
mov byte [0xa1c145], al
mov eax, dword [0xa1c128]
movzx eax, byte [eax + 0x5b]
test al, al
jne 0x47e90e
movzx eax, byte [0xa1c144]
or eax, 1
mov byte [0xa1c144], al
jmp 0x47e91d
movzx eax, byte [0xa1c144]
and eax, 0xfffffffe
mov byte [0xa1c144], al
mov byte [0xa1c154], 0x1a
mov eax, dword [0xa1c130]
mov eax, dword [eax]
mov dword [esp + 4], 0xa1c13c
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 0x47e974
mov eax, dword [0xa1c130]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa1c124]
mov dword [esp], eax
call fcn.0047d1ec
mov eax, 0xfffffff8
jmp 0x47ed6d
mov eax, dword [0xa1c128]
mov eax, dword [eax + 0x68]
test eax, eax
jne 0x47e9a0
mov dword [0xa1c158], 0xffffffff
mov dword [0xa1c15c], 0
mov dword [0xa1c160], 0
jmp 0x47e9c1
mov dword [0xa1c158], 0
mov dword [0xa1c15c], 0
mov eax, dword [0xa1c128]
mov eax, dword [eax + 0x68]
mov dword [0xa1c160], eax
mov dword [0xa1c164], 0
mov eax, dword [0xa1c128]
mov eax, dword [eax + 0x64]
mov dword [0xa1c168], eax
mov eax, dword [0xa1c130]
mov eax, dword [eax]
mov dword [esp + 4], 0xa1c158
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 0x47ea28
mov eax, dword [0xa1c130]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa1c124]
mov dword [esp], eax
call fcn.0047d1ec
mov eax, 0xfffffff8
jmp 0x47ed6d
mov eax, dword [0xa1c128]
mov byte [eax + 8], 1
mov eax, dword [0xa1c124]
jmp 0x47ed6d
mov dword [0xa1c16c], 3
cmp dword [ebp + 0x14], 0
je 0x47ea55
mov dword [0xa1c16c], 4
mov ebx, dword [0xa1c130]
mov eax, dword [0xa1c16c]
mov dword [ebp - 0x2c], eax
mov eax, dword [0xa1c134]
mov edi, eax
mov eax, dword [0xa1c12c]
mov esi, eax
mov eax, dword [0xa1c120]
mov dword [esp], eax
call fcn.0043f843
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 [0xa1c130]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x47ebdd
cmp dword [ebp + 0x14], 3
jne 0x47eaef
mov dword [0xa1c12c], 0x80000000
mov eax, dword [0xa1c128]
mov byte [eax + 9], 1
mov eax, dword [0xa1c128]
mov byte [eax + 0xa], 0
add dword [ebp + 0x14], 1
jmp 0x47ea55
cmp dword [ebp + 0x14], 4
jne 0x47eb1a
mov dword [0xa1c12c], 0x40000000
mov eax, dword [0xa1c128]
mov byte [eax + 9], 0
mov eax, dword [0xa1c128]
mov byte [eax + 0xa], 1
add dword [ebp + 0x14], 1
jmp 0x47ea55
mov eax, dword [0xa1c124]
mov dword [esp], eax
call fcn.0047d1ec
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa1c170], eax
mov eax, dword [0xa1c170]
cmp eax, 3
jne 0x47eb47
mov eax, 0xfffffffa
jmp 0x47ed6d
mov eax, dword [0xa1c170]
cmp eax, 4
je 0x47eb65
mov eax, dword [0xa1c170]
cmp eax, 0x1d
je 0x47eb65
mov eax, dword [0xa1c170]
cmp eax, 0x1e
jne 0x47eb6f
mov eax, 0xfffffff7
jmp 0x47ed6d
mov eax, dword [0xa1c170]
cmp eax, 5
je 0x47eb97
mov eax, dword [0xa1c170]
cmp eax, 0x13
je 0x47eb97
mov eax, dword [0xa1c170]
cmp eax, 0x21
je 0x47eb97
mov eax, dword [0xa1c170]
cmp eax, 0x20
jne 0x47eba1
mov eax, 0xfffffff9
jmp 0x47ed6d
mov eax, dword [0xa1c170]
cmp eax, 0xf
je 0x47ebb5
mov eax, dword [0xa1c170]
cmp eax, 0x15
jne 0x47ebbf
mov eax, 0xfffffff8
jmp 0x47ed6d
mov eax, dword [0xa1c170]
cmp eax, 2
jne 0x47ebd3
mov eax, 0xfffffffb
jmp 0x47ed6d
mov eax, 0xfffffffb
jmp 0x47ed6d
cmp dword [ebp + 0x14], 2
jne 0x47ed5f
mov eax, dword [0xa1c130]
mov eax, dword [eax]
mov dword [esp + 4], 0xa1c174
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [0xa1c178], eax
mov eax, dword [0xa1c178]
test eax, eax
jne 0x47ec1e
mov eax, dword [0xa1c174]
test eax, eax
je 0x47ed5f
mov eax, dword [0xa1c130]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [0xa1c16c], 5
mov ebx, dword [0xa1c130]
mov eax, dword [0xa1c16c]
mov dword [ebp - 0x30], eax
mov eax, dword [0xa1c134]
mov edi, eax
mov eax, dword [0xa1c12c]
mov esi, eax
mov eax, dword [0xa1c120]
mov dword [esp], eax
call fcn.0043f843
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 [0xa1c130]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x47ed5f
mov eax, dword [0xa1c124]
mov dword [esp], eax
call fcn.0047d1ec
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa1c170], eax
mov eax, dword [0xa1c170]
cmp eax, 3
jne 0x47ecd8
mov eax, 0xfffffffa
jmp 0x47ed6d
mov eax, dword [0xa1c170]
cmp eax, 4
je 0x47ecf6
mov eax, dword [0xa1c170]
cmp eax, 0x1d
je 0x47ecf6
mov eax, dword [0xa1c170]
cmp eax, 0x1e
jne 0x47ecfd
mov eax, 0xfffffff7
jmp 0x47ed6d
mov eax, dword [0xa1c170]
cmp eax, 5
je 0x47ed25
mov eax, dword [0xa1c170]
cmp eax, 0x13
je 0x47ed25
mov eax, dword [0xa1c170]
cmp eax, 0x21
je 0x47ed25
mov eax, dword [0xa1c170]
cmp eax, 0x20
jne 0x47ed2c
mov eax, 0xfffffff9
jmp 0x47ed6d
mov eax, dword [0xa1c170]
cmp eax, 0xf
je 0x47ed40
mov eax, dword [0xa1c170]
cmp eax, 0x15
jne 0x47ed47
mov eax, 0xfffffff8
jmp 0x47ed6d
mov eax, dword [0xa1c170]
cmp eax, 2
jne 0x47ed58
mov eax, 0xfffffffb
jmp 0x47ed6d
mov eax, 0xfffffffb
jmp 0x47ed6d
mov eax, dword [0xa1c128]
mov byte [eax + 8], 1
mov eax, dword [0xa1c124]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret