Function at 0x140047504
Capabilities:
Get file attributes
Get file size

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x520]
sub rsp, 0x620
mov rax, qword [0x1402557c0]
xor rax, rsp
mov qword [rbp + 0x510], rax
mov r15d, r8d
mov rdi, rdx
mov rsi, rcx
xor r13d, r13d
cmp dword [rcx + 0x2c], r13d
jne 0x14004778a
test rdx, rdx
je 0x140047a88
lea r14, [rcx + 0xa0]
mov rcx, r14
call fcn.1400312a8
mov rdx, rdi
lea rcx, [rsp + 0x50]
call fcn.140003ecc
nop
mov rbx, qword [rsp + 0x50]
cmp dword [rbx - 0x10], r13d
jl 0x1400475f3
lea rdx, [0x1401d153c]
mov rcx, rbx
call fcn.1401a9284
mov rbx, qword [rsp + 0x50]
test rax, rax
je 0x14004759f
sub eax, ebx
cmp eax, 0xffffffff
jne 0x1400476d5
cmp dword [rbx - 0x10], r13d
jl 0x1400475f3
lea rdx, [0x1401d7298]
mov rcx, rbx
call fcn.1401a9284
mov rbx, qword [rsp + 0x50]
test rax, rax
je 0x1400475c9
sub eax, ebx
cmp eax, 0xffffffff
jne 0x1400476d5
cmp dword [rbx - 0x10], r13d
jl 0x1400475f3
lea rdx, [0x1401cf2ac]
mov rcx, rbx
call fcn.1401a9284
test rax, rax
je 0x1400475f3
mov rbx, qword [rsp + 0x50]
sub eax, ebx
cmp eax, 0xffffffff
jne 0x1400476d5
mov r12d, 0x104
mov r8d, r12d
lea rdx, [rbp + 0x400]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x1400476d0
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r13
lea ebx, [r12 - 4]
mov qword [rsp + 0x20], rbx
lea r9, [rbp + 0x300]
mov r8d, 3
lea rdx, [rsp + 0x58]
lea rcx, [rbp + 0x400]
call fcn.1401a9b64
mov qword [rsp + 0x40], rbx
lea rax, [rbp + 0x100]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
lea rax, [rbp + 0x200]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.1401a9b64
lea rax, [rbp + 0x100]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x200]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x300]
lea r8, [rsp + 0x58]
mov edx, r12d
lea rcx, [rbp - 0x10]
call fcn.1401abe10
lea rcx, [rbp - 0x10]
call fcn.1401a8e90
mov r8d, eax
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x50]
call fcn.140003340
mov rbx, qword [rsp + 0x50]
test r15d, r15d
je 0x14004772a
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140047725
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, r15d
ja 0x140047764
mov rbx, qword [rsp + 0x50]
mov edi, dword [rsi + 0x38]
call fcn.140023528
mov rcx, qword [rax + 0x10]
neg edi
sbb eax, eax
and eax, 0x1000
add eax, 0x2010
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.USER32.dll_LoadImageA]
mov qword [r14], rax
test rax, rax
jne 0x1400477b6
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14004778a
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140140b35.0]
xor eax, eax
mov rcx, qword [rbp + 0x510]
xor rcx, rsp
call fcn.14019d930
mov rbx, qword [rsp + 0x670]
add rsp, 0x620
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [rbp - 0x30]
mov ebx, 0x20
mov edx, ebx
mov rcx, rax
call qword [sym.imp.GDI32.dll_GetObjectA]
test eax, eax
jne 0x1400477dc
mov rcx, qword [r14]
call qword [sym.imp.GDI32.dll_DeleteObject]
mov qword [r14], r13
jmp 0x140047764
mov dword [rsi + 0x1c], 1
lea rcx, [rsi + 0xb8]
lea rdx, [rsp + 0x50]
call fcn.1400059e0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x14004780a
mov dword [rsi + 0x28], 1
movzx eax, word [rbp - 0x1e]
mov dword [rsi + 0xc], eax
add eax, 0xfffffff7
cmp eax, 0x16
ja 0x1400479f7
cmp qword [r14], r13
je 0x1400479f7
lea rcx, [rsp + 0x60]
call fcn.14001ea38
nop
xor ecx, ecx
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.14001f620
lea r8, [rbp - 0x50]
mov edx, ebx
mov rcx, qword [r14]
call qword [sym.imp.GDI32.dll_GetObjectA]
test eax, eax
je 0x1400479ed
mov rdx, qword [r14]
test rdx, rdx
je 0x1400479ed
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.GDI32.dll_SelectObject]
mov rbx, rax
test rax, rax
je 0x1400479ed
mov edi, dword [rbp - 0x4c]
mov dword [rsp + 0x58], edi
mov r12d, dword [rbp - 0x48]
mov r8d, r12d
mov edx, edi
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov r15, rax
mov qword [rbp - 0x58], rax
test rax, rax
jne 0x1400478ba
mov rdx, rbx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.GDI32.dll_SelectObject]
jmp 0x1400479ed
lea rcx, [rbp - 0x80]
call fcn.14001ea38
nop
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov rdx, rax
lea rcx, [rbp - 0x80]
call fcn.14001f620
mov rdx, r15
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.GDI32.dll_SelectObject]
mov qword [rbp - 0x60], rax
test rax, rax
jne 0x14004790d
mov rdx, rbx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.GDI32.dll_SelectObject]
mov rcx, r15
call qword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x1400479e3
mov dword [rsp + 0x40], 0xcc0020
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x30], r13d
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
mov r9d, edi
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.GDI32.dll_BitBlt]
mov r15d, r13d
test edi, edi
jle 0x1400479b7
mov eax, dword [rsp + 0x58]
mov edi, r13d
test r12d, r12d
jle 0x1400479af
mov r8d, edi
mov edx, r15d
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.GDI32.dll_GetPixel]
mov r13d, eax
cmp word [rbp - 0x3e], 0x18
jne 0x14004797f
cmp dword [0x1402543d0], 0
jne 0x14004797f
mov ecx, eax
call fcn.1400483f0
jmp 0x140047989
xor edx, edx
mov ecx, r13d
call fcn.1400482d0
cmp r13d, eax
je 0x1400479a1
mov r9d, eax
mov r8d, edi
mov edx, r15d
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.GDI32.dll_SetPixel]
inc edi
cmp edi, r12d
jl 0x140047953
mov eax, dword [rsp + 0x58]
xor r13d, r13d
inc r15d
cmp r15d, eax
jl 0x14004794b
mov rdx, qword [rbp - 0x60]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.GDI32.dll_SelectObject]
mov rdx, rbx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.GDI32.dll_SelectObject]
mov rcx, qword [r14]
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rax, qword [rbp - 0x58]
mov qword [r14], rax
lea rcx, [rbp - 0x80]
call fcn.14001eb8c
nop
lea rcx, [rsp + 0x60]
call fcn.14001eb8c
mov ebx, 0x20
cmp word [rbp - 0x1e], bx
jb 0x140047a0d
mov edx, dword [rsi + 0x40]
mov rcx, qword [r14]
call fcn.140048ef4
mov rcx, qword [r14]
test rcx, rcx
jne 0x140047a1a
mov eax, r13d
jmp 0x140047a31
lea r8, [rbp - 0x50]
mov edx, ebx
call qword [sym.imp.GDI32.dll_GetObjectA]
test eax, eax
je 0x140047a15
mov eax, dword [rbp - 0x4c]
cdq
idiv dword [rsi + 0x68]
mov dword [rsi + 8], eax
lea rbx, [rsi + 0xa8]
mov rcx, rbx
call fcn.1400312a8
mov qword [rbx], r13
lea rbx, [rsi + 0xb0]
mov rcx, rbx
call fcn.1400312a8
mov qword [rbx], r13
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
or ecx, 0xffffffff
lock xadd dword [rdx + 0x10], ecx
sub ecx, 1
jg 0x140047a7e
mov rcx, qword [rdx]
mov r8, qword [rcx]
mov rax, qword [r8 + 8]
call qword [case.0x140140b35.0]
mov eax, 1
jmp 0x14004778c
call fcn.140005280
int3