Function at 0x41837c
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x360
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x68], 0xfffffffffffffffe
mov qword [rbp + 0x358], rbx
mov qword [rbp + 0x360], rsi
mov qword [rbp + 0x368], rdi
mov rax, qword [0x004bf230]
xor rax, rbp
mov qword [rbp + 0x310], rax
mov r13, rcx
mov edx, 0x130
mov rcx, qword [rcx + 8]
call qword [sym.imp.USER32.dll_GetDlgItem]
mov rbx, rax
mov qword [rbp + 8], rax
lea rcx, [r13 + 0x398]
lea r8, [r13 + 0x390]
lea rdx, [0x00418a80]
call fcn.00415350
xor r15d, r15d
cmp eax, r15d
je 0x418422
mov r8, qword [r13 + 0x3b0]
lea edx, [r15 - 4]
mov rcx, rbx
call qword [sym.imp.USER32.dll_SetWindowLongPtrW]
cmp rax, r15
je 0x418422
mov qword [r13 + 0x3c0], rax
mov qword [r13 + 0x390], rbx
mov edx, 0x12c8
lea rcx, [rbp + 0x70]
call fcn.00452494
nop
mov esi, 8
cmp qword [rax + 0x20], rsi
jb 0x418442
mov rdi, qword [rax + 8]
jmp 0x418446
lea rdi, [rax + 8]
mov r14d, 1
cmp rdi, r15
jne 0x418459
mov rcx, r15
jmp 0x4184e5
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [r14 + rax]
cmp edx, 0x3fffffff
jle 0x418473
mov rcx, r15
jmp 0x4184e5
movsxd rax, edx
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x41848c
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.00478be0
sub rsp, rcx
lea rbx, [rsp + 0x40]
cmp rbx, r15
je 0x4184de
mov byte [rbx], r15b
lea eax, [rdx + rdx]
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
or r9d, 0xffffffff
mov r8, rdi
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb rcx, rcx
and rcx, rbx
mov rbx, qword [rbp + 8]
jmp 0x4184e5
mov rcx, r15
mov rbx, qword [rbp + 8]
call fcn.00445c20
mov edi, eax
cmp qword [rbp + 0x90], rsi
jb 0x4184fe
mov rcx, qword [rbp + 0x78]
call fcn.00443d3c
mov r12d, 7
mov qword [rbp + 0x90], r12
mov qword [rbp + 0x88], r15
mov word [rbp + 0x78], r15w
cmp edi, r15d
cmove edi, esi
mov dword [rbp + 0xa0], 0x5c
mov ecx, esi
call qword [sym.imp.USER32.dll_GetSysColor]
mov dword [rbp + 0xb4], eax
mov edx, 0x120c
lea rcx, [rbp + 0x70]
call fcn.00452494
nop
cmp qword [rax + 0x20], rsi
jb 0x418550
mov r8, qword [rax + 8]
jmp 0x418554
lea r8, [rax + 8]
mov edx, 0x20
lea rcx, [rbp + 0xba]
call fcn.004444bc
nop
cmp qword [rbp + 0x90], rsi
jb 0x418578
mov rcx, qword [rbp + 0x78]
call fcn.00443d3c
mov qword [rbp + 0x90], r12
mov qword [rbp + 0x88], r15
mov word [rbp + 0x78], r15w
lea eax, [rdi + rdi*4]
shl eax, 2
mov dword [rbp + 0xac], eax
mov dword [rbp + 0xa4], 0xe0000001
mov dword [rbp + 0xa8], r15d
lea r9, [rbp + 0xa0]
mov r8, r14
mov edx, 0x444
mov rcx, rbx
call qword [sym.imp.USER32.dll_SendMessageW]
xor r9d, r9d
mov r8, r14
mov edx, 0x443
mov rcx, rbx
call qword [sym.imp.USER32.dll_SendMessageW]
cmp qword [r13 + 0x360], rsi
jb 0x4185e6
mov rcx, qword [r13 + 0x348]
jmp 0x4185ed
lea rcx, [r13 + 0x348]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, r14d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
or rdi, 0xffffffffffffffff
cmp rax, rdi
jne 0x418750
lea ebx, [rdi + 8]
mov qword [rbp + 0x90], rbx
mov qword [rbp + 0x88], r15
mov word [rbp + 0x78], r15w
mov rax, qword [0x004c5760]
mov rdx, qword [rax + 0x28]
add rdx, 0xa20
mov r9, rdi
xor r8d, r8d
lea rcx, [rbp + 0x70]
call fcn.004020b0
mov qword [rbp + 0x38], rbx
mov qword [rbp + 0x30], r15
mov word [rbp + 0x20], r15w
lea r8d, [rdi + 0xe]
lea rdx, str.eula.1033.txt
lea rcx, [rbp + 0x18]
call fcn.00404e54
nop
lea r8, [rbp + 0x18]
lea rdx, [rbp + 0x70]
lea rcx, [rbp + 0x40]
call fcn.0040c644
nop
mov r9, rdi
xor r8d, r8d
mov rdx, rax
lea rcx, [r13 + 0x340]
call fcn.004020b0
nop
cmp qword [rbp + 0x60], rsi
jb 0x4186b3
mov rcx, qword [rbp + 0x48]
call fcn.00443d3c
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x58], r15
mov word [rbp + 0x48], r15w
cmp qword [rbp + 0x38], rsi
jb 0x4186cf
mov rcx, qword [rbp + 0x20]
call fcn.00443d3c
mov qword [rbp + 0x38], rbx
mov qword [rbp + 0x30], r15
mov word [rbp + 0x20], r15w
cmp qword [r13 + 0x360], rsi
jb 0x4186ee
mov rcx, qword [r13 + 0x348]
jmp 0x4186f5
lea rcx, [r13 + 0x348]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp qword [rbp + 0x90], rsi
jb 0x418731
mov rcx, qword [rbp + 0x78]
call fcn.00443d3c
mov qword [rbp + 0x90], rbx
mov qword [rbp + 0x88], r15
mov word [rbp + 0x78], r15w
cmp r14, rdi
jne 0x418750
xor al, al
jmp 0x418a22
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea ecx, [rax + 2]
mov edi, ecx
call fcn.004444b0
mov rsi, rax
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.00449860
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x14]
mov r8d, ebx
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r15d
jne 0x4187ac
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call fcn.00444544
xor al, al
jmp 0x418a22
mov eax, 0xfeff
cmp word [rsi], ax
jne 0x4189bf
lea rax, [rsi + 2]
mov qword [rbp], rax
mov r15d, dword [rbp + 0x14]
shr r15d, 1
call fcn.0040e684
cmp eax, 1
jne 0x4189ee
xor r12d, r12d
mov word [rbp + 0x100], r12w
xor edx, edx
mov r8d, 0x20a
lea rcx, [rbp + 0x102]
call fcn.00449860
lea rdx, [rbp + 0x100]
mov ecx, 0x105
call fcn.0040ddbc
cmp eax, r12d
je 0x4188bb
mov edx, 0x106
lea rcx, [rbp + 0x100]
call fcn.0040dd64
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x100]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov eax, 0x104
cmp rax, rcx
je 0x41886c
lea rbx, [r13 + 0x368]
cmp qword [rbx + 0x20], 8
jb 0x418855
mov r8, qword [rbx + 8]
jmp 0x418859
lea r8, [rbx + 8]
mov edx, 0x106
lea rcx, [rbp + 0x100]
call fcn.00444f54
jmp 0x418895
lea rbx, [r13 + 0x368]
cmp qword [rbx + 0x20], 8
jb 0x418880
mov r8, qword [rbx + 8]
jmp 0x418884
lea r8, [rbx + 8]
mov edx, 0x106
lea rcx, [rbp + 0x100]
call fcn.004444bc
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x100]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp + 0x100]
mov rcx, rbx
call fcn.00404e54
cmp qword [r13 + 0x388], 8
jb 0x4188ce
mov rcx, qword [r13 + 0x370]
jmp 0x4188d5
lea rcx, [r13 + 0x370]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80000080
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x41890c
xor al, al
jmp 0x418a22
lea eax, [r15 + r15]
movsxd rdi, eax
mov rcx, rdi
call fcn.004444b0
mov rbx, rax
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.00449860
xor r15d, r15d
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rbx
or rdi, 0xffffffffffffffff
mov r9d, edi
mov r13, qword [rbp]
mov r8, r13
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor eax, eax
mov rcx, rdi
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp ecx, r15d
jne 0x418982
cmp rbx, r15
je 0x41897b
mov rcx, rbx
call fcn.00444544
xor al, al
jmp 0x418a22
mov dword [rbp + 0x10], r15d
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x10]
mov r8d, ecx
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rbx, r15
je 0x4189f5
mov rcx, rbx
call fcn.00444544
jmp 0x4189f5
mov qword [rbp], rsi
mov rcx, rsi
call fcn.00444544
mov rsi, r15
lea rcx, [r13 + 0x368]
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [r13 + 0x340]
call fcn.004020b0
mov r13, qword [rbp]
jmp 0x4189f5
mov r13, qword [rbp]
xor r15d, r15d
mov r9, r13
xor r8d, r8d
mov edx, 0xc2
mov rcx, qword [rbp + 8]
call qword [sym.imp.USER32.dll_SendMessageW]
cmp rsi, r15
je 0x418a17
mov rcx, rsi
call fcn.00444544
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov rcx, qword [rbp + 0x310]
xor rcx, rbp
call fcn.00443d60
mov rbx, qword [rbp + 0x358]
mov rsi, qword [rbp + 0x360]
mov rdi, qword [rbp + 0x368]
lea rsp, [rbp + 0x320]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret