joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5d6b00
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x298]
sub esp, 0x298
push 0xffffffffffffffff
push 0x667d78
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x758898]
xor eax, ebp
mov dword [ebp + 0x294], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x2a0]
xor esi, esi
mov dword [ebp - 4], esi
push esi
push esi
push 3
push esi
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x5d6b90
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x294]
xor ecx, ebp
call fcn.00620b8d
add ebp, 0x298
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 0x14], esi
push 0x81
push esi
lea eax, [ebp + 0x210]
push eax
call fcn.00621270
add esp, 0xc
mov dword [ebp - 0x18], esi
push esi
lea ecx, [ebp - 0x18]
push ecx
push 0x80
lea edx, [ebp + 0x210]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, esi
je 0x5d6c88
cmp dword [ebp - 0x18], esi
je 0x5d6c88
lea eax, [ebp + 0x210]
push eax
call fcn.00627941
push str._HTML
lea ecx, [ebp + 0x210]
push ecx
call fcn.00622230
add esp, 0xc
test eax, eax
jne 0x5d6c10
push str.__HTML
lea edx, [ebp + 0x210]
push edx
call fcn.00622230
add esp, 8
test eax, eax
je 0x5d6c18
mov esi, 1
mov dword [ebp - 0x14], esi
push str._BODY
lea eax, [ebp + 0x210]
push eax
call fcn.00622230
add esp, 8
test eax, eax
jne 0x5d6c48
push str.__BODY
lea ecx, [ebp + 0x210]
push ecx
call fcn.00622230
add esp, 8
test eax, eax
je 0x5d6c50
mov esi, 1
mov dword [ebp - 0x14], esi
push str._HEAD
lea edx, [ebp + 0x210]
push edx
call fcn.00622230
add esp, 8
test eax, eax
jne 0x5d6c80
push str.__HEAD
lea eax, [ebp + 0x210]
push eax
call fcn.00622230
add esp, 8
test eax, eax
je 0x5d6c88
mov esi, 1
mov dword [ebp - 0x14], esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x5d6b69

Function at 0x5d7730
Capabilities:
Get file size

Disassembly:
push esi
push edi
lea eax, [esp + 0xc]
mov edi, ecx
mov ecx, dword [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x5d776b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5d776b
push eax
push str.GetFileSize___error_in_CFormatParsing::GetFSize____errcode___ld._r_n
mov ecx, edi
call fcn.005d7650
pop edi
xor eax, eax
xor edx, edx
pop esi
ret 4
mov edx, dword [esp + 0xc]
push 1
push 0
push 0
push edx
call fcn.006254d0
xor ecx, ecx
add eax, esi
pop edi
adc edx, ecx
pop esi
ret 4
Function at 0x5d7f50
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x2720]
mov eax, 0x2720
call fcn.006222c0
push 0xffffffffffffffff
push 0x668018
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x758898]
xor eax, ebp
mov dword [ebp + 0x271c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x1c], esi
xor edi, edi
mov dword [ebp - 4], edi
wait
lea ecx, [ebp - 0x68]
call fcn.005d9640
mov byte [ebp - 4], 1
mov ebx, 0x2710
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], edi
push edi
push ebx
mov ecx, esi
call fcn.005d73d0
cmp eax, 2
je 0x5d7fe6
cmp dword [esi + 0x14], edi
jne 0x5d7fda
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x68]
call fcn.005d9650
lea eax, [edi + 3]
wait
jmp 0x5d8146
mov ebx, dword [esi + 0x18]
mov dword [ebp - 0x18], ebx
mov edi, dword [esi + 0x1c]
mov dword [ebp - 0x14], edi
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
lea ecx, [ebp + 0xc]
push ecx
mov edx, dword [esi + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5d8100
cmp dword [ebp - 0x20], 0
je 0x5d8100
push edi
push ebx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x68]
call fcn.005d97a0
cmp eax, 0xa
jne 0x5d8113
lea ebx, [esi + 8]
mov ecx, dword [ebp - 0x50]
push ecx
sub esp, 8
fld qword [ebp - 0x30]
fstp qword [esp]
mov edx, dword [ebp - 0x5c]
push edx
mov eax, dword [ebp - 0x60]
push eax
mov ecx, dword [0x75ef18]
push ecx
push ebx
call fcn.00402f60
add esp, 0x1c
xor edi, edi
mov dword [ebp], edi
mov dword [ebp + 8], edi
xor edx, edx
mov word [ebp + 4], dx
mov byte [ebp - 4], 2
mov eax, dword [ebx]
mov ecx, dword [0x75dd28]
push ecx
push eax
lea ecx, [ebp]
call fcn.00401970
lea ecx, [ebp - 0x14]
call fcn.004024f0
mov byte [ebp - 4], 3
mov eax, dword [ebp]
cmp eax, edi
jne 0x5d8086
lea eax, [ebp + 4]
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push eax
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jle 0x5d80d7
push edi
lea ecx, [ebp - 0x14]
call fcn.00402840
mov ecx, dword [ebp]
test ecx, ecx
jne 0x5d80b2
lea ecx, [ebp + 4]
push 0
push 0
push edi
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [esi + 0xc], 1
lea edx, [ebp - 0x14]
push edx
mov ecx, ebx
call fcn.00405900
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
call fcn.00402560
mov byte [ebp - 4], 1
lea ecx, [ebp]
call fcn.00401210
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x68]
call fcn.005d9650
xor eax, eax
wait
jmp 0x5d8146
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile___error__ld_in_CFormatParsing::PreCheckMpg___r_n
mov ecx, esi
call fcn.005d7650
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x68]
call fcn.005d9650
mov eax, 1
wait
jmp 0x5d8146
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x271c]
xor ecx, ebp
call fcn.00620b8d
add ebp, 0x2720
mov esp, ebp
pop ebp
ret
Function at 0x5d8170
Capabilities:
Check if file exists

