Function at 0x47f62d
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [0xa1d0e0]
test eax, eax
jne 0x47f658
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0044bd1a
mov dword [0xa1d0e0], eax
mov dword [esp + 4], 1
mov dword [esp], 0x53dfe7
call fcn.0044bb97
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0044c645
mov edx, eax
mov eax, dword [0xa1d0e0]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044be81
call fcn.0047e179
mov dword [0xa1d0e4], eax
mov edx, dword [0x6936fc]
mov eax, dword [0xa1d0e4]
shl eax, 3
mov ecx, eax
shl ecx, 4
mov ebx, ecx
sub ebx, eax
mov eax, ebx
add eax, edx
mov dword [0xa1d0e8], 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 0x47f6d8
cmp dword [ebp - 0x20], 0x73
jne 0x47f755
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 0x47f6f4
cmp dword [ebp - 0x20], 0x63
jne 0x47f755
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 0x47f710
cmp dword [ebp - 0x20], 0x72
jne 0x47f755
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 0x47f72c
cmp dword [ebp - 0x20], 0x6e
jne 0x47f755
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 0x47f755
mov eax, dword [0xa1d0e8]
mov byte [eax + 0x70], 1
mov eax, dword [0xa1d0e4]
jmp 0x47fff9
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x47f768
mov eax, dword [0xa1d0e8]
mov byte [eax + 9], 1
mov eax, dword [ebp + 0xc]
and eax, 2
test eax, eax
je 0x47f77b
mov eax, dword [0xa1d0e8]
mov byte [eax + 0xa], 1
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x47f78e
mov eax, dword [0xa1d0e8]
mov byte [eax + 0xb], 1
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x47f7a1
mov eax, dword [0xa1d0e8]
mov byte [eax + 0xc], 1
mov eax, dword [0xa1d0e8]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov edx, dword [0xa1d0e8]
mov eax, dword [0xa1d0e0]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0047e79d
mov dword [0xa1d0ec], eax
mov eax, dword [0xa1d0ec]
test eax, eax
setne al
test al, al
je 0x47f7ff
mov eax, dword [0xa1d0ec]
cmp eax, 0xffffffff
jne 0x47f7ff
mov eax, dword [0xa1d0e4]
mov dword [esp], eax
call fcn.0047e478
mov eax, 0xfffffff5
jmp 0x47fff9
mov eax, dword [0x6936f8]
mov edx, dword [0xa1d0e4]
shl edx, 2
add eax, edx
mov dword [0xa1d0f0], eax
mov dword [0xa1d0ec], 0
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x47f837
mov eax, dword [0xa1d0ec]
or eax, 0x80000000
mov dword [0xa1d0ec], eax
mov eax, dword [ebp + 0xc]
and eax, 2
test eax, eax
je 0x47f850
mov eax, dword [0xa1d0ec]
or eax, 0x40000000
mov dword [0xa1d0ec], eax
mov dword [0xa1d0f4], 3
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x47f871
mov eax, dword [0xa1d0f4]
xor eax, 1
mov dword [0xa1d0f4], eax
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x47f888
mov eax, dword [0xa1d0f4]
xor eax, 2
mov dword [0xa1d0f4], eax
mov eax, dword [0xa1d0e8]
movzx eax, byte [eax + 0x50]
test al, al
je 0x47fcc7
mov eax, dword [0xa1d0f8]
test eax, eax
jne 0x47f8bb
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0044bd1a
mov dword [0xa1d0f8], eax
mov eax, dword [0xa1d0e8]
movzx eax, byte [eax + 0x50]
movzx eax, al
mov dword [esp], eax
call fcn.0044e33c
mov ebx, eax
mov dword [esp], 0x53e4f9
call fcn.0044bb06
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0044c645
mov edx, eax
mov eax, dword [0xa1d0f8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044be81
mov dword [esp + 4], 2
mov dword [esp], 0x53e4fc
call fcn.0044bb97
mov edx, eax
mov eax, dword [0xa1d0f8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044c645
mov edx, eax
mov eax, dword [0xa1d0f8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0044be81
mov eax, dword [0xa1d0f8]
mov eax, dword [eax]
add eax, 2
mov byte [eax], 0x4d
mov ebx, dword [0xa1d0f0]
mov eax, dword [0xa1d0ec]
mov edx, eax
mov eax, dword [0xa1d0f8]
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 [0xa1d0f0]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x47f9b5
mov eax, dword [0xa1d0e4]
mov dword [esp], eax
call fcn.0047e478
mov eax, 0xfffffff8
jmp 0x47fff9
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 0
mov dword [esp], 0xa1d0fc
call sub.msvcrt.dll_memset
mov dword [0xa1d0fc], 0x1c
mov eax, dword [0xa1d0f0]
mov eax, dword [eax]
mov dword [esp + 4], 0xa1d0fc
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 0x47fa2b
mov eax, dword [0xa1d0f0]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa1d0e4]
mov dword [esp], eax
call fcn.0047e478
mov eax, 0xfffffff8
jmp 0x47fff9
mov dword [esp + 8], 0x14
mov dword [esp + 4], 0
mov dword [esp], 0xa1d118
call sub.msvcrt.dll_memset
mov eax, dword [0xa1d0e8]
mov eax, dword [eax + 0x54]
mov dword [0xa1d100], eax
mov eax, dword [0xa1d0e8]
movzx eax, byte [eax + 0x5a]
movsx eax, al
mov dword [0xa1d0ec], eax
mov eax, dword [0xa1d0ec]
cmp eax, 0xa
jne 0x47fa79
mov dword [0xa1d0f4], 0
mov eax, dword [0xa1d0ec]
cmp eax, 0xf
jne 0x47fa8d
mov dword [0xa1d0f4], 1
mov eax, dword [0xa1d0ec]
cmp eax, 0x14
jne 0x47faa1
mov dword [0xa1d0f4], 2
mov eax, dword [0xa1d0f4]
mov byte [0xa1d110], al
mov eax, dword [0xa1d0e8]
movzx eax, byte [eax + 0x59]
mov byte [0xa1d10e], al
mov eax, dword [0xa1d0e8]
movzx eax, byte [eax + 0x58]
movsx eax, al
mov dword [0xa1d0ec], eax
mov eax, dword [0xa1d0ec]
test eax, eax
jne 0x47fadd
mov dword [0xa1d0f4], 0
mov eax, dword [0xa1d0ec]
cmp eax, 1
jne 0x47faf1
mov dword [0xa1d0f4], 2
mov eax, dword [0xa1d0ec]
cmp eax, 2
jne 0x47fb05
mov dword [0xa1d0f4], 1
mov eax, dword [0xa1d0ec]
cmp eax, 3
jne 0x47fb19
mov dword [0xa1d0f4], 4
mov eax, dword [0xa1d0ec]
cmp eax, 4
jne 0x47fb2d
mov dword [0xa1d0f4], 3
mov eax, dword [0xa1d0f4]
mov byte [0xa1d10f], al
mov eax, dword [0xa1d0f4]
test eax, eax
jne 0x47fb51
movzx eax, byte [0xa1d104]
and eax, 0xfffffffd
mov byte [0xa1d104], al
jmp 0x47fb60
movzx eax, byte [0xa1d104]
or eax, 2
mov byte [0xa1d104], al
mov eax, dword [0xa1d0e8]
movzx eax, byte [eax + 0x5d]
test al, al
je 0x47fb7c
movzx eax, byte [0xa1d105]
and eax, 0xffffffcf
mov byte [0xa1d105], al
mov eax, dword [0xa1d0e8]
movzx eax, byte [eax + 0x5b]
test al, al
jne 0x47fb9a
movzx eax, byte [0xa1d104]
or eax, 1
mov byte [0xa1d104], al
jmp 0x47fba9
movzx eax, byte [0xa1d104]
and eax, 0xfffffffe
mov byte [0xa1d104], al
mov byte [0xa1d114], 0x1a
mov eax, dword [0xa1d0f0]
mov eax, dword [eax]
mov dword [esp + 4], 0xa1d0fc
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 0x47fc00
mov eax, dword [0xa1d0f0]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa1d0e4]
mov dword [esp], eax
call fcn.0047e478
mov eax, 0xfffffff8
jmp 0x47fff9
mov eax, dword [0xa1d0e8]
mov eax, dword [eax + 0x68]
test eax, eax
jne 0x47fc2c
mov dword [0xa1d118], 0xffffffff
mov dword [0xa1d11c], 0
mov dword [0xa1d120], 0
jmp 0x47fc4d
mov dword [0xa1d118], 0
mov dword [0xa1d11c], 0
mov eax, dword [0xa1d0e8]
mov eax, dword [eax + 0x68]
mov dword [0xa1d120], eax
mov dword [0xa1d124], 0
mov eax, dword [0xa1d0e8]
mov eax, dword [eax + 0x64]
mov dword [0xa1d128], eax
mov eax, dword [0xa1d0f0]
mov eax, dword [eax]
mov dword [esp + 4], 0xa1d118
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 0x47fcb4
mov eax, dword [0xa1d0f0]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa1d0e4]
mov dword [esp], eax
call fcn.0047e478
mov eax, 0xfffffff8
jmp 0x47fff9
mov eax, dword [0xa1d0e8]
mov byte [eax + 8], 1
mov eax, dword [0xa1d0e4]
jmp 0x47fff9
mov dword [0xa1d12c], 3
cmp dword [ebp + 0x14], 0
je 0x47fce1
mov dword [0xa1d12c], 4
mov ebx, dword [0xa1d0f0]
mov eax, dword [0xa1d12c]
mov dword [ebp - 0x2c], eax
mov eax, dword [0xa1d0f4]
mov edi, eax
mov eax, dword [0xa1d0ec]
mov esi, eax
mov eax, dword [0xa1d0e0]
mov dword [esp], eax
call fcn.00440acf
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 [0xa1d0f0]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x47fe69
cmp dword [ebp + 0x14], 3
jne 0x47fd7b
mov dword [0xa1d0ec], 0x80000000
mov eax, dword [0xa1d0e8]
mov byte [eax + 9], 1
mov eax, dword [0xa1d0e8]
mov byte [eax + 0xa], 0
add dword [ebp + 0x14], 1
jmp 0x47fce1
cmp dword [ebp + 0x14], 4
jne 0x47fda6
mov dword [0xa1d0ec], 0x40000000
mov eax, dword [0xa1d0e8]
mov byte [eax + 9], 0
mov eax, dword [0xa1d0e8]
mov byte [eax + 0xa], 1
add dword [ebp + 0x14], 1
jmp 0x47fce1
mov eax, dword [0xa1d0e4]
mov dword [esp], eax
call fcn.0047e478
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa1d130], eax
mov eax, dword [0xa1d130]
cmp eax, 3
jne 0x47fdd3
mov eax, 0xfffffffa
jmp 0x47fff9
mov eax, dword [0xa1d130]
cmp eax, 4
je 0x47fdf1
mov eax, dword [0xa1d130]
cmp eax, 0x1d
je 0x47fdf1
mov eax, dword [0xa1d130]
cmp eax, 0x1e
jne 0x47fdfb
mov eax, 0xfffffff7
jmp 0x47fff9
mov eax, dword [0xa1d130]
cmp eax, 5
je 0x47fe23
mov eax, dword [0xa1d130]
cmp eax, 0x13
je 0x47fe23
mov eax, dword [0xa1d130]
cmp eax, 0x21
je 0x47fe23
mov eax, dword [0xa1d130]
cmp eax, 0x20
jne 0x47fe2d
mov eax, 0xfffffff9
jmp 0x47fff9
mov eax, dword [0xa1d130]
cmp eax, 0xf
je 0x47fe41
mov eax, dword [0xa1d130]
cmp eax, 0x15
jne 0x47fe4b
mov eax, 0xfffffff8
jmp 0x47fff9
mov eax, dword [0xa1d130]
cmp eax, 2
jne 0x47fe5f
mov eax, 0xfffffffb
jmp 0x47fff9
mov eax, 0xfffffffb
jmp 0x47fff9
cmp dword [ebp + 0x14], 2
jne 0x47ffeb
mov eax, dword [0xa1d0f0]
mov eax, dword [eax]
mov dword [esp + 4], 0xa1d134
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [0xa1d138], eax
mov eax, dword [0xa1d138]
test eax, eax
jne 0x47feaa
mov eax, dword [0xa1d134]
test eax, eax
je 0x47ffeb
mov eax, dword [0xa1d0f0]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [0xa1d12c], 5
mov ebx, dword [0xa1d0f0]
mov eax, dword [0xa1d12c]
mov dword [ebp - 0x30], eax
mov eax, dword [0xa1d0f4]
mov edi, eax
mov eax, dword [0xa1d0ec]
mov esi, eax
mov eax, dword [0xa1d0e0]
mov dword [esp], eax
call fcn.00440acf
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 [0xa1d0f0]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x47ffeb
mov eax, dword [0xa1d0e4]
mov dword [esp], eax
call fcn.0047e478
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa1d130], eax
mov eax, dword [0xa1d130]
cmp eax, 3
jne 0x47ff64
mov eax, 0xfffffffa
jmp 0x47fff9
mov eax, dword [0xa1d130]
cmp eax, 4
je 0x47ff82
mov eax, dword [0xa1d130]
cmp eax, 0x1d
je 0x47ff82
mov eax, dword [0xa1d130]
cmp eax, 0x1e
jne 0x47ff89
mov eax, 0xfffffff7
jmp 0x47fff9
mov eax, dword [0xa1d130]
cmp eax, 5
je 0x47ffb1
mov eax, dword [0xa1d130]
cmp eax, 0x13
je 0x47ffb1
mov eax, dword [0xa1d130]
cmp eax, 0x21
je 0x47ffb1
mov eax, dword [0xa1d130]
cmp eax, 0x20
jne 0x47ffb8
mov eax, 0xfffffff9
jmp 0x47fff9
mov eax, dword [0xa1d130]
cmp eax, 0xf
je 0x47ffcc
mov eax, dword [0xa1d130]
cmp eax, 0x15
jne 0x47ffd3
mov eax, 0xfffffff8
jmp 0x47fff9
mov eax, dword [0xa1d130]
cmp eax, 2
jne 0x47ffe4
mov eax, 0xfffffffb
jmp 0x47fff9
mov eax, 0xfffffffb
jmp 0x47fff9
mov eax, dword [0xa1d0e8]
mov byte [eax + 8], 1
mov eax, dword [0xa1d0e4]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret