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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6aa2e0
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x7e2670]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x90], ecx
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x4baf82
xor al, al
jmp 0x4bb1fb
mov byte [ebp - 0x49], 0
push 0x723ebc
mov edx, dword [ebp + 8]
push edx
call fcn.00669fd1
add esp, 8
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x4bafa7
xor al, al
jmp 0x4bb1fb
push 0x723eb9
mov ecx, dword [ebp - 0x90]
call fcn.004047f0
mov byte [ebp - 0x40], 0
xor eax, eax
mov dword [ebp - 0x3f], eax
mov dword [ebp - 0x3b], eax
mov dword [ebp - 0x37], eax
mov dword [ebp - 0x33], eax
push 0x723ec0
call fcn.00666cf0
add esp, 4
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x48]
push edx
push 1
lea eax, [ebp - 0x40]
push eax
call fcn.00669b18
add esp, 0x10
push str.PAX_ENCRYPT_CID_
lea ecx, [ebp - 0x40]
push ecx
call fcn.0066a2f0
add esp, 8
test eax, eax
jne 0x4bb1ed
push 2
push 0
mov edx, dword [ebp - 0x44]
push edx
call fcn.00669e99
add esp, 0xc
mov eax, dword [ebp - 0x44]
push eax
call fcn.00669daa
add esp, 4
mov dword [ebp - 0x54], eax
push 0
mov ecx, dword [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call fcn.00669e99
add esp, 0xc
mov eax, dword [ebp - 0x54]
sub eax, dword [ebp - 0x48]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.00576bfc
add esp, 4
mov dword [ebp - 0x84], eax
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
push 1
mov edx, dword [ebp - 0x50]
push edx
call fcn.00669b18
add esp, 0x10
cmp eax, dword [ebp - 0x54]
jne 0x4bb1d5
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x5c], 0
push 0
push str.paxsz12345678901
call fcn.00666cf0
add esp, 4
push eax
push str.paxsz12345678901
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x50]
push ecx
lea edx, [ebp - 0x5c]
push edx
lea eax, [ebp - 0x58]
push eax
call fcn.004a2ca0
add esp, 0x1c
movzx ecx, al
test ecx, ecx
je 0x4bb1bd
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x78]
call fcn.00404630
mov dword [ebp - 4], 0
mov eax, dword [0x6c2cb8]
push eax
push 0x723ee8
lea ecx, [ebp - 0x78]
call fcn.004129c0
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
cmp ecx, dword [0x6c2cb8]
je 0x4bb13c
mov edx, dword [ebp - 0x80]
add edx, 1
push edx
push 0
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x78]
call fcn.004129f0
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x98], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x98]
push edx
lea ecx, [ebp - 0x78]
call fcn.00404740
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00404770
push str.ENC.cid
lea ecx, [ebp - 0x78]
call fcn.004138a0
push 0x723ef4
lea ecx, [ebp - 0x78]
call fcn.00404810
push eax
call fcn.00669fd1
add esp, 8
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
je 0x4bb1ae
mov eax, dword [ebp - 0x7c]
push eax
push 1
mov ecx, dword [ebp - 0x5c]
push ecx
mov edx, dword [ebp - 0x58]
push edx
call fcn.00669854
add esp, 0x10
mov eax, dword [ebp - 0x7c]
push eax
call fcn.00669ba2
add esp, 4
lea ecx, [ebp - 0x78]
call fcn.00404810
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00666ba0
add esp, 8
lea edx, [ebp - 0x78]
push edx
mov ecx, dword [ebp - 0x90]
call fcn.004047d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x78]
call fcn.00404770
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x88], eax
mov ecx, dword [ebp - 0x88]
push ecx
call fcn.00576bf1
add esp, 4
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x8c], edx
mov eax, dword [ebp - 0x8c]
push eax
call fcn.00576bf1
add esp, 4
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.00669ba2
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006665ac
mov esp, ebp
pop ebp
ret 4