Disassembly:
mov eax, dword [esp + 4]
push esi
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push eax
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x10], eax
cmp eax, 0xffffffff
jne 0x5d81b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x5d81ad
push eax
push str.CreateFile___error__ld_in_CFormatParsing::Initialize___r_n
mov ecx, esi
call fcn.005d7650
xor al, al
pop esi
ret 8
push eax
mov ecx, esi
call fcn.005d7730
mov ecx, dword [esp + 0xc]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], edx
mov dword [esi + 0x14], ecx
mov al, 1
pop esi
ret 8
Function at 0x5d93f0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x66822c
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x758898]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x14], esi
lea ebx, [esi + 0x50]
mov ecx, ebx
mov dword [esi], vtable.CMp3Format.0
call fcn.004024f0
xor edi, edi
mov dword [esp + 0x20], edi
lea ebp, [esi + 0x54]
mov ecx, ebp
call fcn.004024f0
mov byte [esp + 0x20], 1
lea ecx, [esi + 0x58]
call fcn.004024f0
mov byte [esp + 0x20], 2
lea ecx, [esi + 0x5c]
call fcn.004024f0
mov byte [esp + 0x20], 3
fldz
fstp dword [esi + 0x64]
mov dword [esi + 0x60], edi
mov dword [esi + 0x44], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
xor eax, eax
mov word [esi + 0x40], ax
mov byte [esi + 0x42], al
mov dword [esi + 0x48], eax
mov byte [esi + 0x4c], al
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
push edi
mov dword [esi + 0x3c], eax
push 0x67997c
mov ecx, ebx
mov dword [esi + 0x1c], edi
call fcn.00402950
push edi
push 0x67997c
mov ecx, ebp
call fcn.00402950
push edi
push 0x67997c
lea ecx, [esi + 0x58]
call fcn.00402950
push edi
push 0x67997c
lea ecx, [esi + 0x5c]
call fcn.00402950
mov dword [esp + 0x20], 0xffffffff
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x5dc7d0
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push eax
mov dword [esp + 8], 0
call fcn.005db920
add esp, 4
test eax, eax
je 0x5dc7f2
xor eax, eax
add esp, 8
ret
mov ecx, dword [0x75f8cc]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.PEM_read_bio_RSA_PUBKEY
push ecx
call esi
mov edx, dword [0x75f8cc]
push str.PEM_read_bio_RSAPublicKey
push edx
mov dword [0x75f878], eax
call esi
mov dword [0x75f874], eax
mov eax, dword [0x75f8cc]
push str.BIO_new_mem_buf
push eax
call esi
mov ecx, dword [0x75f8cc]
push str.RSA_new
push ecx
mov dword [0x75f870], eax
call esi
mov edx, dword [0x75f8cc]
push str.RSA_free
push edx
mov dword [0x75f86c], eax
call esi
mov dword [0x75f868], eax
mov eax, dword [0x75f8cc]
push str.BIO_free_all
push eax
call esi
mov ecx, dword [0x75f8cc]
push str.RSA_size
push ecx
mov dword [0x75f864], eax
call esi
mov edx, dword [0x75f8cc]
push str.RSA_public_decrypt
push edx
mov dword [0x75f860], eax
call esi
cmp dword [0x75f878], 0
mov dword [0x75f85c], eax
je 0x5dc99d
mov ecx, dword [0x75f870]
test ecx, ecx
je 0x5dc99d
cmp dword [0x75f86c], 0
je 0x5dc99d
cmp dword [0x75f868], 0
je 0x5dc99d
cmp dword [0x75f864], 0
je 0x5dc99d
cmp dword [0x75f860], 0
je 0x5dc99d
test eax, eax
je 0x5dc99d
mov eax, dword [esp + 0x14]
push ebx
push 0xffffffffffffffff
push eax
call ecx
mov ebx, eax
call dword [0x75f86c]
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
push ebx
mov dword [esp + 0x20], eax
call dword [0x75f878]
add esp, 0x18
mov dword [esp + 8], eax
test eax, eax
jne 0x5dc929
push ebx
call dword [0x75f864]
add esp, 4
pop ebx
xor eax, eax
pop esi
add esp, 8
ret
push edi
push eax
call dword [0x75f860]
lea edi, [eax + 1]
push edi
call fcn.005f4e47
push edi
mov esi, eax
push 0
push esi
call fcn.00621270
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
push 1
push edx
push esi
push eax
push 0x100
call dword [0x75f85c]
add esp, 0x28
pop edi
test eax, eax
jl 0x5dc971
mov ecx, dword [esp + 0x1c]
push esi
call fcn.0054f750
jmp 0x5dc977
call dword [0x75f87c]
push esi
call fcn.005f4e52
push ebx
call dword [0x75f864]
mov ecx, dword [esp + 0x10]
push ecx
call dword [0x75f868]
add esp, 0xc
pop ebx
mov eax, 1
pop esi
add esp, 8
ret
xor eax, eax
pop esi
add esp, 8
ret
Function at 0x5de270
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x668940
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x758898]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x18], esi
mov ecx, dword [esi + 0x347c]
xor ebx, ebx
cmp ecx, ebx
je 0x5de2f3
cmp byte [esi + 0xe3], bl
je 0x5de2c2
mov eax, dword [esi + 0xc8]
mov eax, dword [eax + 0x17c]
jmp 0x5de2ce
mov edx, dword [esi + 0xc8]
mov eax, dword [edx + 0x178]
cmp eax, 5
jne 0x5de2f3
push ecx
call dword [0x75f890]
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, 1
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x30], 2
mov dword [ebp - 0x34], 4
mov dword [ebp - 0x3c], eax
lea edx, [ebp - 0x34]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 4], ebx
mov eax, dword [esi + 0xc8]
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [eax + 0x434]
call eax
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, ebx
jge 0x5de349
mov dword [ebp - 4], 0xffffffff
jmp 0x5de437
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], 2
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x3c], 1
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x40], ebx
mov edx, dword [esi + 0xc8]
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x20]
push ecx
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
push ebx
push 0x10
push ebx
push 0xc11c
push ebx
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [edx + 0x424]
call edx
mov edi, eax
cmp edi, ebx
jl 0x5de437
mov eax, dword [ebp - 0x2c]
mov dword [ebp + 8], eax
cmp eax, ebx
je 0x5de437
mov edx, dword [ebp - 0x34]
cmp edx, ebx
je 0x5de437
mov ecx, dword [esi + 0x19c]
cmp ecx, ebx
je 0x5de3e3
cmp byte [ecx + 0x137], bl
je 0x5de3e3
mov ecx, dword [esi + 0x3480]
cmp ecx, ebx
je 0x5de3e3
push edx
push eax
call fcn.005dd450
test eax, eax
jne 0x5de437
jmp 0x5de3fb
push ebx
push edx
push eax
mov eax, dword [esi + 0x3200]
push eax
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x5de41b
cmp eax, ebx
je 0x5de41b
push str.Sending_Close_Notify_n
mov ecx, esi
call fcn.00562270
mov ecx, dword [esi + 0xc8]
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ecx + 0x44c]
call eax
jmp 0x5de437
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
jmp 0x5de437
mov ecx, dword [esi + 0xc8]
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ecx + 0x430]
call eax
mov ecx, dword [esi + 0xc8]
add esi, 0x333c
push esi
mov edx, dword [ecx + 0x41c]
call edx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x5e0120
Capabilities:
Compute adler32 checksum

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0xc]
movzx ecx, di
shr edi, 0x10
test esi, esi
jne 0x5e013a
pop edi
lea eax, [esi + 1]
pop esi
ret
push ebx
mov ebx, dword [esp + 0x18]
test ebx, ebx
jbe 0x5e024a
push ebp
jmp 0x5e0150
mov eax, ebx
cmp ebx, 0x15b0
jb 0x5e015f
mov eax, 0x15b0
sub ebx, eax
cmp eax, 0x10
jl 0x5e020b
mov edx, eax
shr edx, 4
mov ebp, edx
neg ebp
shl ebp, 4
add eax, ebp
jmp 0x5e0180
movzx ebp, byte [esi]
add ecx, ebp
movzx ebp, byte [esi + 1]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 2]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 3]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 4]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 5]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 6]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 7]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 8]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 9]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 0xa]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 0xb]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 0xc]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 0xd]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 0xe]
add edi, ecx
add ecx, ebp
movzx ebp, byte [esi + 0xf]
add edi, ecx
add ecx, ebp
add edi, ecx
add esi, 0x10
sub edx, 1
jne 0x5e0180
test eax, eax
je 0x5e021d
nop
movzx edx, byte [esi]
add ecx, edx
inc esi
add edi, ecx
sub eax, 1
jne 0x5e0210
mov eax, 0x80078071
mul ecx
shr edx, 0xf
imul edx, edx, 0xffff000f
add ecx, edx
mov eax, 0x80078071
mul edi
shr edx, 0xf
imul edx, edx, 0xffff000f
add edi, edx
test ebx, ebx
ja 0x5e0150
pop ebp
mov eax, edi
pop ebx
shl eax, 0x10
pop edi
or eax, ecx
pop esi
ret

Function at 0x5e0260
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x5e026b
xor eax, eax
ret
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 4]
push esi
not eax
cmp edx, 8
jb 0x5e0349
mov esi, edx
shr esi, 3
push edi
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x6b93f0]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x6b93f0]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x6b93f0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x6b93f0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x6b93f0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x6b93f0]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x6b93f0]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x6b93f0]
inc ecx
sub edx, 8
sub esi, 1
jne 0x5e0285
pop edi
test edx, edx
je 0x5e036b
lea ecx, [ecx]
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x6b93f0]
inc ecx
sub edx, 1
jne 0x5e0350
not eax
pop esi
ret
Function at 0x5e0960
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, dword [esi + 0x24]
push ebp
push edi
mov eax, dword [esi + 0x64]
mov ebp, dword [esi + 0x34]
mov ecx, dword [esi + 0x6c]
sub ebp, eax
sub ebp, ecx
jne 0x5e0981
test eax, eax
jne 0x5e098d
test ecx, ecx
jne 0x5e098d
mov ebp, ebx
jmp 0x5e09fc
cmp ebp, 0xffffffff
jne 0x5e098d
mov ebp, 0xfffffffe
jmp 0x5e09fc
mov ecx, dword [esi + 0x24]
lea edx, [ebx + ecx - 0x106]
cmp eax, edx
jb 0x5e09fc
mov eax, dword [esi + 0x30]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call fcn.00622730
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x3c]
sub dword [esi + 0x68], ebx
sub dword [esi + 0x64], ebx
add esp, 0xc
sub dword [esi + 0x54], ebx
lea ecx, [eax + edx*2]
mov edi, edi
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebx
jb 0x5e09cf
sub eax, ebx
jmp 0x5e09d1
xor eax, eax
sub edx, 1
mov word [ecx], ax
jne 0x5e09c0
mov ecx, dword [esi + 0x38]
mov edx, ebx
lea ecx, [ecx + ebx*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebx
jb 0x5e09f0
sub eax, ebx
jmp 0x5e09f2
xor eax, eax
sub edx, 1
mov word [ecx], ax
jne 0x5e09e1
add ebp, ebx
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x5e0a57
mov edx, dword [esi + 0x6c]
add edx, dword [esi + 0x64]
mov ecx, ebp
add edx, dword [esi + 0x30]
push edx
call fcn.005e0720
add dword [esi + 0x6c], eax
mov edx, dword [esi + 0x6c]
add esp, 4
cmp edx, 3
jb 0x5e0a43
mov eax, dword [esi + 0x64]
mov ecx, dword [esi + 0x30]
lea edi, [eax + ecx]
movzx eax, byte [edi]
mov ecx, dword [esi + 0x50]
mov dword [esi + 0x40], eax
shl eax, cl
movzx ecx, byte [edi + 1]
xor eax, ecx
and eax, dword [esi + 0x4c]
mov dword [esi + 0x40], eax
cmp edx, 0x106
jae 0x5e0a57
mov edx, dword [esi]
cmp dword [edx + 4], 0
jne 0x5e0966
pop edi
pop ebp
pop ebx
ret

Function at 0x5e14a0
Capabilities:
Read file on windows

Disassembly:
cmp dword [esi + 0x3c], 0
jne 0x5e14f3
cmp dword [esi + 4], 0
jne 0x5e14fc
call fcn.006263a4
mov dword [eax], 0
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
push eax
push 0x4000
push 1
push ecx
call fcn.00625b7c
add esp, 0x10
mov dword [esi + 4], eax
test eax, eax
jne 0x5e14f7
mov edx, dword [esi + 0x40]
push edx
mov dword [esi + 0x3c], 1
call fcn.00628e60
add esp, 4
test eax, eax
je 0x5e14f3
mov dword [esi + 0x38], 0xffffffff
or eax, 0xffffffff
ret
mov eax, dword [esi + 0x44]
mov dword [esi], eax
mov ecx, dword [esi]
dec dword [esi + 4]
movzx eax, byte [ecx]
inc ecx
mov dword [esi], ecx
ret
Function at 0x5e16d0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x5e1757
cmp word [esi + 0x5c], 0x77
jne 0x5e1757
push ebp
mov ebp, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x18]
mov dword [esi], ebp
mov dword [esi + 4], edi
test edi, edi
je 0x5e173d
cmp dword [esi + 0x10], 0
jne 0x5e171d
mov ecx, dword [esi + 0x40]
mov eax, dword [esi + 0x48]
push ecx
push 0x4000
push 1
push eax
mov dword [esi + 0xc], eax
call fcn.00623715
add esp, 0x10
cmp eax, 0x4000
jne 0x5e1736
mov dword [esi + 0x10], eax
push 0
push esi
call fcn.005e03f0
add esp, 8
mov dword [esi + 0x38], eax
test eax, eax
jne 0x5e173d
cmp dword [esi + 4], eax
jne 0x5e16f3
jmp 0x5e173d
mov dword [esi + 0x38], 0xffffffff
mov edx, dword [esi + 0x4c]
push edi
push ebp
push edx
call fcn.005e0260
add esp, 0xc
mov dword [esi + 0x4c], eax
mov eax, edi
sub eax, dword [esi + 4]
pop edi
pop ebp
pop esi
ret
mov eax, 0xfffffffe
pop esi
ret

Function at 0x5e1760
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x5e180a
cmp word [esi + 0x5c], 0x77
jne 0x5e180a
mov dword [esi + 4], ebx
push edi
lea ecx, [ecx]
mov edi, 0x4000
sub edi, dword [esi + 0x10]
je 0x5e17ae
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x48]
push eax
push edi
push 1
push ecx
call fcn.00623715
add esp, 0x10
cmp eax, edi
jne 0x5e1800
mov edx, dword [esi + 0x48]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], 0x4000
test ebx, ebx
jne 0x5e17f0
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.005e03f0
add esp, 8
mov dword [esi + 0x38], eax
test edi, edi
jne 0x5e17cf
cmp eax, 0xfffffffb
jne 0x5e17cf
mov dword [esi + 0x38], edi
cmp dword [esi + 0x10], 0
jne 0x5e17df
cmp dword [esi + 0x38], 1
je 0x5e17df
xor ebx, ebx
jmp 0x5e17e4
mov ebx, 1
mov eax, dword [esi + 0x38]
test eax, eax
je 0x5e1780
cmp eax, 1
je 0x5e1780
mov esi, dword [esi + 0x38]
mov eax, esi
dec eax
neg eax
sbb eax, eax
pop edi
and eax, esi
pop esi
pop ebx
ret
or eax, 0xffffffff
pop edi
mov dword [esi + 0x38], eax
pop esi
pop ebx
ret
pop esi
mov eax, 0xfffffffe
pop ebx
ret
Function at 0x5e1bf0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, ebx
test esi, esi
je 0x5e1dee
cmp word [esi + 0x5c], 0x72
jne 0x5e1dee
mov eax, dword [esi + 0x38]
cmp eax, 0xfffffffd
je 0x5e1de6
cmp eax, 0xffffffff
je 0x5e1de6
cmp eax, 1
jne 0x5e1c32
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
push ebp
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x10], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebp
test ebp, ebp
je 0x5e1d4d
lea esp, [esp]
cmp dword [esi + 0x58], 0
jne 0x5e1d6e
cmp dword [esi + 4], 0
jne 0x5e1caf
cmp dword [esi + 0x3c], 0
jne 0x5e1caf
call fcn.006263a4
mov dword [eax], 0
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
push eax
push 0x4000
push 1
push ecx
call fcn.00625b7c
add esp, 0x10
mov dword [esi + 4], eax
test eax, eax
jne 0x5e1caa
mov edx, dword [esi + 0x40]
push edx
mov dword [esi + 0x3c], 1
call fcn.00628e60
add esp, 4
test eax, eax
jne 0x5e1dda
mov eax, dword [esi + 0x44]
mov dword [esi], eax
push 0
push esi
call fcn.005e3610
add esp, 8
mov dword [esi + 0x38], eax
cmp eax, 1
jne 0x5e1d2a
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x4c]
sub ecx, edi
push ecx
push edi
push edx
call fcn.005e0260
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x24], eax
add esp, 0xc
mov eax, esi
call fcn.005e1870
cmp eax, dword [esi + 0x4c]
jne 0x5e1d42
mov eax, esi
call fcn.005e1870
mov eax, esi
call fcn.005e1510
cmp dword [esi + 0x38], 0
jne 0x5e1d49
mov edi, dword [esi + 8]
mov ebx, dword [esi + 0x14]
push esi
call fcn.005e3470
push 0
push 0
push 0
mov dword [esi + 8], edi
mov dword [esi + 0x14], ebx
call fcn.005e0260
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
add esp, 0x10
mov dword [esi + 0x4c], eax
cmp dword [esi + 0x38], 0
jne 0x5e1d4d
cmp dword [esi + 0x3c], 0
jne 0x5e1d4d
cmp dword [esi + 0x10], 0
jne 0x5e1c50
jmp 0x5e1d4d
mov dword [esi + 0x38], 0xfffffffd
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x4c]
sub eax, edi
push eax
push edi
push ecx
call fcn.005e0260
add esp, 0xc
mov dword [esi + 0x4c], eax
mov eax, ebp
sub eax, dword [esi + 0x10]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
mov edi, dword [esi + 4]
mov eax, dword [esi + 0x10]
cmp edi, eax
jbe 0x5e1d7a
mov edi, eax
test edi, edi
jbe 0x5e1da0
mov ecx, dword [esi]
mov edx, dword [esi + 0xc]
push edi
push ecx
push edx
call fcn.00622730
add dword [esi], edi
sub dword [esi + 0x10], edi
lea eax, [edi + ebx]
add esp, 0xc
sub dword [esi + 4], edi
mov dword [esp + 0x10], eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x5e1dbe
mov ecx, dword [esi + 0x40]
mov edx, dword [esp + 0x10]
push ecx
push eax
push 1
push edx
call fcn.00625b7c
add esp, 0x10
sub dword [esi + 0x10], eax
sub ebp, dword [esi + 0x10]
add dword [esi + 8], ebp
add dword [esi + 0x14], ebp
test ebp, ebp
jne 0x5e1dd2
mov dword [esi + 0x3c], 1
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
mov dword [esi + 0x38], 0xffffffff
jmp 0x5e1d4d
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ecx
ret
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
pop ecx
ret