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

Disassembly:
push 0xffffffffffffffff
push 0x100f367d
mov eax, dword fs:[0]
push eax
mov eax, 0x13ac
call fcn.100d4920
mov eax, dword [0x10139d00]
xor eax, esp
mov dword [esp + 0x13a8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10139d00]
xor eax, esp
push eax
lea eax, [esp + 0x13c0]
mov dword fs:[0], eax
mov eax, dword [esp + 0x13d0]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, dword [esp + 0x13d4]
push 0
push 0x80
push 3
push 0
push 1
push 0x120089
push eax
mov byte [esp + 0x3f], 0
call esi
mov edi, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x13c8], 0
cmp edi, 0xffffffff
je 0x1002b9d9
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1002b33d
push edi
jmp 0x1002b9d3
cmp dword [esp + 0x28], 0
mov ebx, 0x76
jg 0x1002b351
jl 0x1002b337
cmp dword [esp + 0x24], ebx
jb 0x1002b337
push 2
push 0
push 0xffffffffffffff8a
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x1002b337
push 0
lea ecx, [esp + 0x50]
push ecx
push ebx
lea edx, [esp + 0x520]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002b337
cmp dword [esp + 0x4c], ebx
jne 0x1002b337
cmp dword [esp + 0x515], 0
jne 0x1002b3bb
push 0
push 0x80
push 2
push 0
push 1
push 0x120116
push ebp
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x1002b3b1
push eax
call esi
push edi
call esi
mov al, 1
jmp 0x1002b9db
push 0x134
lea eax, [esp + 0x1b0]
push 0
push eax
call fcn.100d4cc0
add esp, 0xc
push 0x134
lea ecx, [esp + 0x78]
push 0
push ecx
call fcn.100d4cc0
add esp, 0xc
lea esi, [esp + 0x6cc]
call fcn.1004ac60
push 0x140
lea edx, [esp + 0x590]
push 0
push edx
call fcn.100d4cc0
add esp, 0xc
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x13cc], 4
call fcn.1002a470
mov byte [esp + 0x13c8], 5
movzx ecx, byte [esp + 0x589]
push ecx
lea ecx, [esp + 0x52d]
lea esi, [esp + 0x5c]
call fcn.1002c410
mov byte [esp + 0x13c8], 6
cmp dword [eax + 0x18], 0x10
jb 0x1002b44f
mov eax, dword [eax + 4]
jmp 0x1002b452
add eax, 4
lea edx, [esp + 0x34]
push edx
push eax
call fcn.1002ad70
add esp, 8
test al, al
lea ecx, [esp + 0x58]
sete bl
mov byte [esp + 0x13c8], 5
call fcn.10002cc0
test bl, bl
je 0x1002b4ae
lea esi, [esp + 0x34]
call fcn.1002a4d0
lea ecx, [esp + 0x58c]
call fcn.1002ad20
mov eax, 0x270
lea ecx, [esp + 0x6cc]
jmp 0x1002b4a0
dec eax
mov byte [ecx], 0
inc ecx
test eax, eax
jne 0x1002b4a0
jmp 0x1002b9b9
lea ecx, [esp + 0x6cc]
push ecx
mov ecx, str.ecdh
lea esi, [esp + 0x590]
call fcn.1004afe0
add esp, 4
test eax, eax
je 0x1002b518
lea esi, [esp + 0x34]
call fcn.1002a4d0
lea ecx, [esp + 0x58c]
call fcn.1002ad20
mov eax, 0x270
lea ecx, [esp + 0x6cc]
nop
dec eax
mov byte [ecx], 0
inc ecx
test eax, eax
jne 0x1002b4f0
lea edi, [esp + 0x74]
call fcn.1004aba0
lea edi, [esp + 0x1ac]
call fcn.1004aba0
mov edx, dword [esp + 0x14]
push edx
jmp 0x1002b9d3
lea eax, [esp + 0x1ac]
call fcn.1004b6e0
test eax, eax
jne 0x1002b98a
lea eax, [esp + 0x74]
call fcn.1004b6e0
test eax, eax
jne 0x1002b98a
push 0x18
push 0x101af45c
lea eax, [esp + 0x230]
call fcn.1004bef0
add esp, 8
test eax, eax
je 0x1002b586
lea esi, [esp + 0x34]
call fcn.1002a4d0
lea ecx, [esp + 0x58c]
call fcn.1002ad20
mov eax, 0x270
lea ecx, [esp + 0x6cc]
dec eax
mov byte [ecx], 0
inc ecx
test eax, eax
jne 0x1002b578
jmp 0x1002b9b9
mov ecx, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
sub ecx, esi
jne 0x1002b59b
call fcn.100d13c5
mov esi, dword [esp + 0x40]
push 0x31
lea edx, [esp + 0x78]
push esi
push edx
lea edi, [esp + 0x108]
call fcn.1004db20
add esp, 0xc
test eax, eax
je 0x1002b5e5
lea esi, [esp + 0x34]
call fcn.1002a4d0
lea ecx, [esp + 0x58c]
call fcn.1002ad20
mov eax, 0x270
lea ecx, [esp + 0x6cc]
dec eax
mov byte [ecx], 0
inc ecx
test eax, eax
jne 0x1002b5d7
jmp 0x1002b9b9
lea ecx, [esp + 0x58c]
push ecx
lea edx, [esp + 0x22c]
push edx
lea eax, [esp + 0x14c]
push eax
lea eax, [esp + 0x108]
lea ecx, [esp + 0x80]
call fcn.1004aad0
add esp, 0xc
test eax, eax
je 0x1002b660
lea esi, [esp + 0x34]
call fcn.1002a4d0
lea ecx, [esp + 0x58c]
call fcn.1002ad20
mov eax, 0x270
lea ecx, [esp + 0x6cc]
dec eax
mov byte [ecx], 0
inc ecx
test eax, eax
jne 0x1002b638
lea edi, [esp + 0x74]
call fcn.1004aba0
lea edi, [esp + 0x1ac]
call fcn.1004aba0
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x1002b9d3
lea eax, [esp + 0x144]
call fcn.1004be60
lea edx, [esp + 0x144]
push edx
lea ecx, [esp + 0xdc0]
mov edi, eax
call fcn.1004bff0
add esp, 4
test eax, eax
je 0x1002b6be
lea esi, [esp + 0x34]
call fcn.1002a4d0
lea ecx, [esp + 0x58c]
call fcn.1002ad20
mov eax, 0x270
lea ecx, [esp + 0x6cc]
lea ebx, [ebx]
dec eax
mov byte [ecx], 0
inc ecx
test eax, eax
jne 0x1002b6b0
jmp 0x1002b9b9
lea edx, [esp + 0x93c]
mov ecx, edi
lea ebx, [esp + 0xdbc]
call fcn.10052ac0
push 0x118
lea ecx, [esp + 0x400]
push 0
push ecx
call fcn.100d4cc0
lea edx, [esp + 0x948]
add esp, 0xc
push edx
lea eax, [esp + 0x400]
call fcn.10049cb0
add esp, 4
lea eax, [esp + 0x93c]
push eax
lea edx, [esp + 0x400]
lea ecx, [esi + 0x31]
push edx
call fcn.1004a3f0
add esp, 8
lea edx, [esp + 0x97c]
mov ecx, 0x10
lea ebx, [esp + 0x93c]
call fcn.10052ac0
lea ecx, [esp + 0x3fc]
call fcn.1002ad50
lea esi, [esp + 0x34]
call fcn.1002a4d0
lea ecx, [esp + 0x58c]
call fcn.1002ad20
mov eax, 0x270
lea ecx, [esp + 0x6cc]
dec eax
mov byte [ecx], 0
inc ecx
test eax, eax
jne 0x1002b761
lea edi, [esp + 0x74]
call fcn.1004aba0
lea edi, [esp + 0x1ac]
call fcn.1004aba0
push 0
push 0x80
push 2
push 0
push 1
push 0x120116
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1002b9ce
mov edi, dword [esp + 0x14]
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1002b7ca
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
jmp 0x1002b9d9
push 0x118
lea ecx, [esp + 0x2e8]
push 0
push ecx
call fcn.100d4cc0
lea edx, [esp + 0x988]
add esp, 0xc
push edx
lea eax, [esp + 0x2e8]
call fcn.10049cb0
mov eax, dword [esp + 0x519]
mov ebp, dword [esp + 0x18]
add esp, 4
xor ebx, ebx
test eax, eax
jbe 0x1002b8c0
lea ecx, [ecx]
add eax, 0xf
and eax, 0xfffffff0
sub eax, ebx
cmp eax, 0x400
jbe 0x1002b824
mov eax, 0x400
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x9c8]
push edx
push ebp
call edi
test eax, eax
je 0x1002b970
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1002b8c6
lea ecx, [esp + 0xfbc]
push ecx
push eax
lea edx, [esp + 0x9c4]
lea edi, [esp + 0x521]
lea ecx, [esp + 0x2ec]
call fcn.1004a9e0
add esp, 8
test eax, eax
jne 0x1002b970
mov eax, dword [esp + 0x515]
mov ecx, dword [esp + 0x1c]
sub eax, ebx
cmp ecx, eax
jae 0x1002b88e
mov eax, ecx
push 0
lea edx, [esp + 0x58]
push edx
push eax
lea eax, [esp + 0xfc8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1002b970
add ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x515]
cmp ebx, eax
jb 0x1002b810
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x514], 0
je 0x1002b954
push 0
lea ecx, [esp + 0x34]
push ecx
push 0x400
lea edx, [esp + 0x9c8]
push edx
push ebp
call edi
test eax, eax
je 0x1002b92e
nop
mov eax, dword [esp + 0x30]
test eax, eax
je 0x1002b92e
push 0
lea ecx, [esp + 0x54]
push ecx
push eax
lea edx, [esp + 0x9c8]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1002b92e
push 0
lea eax, [esp + 0x34]
push eax
push 0x400
lea ecx, [esp + 0x9c8]
push ecx
push ebp
call edi
test eax, eax
jne 0x1002b8f0
mov eax, dword [esp + 0x24]
push 0
add eax, 0xffffff8a
adc dword [esp + 0x2c], 0xffffffff
lea edx, [esp + 0x2c]
push edx
push eax
push esi
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea ecx, [esp + 0x2e4]
call fcn.1002ad50
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebp
call esi
mov al, 1
jmp 0x1002b9db
lea ecx, [esp + 0x2e4]
call fcn.1002ad50
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebp
call esi
jmp 0x1002b9d9
lea esi, [esp + 0x34]
call fcn.1002a4d0
lea ecx, [esp + 0x58c]
call fcn.1002ad20
mov eax, 0x270
lea ecx, [esp + 0x6cc]
jmp 0x1002b9b0
dec eax
mov byte [ecx], 0
inc ecx
test eax, eax
jne 0x1002b9b0
lea edi, [esp + 0x74]
call fcn.1004aba0
lea edi, [esp + 0x1ac]
call fcn.1004aba0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [esp + 0x13c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x13a8]
xor ecx, esp
call fcn.100d0738
add esp, 0x13b8
ret