Function at 0x140005974
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xba0
mov rax, qword [0x14002f318]
xor rax, rsp
mov qword [rsp + 0xb90], rax
xor edx, edx
mov r13, rcx
lea rcx, [rsp + 0x30]
lea r8d, [rdx + 6]
call fcn.140013900
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x104
call fcn.140013900
lea rcx, [rsp + 0x1f0]
xor edx, edx
mov r8d, 0x88
call fcn.140013900
lea rcx, [rsp + 0x390]
xor edx, edx
mov r8d, 0x800
call fcn.140013900
xor r12d, r12d
lea rbx, [0x140031d40]
mov word [rsp + 0x30], r12w
or r15d, 0xffffffff
lea rdi, [0x1400205f9]
lea ebp, [r12 + 1]
mov r14d, 0x400
call fcn.1400033c4
cmp eax, 2
jl 0x140005a4e
mov rcx, r13
call fcn.140004018
mov rcx, r13
call fcn.1400043dc
mov edx, 0x111f
mov rcx, r13
call fcn.1400049f4
mov edx, 0x101
mov rcx, r13
call fcn.1400049f4
cmp dword [0x140030d10], r12d
je 0x140005a96
lea rax, [rsp + 0x280]
lea rcx, [0x140031de0]
mov r9d, 7
mov qword [rsp + 0x28], rax
mov r8d, ebp
mov rdx, rbx
mov word [rsp + 0x20], bp
call fcn.1400070ac
lea rdx, [rsp + 0x280]
lea rcx, [0x140031ea0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rdx, [0x140031ea0]
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rdx, [rsp + 0x1f0]
lea rcx, [0x140031ea0]
mov r8d, 0x1000
mov word [rsp + 0x150], r12w
mov word [rsp + 0x152], r12w
call qword [sym.imp.KERNEL32.dll_OpenFile]
movsxd rsi, eax
cmp esi, r15d
jne 0x140005b03
lea rax, str.Application_Error
xor r9d, r9d
movzx r15d, bp
mov qword [rsp + 0x28], rax
lea rax, str.Unable_to_create_file_for_file_transfer
mov r8d, ebp
mov qword [rsp + 0x20], rax
xor edx, edx
jmp 0x140005b63
mov ecx, esi
call qword [sym.imp.KERNEL32.dll__lclose]
lea rax, [rsp + 0x50]
mov r9d, 7
mov qword [rsp + 0x28], rax
lea eax, [r9 - 1]
lea rcx, [0x140031de0]
mov r8d, ebp
mov rdx, rbx
mov word [rsp + 0x20], ax
call fcn.1400070ac
mov r15w, ax
cmp ax, r12w
je 0x140005b6d
call fcn.1400033c4
cmp eax, ebp
jl 0x140005b96
lea rax, str.DG_CONTROL_DAT_SETUPFILEXFER_MSG_SET
mov r9d, ebp
mov edx, ebp
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
movzx r8d, r15w
mov rcx, r13
call fcn.140003194
jmp 0x140005b96
lea rcx, [0x140031de0]
mov r9d, 0x105
mov r8d, 2
mov rdx, rbx
mov qword [rsp + 0x28], r12
mov word [rsp + 0x20], bp
call fcn.1400070ac
mov r15w, ax
movzx ecx, r15w
sub ecx, ebp
je 0x140006004
sub ecx, 2
je 0x140005f44
cmp ecx, 3
je 0x140005ccf
call fcn.1400033c4
cmp eax, ebp
jl 0x140005be5
lea rax, str.DG_IMAGE_DAT_IMAGEFILEXFER_MSG_GET
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea rax, str.Unknown_Failure
xor edx, edx
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.140003194
lea rax, [rsp + 0x30]
lea rcx, [0x140031de0]
mov r9d, 5
mov qword [rsp + 0x28], rax
mov eax, 0x701
mov r8d, ebp
mov rdx, rbx
mov word [rsp + 0x20], ax
call fcn.1400070ac
movzx ebx, ax
cmp ax, r12w
je 0x140005c45
call fcn.1400033c4
cmp eax, ebp
jl 0x140005c45
lea rax, str.DG_CONTROL___DAT_PENDINGXFERS___MSG_ENDXFER
mov r9d, ebp
mov edx, ebp
mov qword [rsp + 0x28], rax
movzx r8d, bx
mov rcx, r13
mov qword [rsp + 0x20], rdi
call fcn.140003194
cmp word [rsp + 0x30], r12w
jne 0x140005c5d
cmp dword [0x140030d10], r12d
jne 0x140005c5d
xor ecx, ecx
call fcn.140005148
xor r9d, r9d
xor r8d, r8d
mov edx, r14d
mov rcx, r13
call qword [sym.imp.USER32.dll_SendMessageA]
call fcn.1400033c4
cmp eax, 2
jge 0x140005c87
call fcn.140003000
cmp eax, r12d
je 0x140005ef4
movzx r8d, word [rsp + 0x30]
lea rdx, str.Images___d
lea rcx, [rsp + 0x390]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rax, str.Pending_Transfers
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x390]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
call fcn.140003194
jmp 0x140005ef4
lea rcx, [rsp + 0x160]
xor edx, edx
mov r8d, 0x88
mov r14d, 0x8000
call fcn.140013900
xor edx, edx
lea r8d, [rdx + 0xe]
lea rcx, [rsp + 0x38]
call fcn.140013900
call fcn.1400033c4
cmp eax, 3
jl 0x140005d2c
lea rax, str.DG_IMAGE_DAT_IMAGEFILEXFER_MSG_GET
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea rax, str.TWRC_XFERDONE
xor edx, edx
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.140003194
lea rdx, [rsp + 0x160]
lea rcx, [rsp + 0x50]
xor r8d, r8d
mov rdi, r12
call qword [sym.imp.KERNEL32.dll_OpenFile]
mov ebx, eax
or eax, 0xffffffff
cmp bx, ax
je 0x140005dea
mov rcx, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
movsx r12d, bx
lea rdx, [rsp + 0x38]
mov ecx, r12d
mov r8d, 0xe
mov edi, eax
call qword [sym.imp.KERNEL32.dll__lread]
mov ecx, dword [rsp + 0x3a]
test ecx, ecx
jne 0x140005d87
lea ecx, [rdi - 0xe]
mov dword [rsp + 0x3a], ecx
call fcn.140012018
mov rdi, rax
test rax, rax
je 0x140005dde
mov rcx, rax
call fcn.140012060
mov esi, dword [rsp + 0x3a]
add esi, 0xfffffff2
mov rbp, rax
je 0x140005dd1
movzx ecx, r14w
mov rdx, rbp
cmp esi, ecx
mov ecx, r12d
cmovb r14w, si
movzx ebx, r14w
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll__lread]
movzx eax, r14w
add rbp, rax
sub esi, ebx
jne 0x140005da8
mov rcx, rdi
call fcn.140012080
mov ebp, 1
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll__lclose]
xor r12d, r12d
lea rax, [rsp + 0x30]
lea rdx, [0x140031d40]
lea rcx, [0x140031de0]
mov qword [rsp + 0x28], rax
mov eax, 0x701
mov r9d, 5
mov r8d, ebp
mov word [rsp + 0x20], ax
call fcn.1400070ac
movzx ebx, ax
cmp ax, r12w
je 0x140005e55
call fcn.1400033c4
cmp eax, ebp
jl 0x140005e55
lea rax, str.DG_CONTROL___DAT_PENDINGXFERS___MSG_ENDXFER
mov r9d, ebp
mov edx, ebp
mov qword [rsp + 0x28], rax
lea rax, [0x1400205f9]
movzx r8d, bx
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.140003194
cmp word [rsp + 0x30], r12w
jne 0x140005e6d
cmp dword [0x140030d10], r12d
jne 0x140005e6d
xor ecx, ecx
call fcn.140005148
mov r14d, 0x400
xor r9d, r9d
mov r8, rdi
mov edx, r14d
mov rcx, r13
call qword [sym.imp.USER32.dll_SendMessageA]
call fcn.140003000
cmp eax, r12d
jne 0x140005e96
mov word [0x140030a28], bp
call fcn.1400033c4
cmp eax, 2
jge 0x140005eaa
call fcn.140003000
cmp eax, r12d
je 0x140005eed
movzx r8d, word [rsp + 0x30]
lea rdx, str.Images___d
lea rcx, [rsp + 0x390]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rax, str.Pending_Transfers
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x390]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
call fcn.140003194
lea rdi, [0x1400205f9]
cmp word [rsp + 0x30], r12w
je 0x140005f13
cmp r15w, bp
lea rbx, [0x140031d40]
mov r15d, 0xffffffff
jne 0x140005a1a
mov rcx, qword [rsp + 0xb90]
xor rcx, rsp
call fcn.140013bb0
lea r11, [rsp + 0xba0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
call fcn.1400033c4
cmp eax, ebp
jl 0x140005f75
lea rax, str.DG_IMAGE_DAT_IMAGEFILEXFER_MSG_GET
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea rax, str.TWRC_CANCEL
xor edx, edx
mov qword [rsp + 0x20], rax
mov rcx, r13
call fcn.140003194
lea rax, [rsp + 0x30]
lea rcx, [0x140031de0]
mov r9d, 5
mov qword [rsp + 0x28], rax
mov eax, 0x701
mov r8d, ebp
mov rdx, rbx
mov word [rsp + 0x20], ax
call fcn.1400070ac
movzx ebx, ax
cmp ax, r12w
je 0x140005fd5
call fcn.1400033c4
cmp eax, ebp
jl 0x140005fd5
lea rax, str.DG_CONTROL___DAT_PENDINGXFERS___MSG_ENDXFER
mov r9d, ebp
movzx r8d, bx
mov qword [rsp + 0x28], rax
mov edx, ebp
mov rcx, r13
mov qword [rsp + 0x20], rdi
call fcn.140003194
cmp word [rsp + 0x30], r12w
jne 0x140005fed
cmp dword [0x140030d10], r12d
jne 0x140005fed
xor ecx, ecx
call fcn.140005148
xor r9d, r9d
xor r8d, r8d
mov edx, r14d
mov rcx, r13
call qword [sym.imp.USER32.dll_SendMessageA]
jmp 0x140005ef4
call fcn.1400033c4
cmp eax, ebp
jl 0x140005f75
lea rax, str.DG_IMAGE_DAT_IMAGEFILEXFER_MSG_GET
mov r9d, ebp
mov r8d, ebp
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
mov edx, ebp
jmp 0x140005f6d