Function at 0x1400407e8
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x188
xor r15d, r15d
mov rsi, r9
mov r13, rdx
mov rbp, rcx
cmp r8, r15
je 0x14004082c
movzx eax, word [r8]
neg ax
sbb r10, r10
and r10, r8
mov qword [r11 + 0x18], r10
mov rax, qword [rsp + 0x1f0]
mov r12d, r9d
mov ebx, r9d
and r12d, 0x100000
and ebx, 0x10000
mov byte [rsp + 0x69], r9b
mov dword [rsp + 0x78], r12d
mov qword [rsp + 0x118], r15
cmp rax, r15
je 0x140040869
mov rax, qword [rax]
mov qword [rsp + 0x118], rax
lea rcx, [rsp + 0xe8]
call fcn.14004c318
mov r12d, 1
test rsi, 0xffffffff80000000
mov rax, r15
setne al
test rsi, 0x60000
cmovne ebx, r15d
mov rcx, rsi
mov qword [rsp + 0xd8], r15
shr rcx, 0x15
mov qword [rsp + 0x120], r15
mov qword [rsp + 0xb8], r15
and cl, r12b
mov qword [rsp + 0x108], rax
mov dword [rsp + 0x80], ebx
mov qword [rsp + 0x168], rcx
mov rcx, rsi
mov byte [rsp + 0x68], r15b
shr rcx, 0x16
lea edx, [r12 + 1]
lea r14d, [r12 + 7]
and cl, r12b
mov qword [rsp + 0x170], rcx
mov rcx, rsi
shr rcx, 0x17
and cl, r12b
mov qword [rsp + 0x140], rcx
cmp rax, r15
je 0x1400409b7
mov rax, qword [rsp + 0x1e0]
cmp rax, r15
je 0x140040a7d
lea rdx, [rsp + 0x1f0]
lea rcx, [rsp + 0xd8]
mov r8d, 0x125
mov dword [rsp + 0x1f0], r15d
mov qword [rsp + 0xd8], rax
call fcn.140020840
mov qword [rsp + 0x1e0], rax
cmp word [rax], r15w
jne 0x140040984
mov byte [rsp + 0x68], r12b
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0x1e0]
call fcn.140051edc
mov r11, qword [rsp + 0xd8]
mov edx, 2
mov qword [rsp + 0x1e0], r11
jmp 0x1400409bf
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0x1e0]
call fcn.140051edc
cmp eax, r15d
jg 0x140040958
lea rcx, [rsp + 0xe8]
call fcn.140044f24
mov rax, 0xffffffff80070057
jmp 0x140041aff
mov r11, qword [rsp + 0x1e0]
cmp r11, r15
je 0x140040a7d
cmp word [r11], r15w
je 0x140040a7d
movzx eax, word [r11]
mov ecx, 0x5c
add r11, rdx
cmp cx, ax
jne 0x1400409eb
lea eax, [rcx - 0x2d]
mov word [r11 - 2], ax
cmp word [r11], r15w
jne 0x1400409d2
jmp 0x140040a6b
lea rdx, [rsp + 0x1f0]
lea rcx, [rsp + 0x1e8]
mov r8d, 0xd
mov qword [rsp + 0x1e8], rax
mov dword [rsp + 0x1f0], r15d
call fcn.140020840
mov rcx, qword [rsp + 0x1e8]
mov qword [rsp + 0x1e0], rax
cmp word [rcx], r15w
je 0x140040a73
mov qword [rsp + 0xa0], rcx
lea r9, [rsp + 0xa0]
lea r8, [rsp + 0xf4]
lea rcx, [rsp + 0xe8]
lea rdx, [rsp + 0xf0]
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r14d
call fcn.14004c1b0
mov rax, qword [rsp + 0x1e0]
cmp word [rax], r15w
jne 0x1400409f3
movsxd rdi, dword [rsp + 0xf4]
mov eax, edi
neg eax
sbb rcx, rcx
and rcx, qword [rsp + 0xe8]
mov qword [rsp + 0x110], rcx
cmp edi, r12d
jne 0x140040abb
mov rax, qword [rcx]
cmp word [rax], 0x3c
jne 0x140040abb
cmp word [rax + 2], 0x3e
jne 0x140040abb
cmp word [rax + 4], r15w
jne 0x140040abb
mov r15b, r12b
xor r9d, r9d
mov qword [rsp + 0x160], rdi
cmp ebx, r9d
jne 0x140040b35
cmp rdi, r9
mov rbx, r9
jle 0x140040b35
mov r13, rcx
xor ebp, ebp
mov r14, r12
mov rdx, qword [r13 + rbx*8]
lea rcx, str._udext
mov r8d, 6
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
cmp eax, ebp
jne 0x140040b0c
cmp rdi, r14
movzx r15d, r15b
mov dword [rsp + 0x78], r14d
cmove r15d, r14d
bts rsi, 0x11
add rbx, r14
cmp rbx, rdi
jl 0x140040adb
mov r13, qword [rsp + 0x1d8]
mov rbp, qword [rsp + 0x1d0]
mov rcx, qword [rsp + 0x110]
mov r14d, 8
xor r9d, r9d
mov rdx, qword [rsp + 0x108]
cmp rdx, r9
je 0x140040b5d
cmp edi, r9d
jl 0x140041862
cmp rcx, r9
je 0x140040b5d
mov rax, qword [rcx]
cmp word [rax], 0x3c
je 0x140041862
mov qword [rsp + 0x38], r9
mov rax, rdx
mov dword [rsp + 0x30], 0x80
neg rax
mov qword [rsp + 0x1f0], r9
mov dword [rsp + 0x28], 3
sbb r8d, r8d
mov qword [rsp + 0x20], r9
lea rcx, [rsp + 0x1f0]
and r8d, 0x40000000
mov r9d, 7
mov rdx, rbp
bts r8d, 0x1f
call fcn.1400034e0
mov rbx, qword [rsp + 0x1f0]
xor edi, edi
cmp rbx, rdi
jne 0x140040bc2
or rbp, 0xffffffffffffffff
jmp 0x140041aef
lea rcx, [rsp + 0x70]
mov edx, 0xe0000
call fcn.14004bedc
mov r12, qword [rsp + 0x70]
lea r9, [rsp + 0x60]
mov rdx, r12
mov r8d, 0x200
mov rcx, rbx
mov dword [rsp + 0x60], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x60], 0x200
jb 0x140041abe
cmp dword [r12 + 0x1b4], 0x46424246
jne 0x140041abe
mov eax, 0xaa55
cmp ax, word [r12 + 0x1fe]
jne 0x140041abe
movzx ebp, word [r12 + 0x1b2]
xor r8d, r8d
mov rcx, rbx
inc ebp
mov eax, ebp
shl eax, 9
movsxd rdi, eax
mov rdx, rdi
call fcn.140045f34
cmp rdi, rax
jne 0x140041abc
xor edi, edi
lea r9, [rsp + 0x60]
mov r8d, 0x200
mov rdx, r12
mov rcx, rbx
mov dword [rsp + 0x60], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x60], 0x200
jb 0x140041abe
movzx eax, word [r12 + 2]
movsx ecx, byte [r12 + 4]
mov edx, 0xff
mov word [rsp + 0x1f0], ax
mov eax, pe_nt_image_headers64
mov r13, rdi
mov dword [rsp + 0x1e8], edi
mov edi, esi
imul cx, ax
movsx eax, byte [r12 + 5]
add cx, ax
mov eax, 0x107
cmp cx, ax
setae cl
mov al, cl
mov byte [rsp + 0x6a], cl
neg al
sbb al, al
and al, 4
add al, 0xe
mov byte [rsp + 0x6c], al
movzx eax, al
sub dx, ax
mov al, cl
movzx ecx, word [r12 + 0xa]
neg al
mov qword [rsp + 0xf8], rcx
mov dword [rsp + 0x100], edx
sbb al, al
xor r8d, r8d
mov edx, 0x8600
and al, 4
and edi, 0x80000
add al, 0xa
mov byte [rsp + 0x6b], al
mov eax, dword [r12 + 0xc]
mov qword [rsp + 0xe0], rax
lea rax, [rcx + 8]
mov qword [rsp + 0xa8], rax
movzx eax, word [r12]
add eax, ebp
mov ebp, esi
movsxd rcx, eax
movzx eax, word [r12 + 8]
and ebp, 0x60000
mov qword [rsp + 0xa0], rcx
mov rcx, rbx
mov dword [rsp + 0x84], eax
mov dword [rsp + 0xb0], ebp
call fcn.140045f34
cmp rax, 0x8600
jne 0x140040ded
xor eax, eax
lea r9, [rsp + 0x60]
mov r8d, 0x200
mov rdx, r12
mov rcx, rbx
mov dword [rsp + 0x60], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor edx, edx
cmp eax, edx
je 0x140040def
cmp dword [rsp + 0x60], 0x200
jne 0x140040def
movzx r14d, byte [r12 + 0x1f8]
mov al, r14b
and r14d, 0x1f
and al, 0xe0
cmp dword [r12 + 0x1b4], 0x46424246
jne 0x140040def
mov ecx, 0x10000
mov dword [rsp + 0x1e8], ecx
cmp al, dl
jne 0x140040e6e
mov rax, qword [r12 + 0x1f0]
mov r13, qword [r12 + 0x1e8]
mov qword [rsp + 0xa8], rax
jmp 0x140040e6e
xor edx, edx
cmp qword [rsp + 0xe0], r14
jbe 0x140040e6e
cmp edi, edx
je 0x140040e6e
mov rdi, qword [rsp + 0xa8]
xor r8d, r8d
mov rcx, rbx
shl rdi, 9
mov rdx, rdi
call fcn.140045f34
cmp rdi, rax
jne 0x140040e6e
xor edi, edi
lea r9, [rsp + 0x60]
mov r8d, 0x200
mov rdx, r12
mov rcx, rbx
mov dword [rsp + 0x60], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
je 0x140040e6e
cmp dword [rsp + 0x60], 0x200
jne 0x140040e6e
cmp byte [r12], 0xeb
jne 0x140040e6e
mov eax, 0xaa55
cmp ax, word [r12 + 0x1fe]
jne 0x140040e6e
mov r13, qword [rsp + 0xe0]
sub r13, r14
mov eax, dword [rsp + 0x84]
mov r14, qword [rsp + 0x1d8]
lea edi, [rax + rax*4]
mov rcx, r14
shl edi, 9
lea edx, [rdi + 0xc64]
call fcn.14004bf70
mov rax, qword [r14]
movsxd r11, edi
mov rdi, qword [rsp + 0xa0]
lea rax, [rax + r11*2 + 0x200]
and rax, 0xfffffffffffffe00
cmp rdi, 0x44
mov qword [rsp + 0x98], rax
jle 0x140040ed4
mov edx, dword [rsp + 0x84]
lea rcx, [rsp + 0x70]
shl edx, 0xa
call fcn.14004bf70
mov r12, qword [rsp + 0x70]
shl rdi, 9
xor r8d, r8d
mov rcx, rbx
mov rdx, rdi
call fcn.140045f34
cmp rdi, rax
jne 0x140041ad3
mov r10, qword [r14]
mov ecx, dword [rsp + 0x80]
xor r11d, r11d
mov qword [rsp + 0x88], r10
cmp ebp, r11d
je 0x140040f0e
cmp ecx, r11d
je 0x140040f1e
mov rdx, r11
mov r13, r11
mov qword [rsp + 0xa8], rdx
jmp 0x140040f26
mov rdx, qword [rsp + 0xa8]
mov rax, qword [rsp + 0xe0]
or rbp, 0xffffffffffffffff
shl rax, 9
mov qword [rsp + 0xd0], rax
cmp dword [rsp + 0xb0], r11d
je 0x140041011
cmp ecx, r11d
jne 0x140041011
mov eax, r11d
cmp r13, r11
jbe 0x140040fbd
mov r8d, dword [rsp + 0x1e8]
mov qword [rsp + 0x58], r11
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x48], r11
mov qword [rsp + 0x40], r11
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x30], r11
mov rax, r13
lea r9, str._udext_
shl rax, 9
or r8d, 0xff00
mov rcx, r10
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
lea rdx, str.0x_02X___s__0x_I64X__I64u__u__02u__02u__02u__02u__02u_r_n
call qword [sym.imp.USER32.dll_wsprintfW]
mov r10, qword [rsp + 0x88]
xor r11d, r11d
cdqe
lea r10, [r10 + rax*2]
mov qword [rsp + 0x88], r10
mov word [r10], r11w
cmp r13, r11
jbe 0x140040fe7
mov rax, r13
mov dword [rsp + 0x78], ebp
shl rax, 9
mov qword [rsp + 0xd0], rax
bt rsi, 0x12
jae 0x140041011
lea rcx, [rsp + 0x70]
call fcn.140044f24
cmp rbx, rbp
je 0x140041006
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r12d, r12d
mov rbp, r12
jmp 0x140041aef
cmp r15b, r11b
jne 0x1400410ae
mov rax, qword [rsp + 0xa0]
mov ecx, dword [rsp + 0x84]
lea r13d, [rax + rcx]
mov edi, eax
cmp eax, r13d
jge 0x1400410ae
mov rsi, r12
mov rdx, qword [rsp + 0x98]
lea r9, [rsp + 0x60]
mov r8d, 0x200
mov rcx, rbx
mov dword [rsp + 0x60], r11d
mov qword [rsp + 0x20], r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x200
cmp dword [rsp + 0x60], eax
jne 0x14004125a
mov rdx, qword [rsp + 0x98]
mov r8, rax
mov rcx, rsi
call fcn.1400177f8
add rsi, 0x1fe
xor r11d, r11d
cmp byte [r12], r11b
je 0x1400410ae
movzx eax, byte [r12]
add eax, 2
movsxd rcx, eax
add rcx, r12
cmp rcx, rsi
ja 0x1400410a7
mov r12, rcx
jmp 0x140041089
inc edi
cmp edi, r13d
jl 0x140041037
mov ax, word [rsp + 0x1f0]
mov byte [rsp + 0x1e8], r11b
and al, 1
mov r13, r12
mov r8d, r11d
neg al
mov rax, qword [rsp + 0x70]
mov dword [rsp + 0x64], r11d
sbb r10w, r10w
mov rdx, rax
mov qword [rsp + 0x150], rax
and r10w, 0xfde9
cmp r15b, r11b
movsxd r15, dword [rsp + 0x80]
cmovne rdx, r12
mov rax, r15
mov word [rsp + 0x7c], r10w
mov qword [rsp + 0x138], rax
cmp rdx, r12
jae 0x1400416d0
movzx eax, byte [rsp + 0x6c]
mov rcx, rax
mov qword [rsp + 0x130], rax
mov r9d, eax
movzx eax, byte [rdx]
lea r8, [rcx + rdx]
mov rdi, rdx
add ax, 2
mov r13, rdx
movzx ecx, ax
movzx eax, ax
add rdx, rax
mov eax, dword [rdi + 2]
sub ecx, r9d
mov qword [rsp + 0x128], rdx
mov dl, byte [rdi + 1]
mov byte [rsp + 0x1f0], dl
cmp rax, qword [rsp + 0xf8]
jb 0x140041169
or dl, 1
mov byte [rsp + 0x1f0], dl
mov al, byte [rsp + 0x69]
cmp al, r11b
je 0x14004117a
test al, dl
je 0x140041250
cmp ecx, r11d
mov r15, qword [rsp + 0x98]
mov dword [rsp + 0xb4], r11d
mov word [r15], r11w
jle 0x1400411e4
cmp byte [r8], r11b
je 0x1400411e4
movsxd rsi, ecx
mov r9d, ebp
xor edx, edx
add rsi, r8
movzx ecx, r10w
mov dword [rsp + 0x28], 0x800
mov dil, byte [rsi]
mov byte [rsi], r11b
mov qword [rsp + 0x20], r15
call qword [0x1400f18d0]
mov dl, byte [rsp + 0x1f0]
mov byte [rsi], dil
movzx r9d, al
xor r11d, r11d
mov rdi, r13
mov word [r15 + r9*2], r11w
mov dword [rsp + 0xb4], r9d
mov rax, r9
mov esi, dword [rdi + 6]
cmp byte [rsp + 0x6a], r11b
je 0x1400411f2
mov rsi, qword [rdi + 6]
cmp byte [rsp + 0x170], r11b
je 0x14004120a
test rsi, 0x1ff
jne 0x140041250
cmp rsi, r11
je 0x140041250
cmp byte [rsp + 0x168], r11b
je 0x140041219
test dl, 0x7c
jne 0x14004126c
mov r14, qword [rsp + 0x160]
cmp r14, r11
je 0x14004126c
mov rdi, r11
jle 0x140041250
mov rax, qword [rsp + 0x110]
mov rcx, r15
mov rdx, qword [rax + rdi*8]
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
xor r11d, r11d
cmp eax, r11d
jne 0x140041269
inc rdi
cmp rdi, r14
jl 0x14004122b
mov r8d, dword [rsp + 0x64]
jmp 0x1400414c8
lea rcx, [rsp + 0x70]
call fcn.140044f24
jmp 0x140041ae1
mov rdi, r13
mov al, byte [rsp + 0x1f0]
mov r14, rsi
test al, al
jns 0x14004127e
shl r14, 9
cmp qword [rsp + 0x138], r11
jne 0x1400414ef
movsxd rcx, dword [rsp + 0xb0]
cmp rcx, r11
je 0x14004135d
cmp rsi, 0x8000
jb 0x140041250
test rsi, 0x1ff
jne 0x140041250
test al, 0x7c
jne 0x14004135d
movsxd rax, dword [rsp + 0xb4]
cmp eax, 4
jle 0x1400412de
lea rdx, [r15 + rax*2 - 0xa]
lea rcx, str..iso
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
xor r11d, r11d
cmp eax, r11d
je 0x14004135d
mov edi, dword [rdi + 2]
xor r8d, r8d
mov rcx, rbx
shl rdi, 9
mov rdx, rdi
call fcn.140045f34
cmp rdi, rax
jne 0x1400414c0
xor eax, eax
lea r9, [rsp + 0x60]
lea rdx, [r15 + 0x400]
mov r8d, 0x200
mov rcx, rbx
mov dword [rsp + 0x60], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r11d, r11d
cmp eax, r11d
je 0x140041250
cmp dword [rsp + 0x60], 0x200
jne 0x140041250
cmp byte [r15 + 0x400], 0xeb
jne 0x140041250
mov eax, 0xaa55
cmp ax, word [r15 + 0x5fe]
jne 0x140041250
movzx eax, byte [rsp + 0x6b]
mov rcx, r13
mov byte [rsp + 0x1e8], 1
mov ecx, dword [rax + rcx]
movabs rax, 0x2b6109100
mov word [rsp + 0xc0], r11w
add rcx, rax
xor eax, eax
mov qword [rsp + 0xc2], rax
mov dword [rsp + 0xca], eax
mov word [rsp + 0xce], ax
imul rcx, rcx, 0x989680
mov qword [rsp + 0x148], rcx
cmp qword [rsp + 0x108], r11
jne 0x1400416bb
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x148]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov r8d, dword [rsp + 0x64]
mov edx, dword [rsp + 0x78]
inc r8d
mov rdi, r13
mov dword [rsp + 0x64], r8d
cmp edx, ebp
jne 0x14004140b
mov eax, dword [r13 + 2]
cmp qword [rsp + 0xa8], rax
jne 0x140041433
mov rcx, qword [rsp + 0xd0]
cmp rcx, r14
je 0x1400414c5
jmp 0x140041413
mov rcx, qword [rsp + 0xd0]
xor r8d, r8d
cmp edx, r8d
jle 0x140041433
mov eax, dword [rdi + 2]
cmp qword [rsp + 0xf8], rax
jne 0x140041433
cmp rcx, r14
cmove edx, r8d
mov dword [rsp + 0x78], edx
movzx eax, word [rsp + 0xcc]
movzx ecx, word [rsp + 0xca]
movzx edx, word [rsp + 0xc8]
movzx r9d, word [rsp + 0xc6]
movzx r10d, word [rsp + 0xc2]
movzx r11d, word [rsp + 0xc0]
movzx r8d, byte [rsp + 0x1f0]
mov dword [rsp + 0x58], eax
mov eax, dword [rdi + 2]
mov rdi, qword [rsp + 0x88]
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x48], edx
mov dword [rsp + 0x40], r9d
mov dword [rsp + 0x38], r10d
mov dword [rsp + 0x30], r11d
lea rdx, str.0x_02X___s__0x_lX__I64u__u__02u__02u__02u__02u__02u_r_n
mov rcx, rdi
mov r9, r15
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_wsprintfW]
movsxd rcx, eax
lea rdi, [rdi + rcx*2]
mov qword [rsp + 0x88], rdi
mov r8d, dword [rsp + 0x64]
xor r11d, r11d
mov rdx, qword [rsp + 0x128]
mov rcx, qword [rsp + 0x130]
movzx r10d, word [rsp + 0x7c]
mov r9d, ecx
cmp rdx, r12
jb 0x140041123
jmp 0x1400416c0
mov edi, dword [rdi + 2]
and al, 1
shl rdi, 9
neg al
sbb r8d, r8d
and r8d, 2
add r8d, 0x1fe
cmp r14, r11
jle 0x140040fee
mov r15, qword [rsp + 0x118]
cmp r15, r14
cmovg r15, r14
sub r14, r15
cmp r14, 0x7ffffde0
jge 0x14004125a
movsxd rcx, r8d
mov rax, r15
cqo
idiv rcx
mov ecx, eax
imul eax, r8d
xor r8d, r8d
shl ecx, 9
cdqe
movsxd rcx, ecx
sub r15, rax
add rdi, rcx
mov rcx, rbx
mov rdx, rdi
call fcn.140045f34
cmp rdi, rax
jne 0x14004125a
mov rcx, qword [rsp + 0x1d8]
lea eax, [r14 + r15]
mov rsi, 0xfffffffffffffe00
lea edx, [rax + 0x20f]
lea edi, [rax + 0x1ff]
and edx, esi
and edi, esi
add edx, 0x200
call fcn.14004bd00
xor ecx, ecx
mov r13, rax
cmp rax, rcx
je 0x14004125a
mov rax, qword [rsp + 0x1d8]
mov r12, qword [rax]
add r12, 0x200
and r12, rsi
test byte [rsp + 0x1f0], 0x3d
lea rsi, [r12 + 0x200]
mov dword [rsi], ecx
je 0x140041610
mov dword [rsp + 0x60], ecx
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x60]
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r12d, r12d
cmp eax, r12d
je 0x14004125a
cmp dword [rsp + 0x60], edi
jb 0x14004125a
mov rax, qword [rsp + 0x1d8]
sub esi, dword [rax]
add esi, r15d
mov dword [rax + 0xc], esi
jmp 0x140041681
cmp edi, ecx
jle 0x14004167e
mov dword [rsp + 0x60], ecx
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x60]
mov r8d, 0x200
mov rdx, r12
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x60], 0x200
jne 0x14004125a
mov eax, 0x1fe
movsxd rdx, r15d
mov rcx, r13
sub eax, r15d
add rdx, r12
mov r8d, eax
mov dword [rsp + 0x60], eax
call fcn.1400177f8
mov r11d, dword [rsp + 0x60]
xor ecx, ecx
sub edi, 0x1fe
add r13, r11
mov r15d, ecx
cmp edi, ecx
jg 0x140041614
mov rax, qword [rsp + 0x1d8]
xor r12d, r12d
movsxd rcx, dword [rax + 0xc]
xor edx, edx
mov dword [rax + 8], r14d
add rcx, qword [rax]
lea r8d, [rdx + 0x10]
add rcx, r14
call fcn.1400b93b0
lea rcx, [rsp + 0x70]
call fcn.140044f24
cmp rbx, rbp
je 0x140041009
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140041009
mov r8d, dword [rsp + 0x64]
mov r15d, dword [rsp + 0x80]
mov r14, qword [rsp + 0x1d8]
mov rsi, qword [rsp + 0x88]
cmp byte [rsp + 0x140], r11b
je 0x14004171c
cmp r8d, r11d
jle 0x14004171c
mov rdi, rsi
mov dword [rsp + 0x78], r11d
sub rdi, r11
add rdi, 2
sar rdi, 1
cmp r11, r11
je 0x140041712
mov rcx, qword [r14]
movsxd r8, edi
mov rdx, r11
add r8, r8
call fcn.1400177b0
xor r11d, r11d
movsxd rax, edi
neg rax
lea rsi, [rsi + rax*2]
cmp dword [rsp + 0x78], r11d
jle 0x14004178a
cmp qword [rsp + 0xe0], r11
jbe 0x14004178a
cmp r15d, r11d
jne 0x14004178a
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x58], r11
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x48], r11
mov qword [rsp + 0x40], r11
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x30], r11
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xf8]
lea r9, str._udext.norm_
lea rdx, str.0x_02X___s__0x_I64X__I64u__u__02u__02u__02u__02u__02u_r_n
mov r8d, 0x2ff00
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.USER32.dll_wsprintfW]
xor r11d, r11d
cmp qword [rsp + 0x108], r11
je 0x140041a93
mov al, byte [rsp + 0x68]
mov cl, byte [rsp + 0x1e8]
cmp al, r11b
je 0x1400417b2
cmp cl, r11b
jne 0x1400417b9
jmp 0x140040fee
cmp cl, r11b
cmove r13, r12
cmp al, r11b
je 0x14004186e
movzx ecx, byte [r13]
mov eax, r12d
add ecx, 2
sub eax, r13d
movsxd rdi, ecx
sub eax, ecx
mov rcx, r13
inc eax
lea rdx, [rdi + r13]
movsxd r8, eax
call fcn.1400177b0
mov rcx, r12
mov r8, rdi
sub rcx, rdi
xor edx, edx
call fcn.1400b93b0
mov r15, qword [rsp + 0x98]
mov r9, qword [rsp + 0x150]
mov r10d, 0x80808081
sub r13d, r9d
sub r12d, r9d
mov eax, r10d
imul r13d
mov eax, r10d
lea r8d, [r13 + rdx]
sar r8d, 8
mov ecx, r8d
shr ecx, 0x1f
imul r12d
add edx, r12d
add r8d, ecx
sar edx, 8
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, dword [rsp + 0x84]
jl 0x1400419cb
lea rcx, [rsp + 0x70]
call fcn.140044f24
cmp rbx, rbp
je 0x140041862
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, 0xffffffff80070057
jmp 0x140041aef
mov rax, qword [rsp + 0x120]
shr rax, 9
mov dword [r13 + 2], eax
cmp byte [rsp + 0x6a], r11b
jne 0x1400418da
test byte [r13 + 1], 0xbc
mov eax, dword [rsp + 0xb8]
mov dword [r13 + 6], eax
jne 0x14004189f
mov al, byte [rsp + 0x69]
mov byte [r13 + 1], al
mov rax, qword [rsp + 0xb8]
movabs rdx, 0x100000000
cmp rax, rdx
jb 0x1400418c3
or byte [r13 + 1], 0x80
mov rax, qword [rsp + 0xb8]
test byte [r13 + 1], 0x80
je 0x1400418e6
add rax, 0x1ff
shr rax, 9
mov dword [r13 + 6], eax
jmp 0x1400418e6
mov rax, qword [rsp + 0xb8]
mov qword [r13 + 6], rax
lea r12, [r13 + 0xc]
cmp cl, r11b
jne 0x1400417f6
xor eax, eax
lea rcx, [rsp + 0x1f0]
mov dword [rsp + 0x1f0], r11d
mov dword [rsp + 0x1f4], eax
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov r15, qword [rsp + 0x98]
movzx ecx, word [rsp + 0x7c]
xor r14d, r14d
movabs rax, 0xd6bf94d5e57a42bd
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov r9d, ebp
mul qword [rsp + 0x1f0]
movzx eax, byte [rsp + 0x6b]
shr rdx, 0x17
mov dword [rsp + 0x28], pe_nt_image_headers64
add edx, 0x49ef6f00
mov qword [rsp + 0x20], r15
mov dword [rax + r13], edx
mov r8, qword [rsp + 0xd8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rdi, eax
cmp edi, r14d
jle 0x140041982
cmp byte [rdi + r15 - 1], r14b
jne 0x140041982
dec edi
movzx ecx, word [rsp + 0x100]
movzx esi, byte [rsp + 0x6c]
mov rdx, r15
cmp edi, ecx
cmovg edi, ecx
lea rcx, [r13 + rsi]
movsxd rax, edi
mov byte [rax + r15], r14b
lea eax, [rdi + 1]
movsxd r8, eax
call fcn.1400177f8
add dil, sil
dec dil
movzx eax, dil
mov byte [r13], al
lea r12, [rax + r13 + 3]
mov byte [r12 - 1], r14b
jmp 0x1400417fe
cmp r8d, edx
jg 0x140041a93
mov rcx, qword [rsp + 0xa0]
sub edx, r8d
mov eax, r8d
movsxd rsi, r8d
lea r14d, [rdx + 1]
imul eax, eax, 0x1fe
add rsi, rcx
movsxd r13, eax
sub r12d, eax
add r13, r9
shl rsi, 9
xor ebp, ebp
xor r8d, r8d
mov rdx, rsi
mov rcx, rbx
call fcn.140045f34
mov eax, 0x1fe
lea r9, [rsp + 0x60]
cmp r12d, eax
lea r8d, [rax + 2]
mov edi, r12d
mov rdx, r15
mov rcx, rbx
mov dword [rsp + 0x60], ebp
cmovg edi, eax
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd r8, edi
mov rdx, r13
mov rcx, r15
call fcn.1400177f8
xor r8d, r8d
mov rdx, rsi
mov rcx, rbx
call fcn.140045f34
mov edi, 0x200
lea r9, [rsp + 0x60]
mov r8d, edi
mov rdx, r15
mov rcx, rbx
mov dword [rsp + 0x60], ebp
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [rdi - 2]
add rsi, rdi
sub r12d, eax
add r13, rax
sub r14, 1
jne 0x140041a01
or rbp, 0xffffffffffffffff
lea rcx, [rsp + 0x70]
call fcn.140044f24
cmp rbx, rbp
je 0x140041aab
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0xe8]
call fcn.140044f24
xor eax, eax
jmp 0x140041aff
xor edi, edi
mov edx, 0x64
mov rcx, r13
call fcn.14004bf70
mov r11, qword [r13]
mov word [r11], di
lea rcx, [rsp + 0x70]
call fcn.140044f24
or rbp, 0xffffffffffffffff
cmp rbx, rbp
je 0x140041aef
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0xe8]
call fcn.140044f24
mov rax, rbp
add rsp, 0x188
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret