joyce8/EMBER2024-capa huggingface dataset:
Function at 0x51fe20
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
mov edx, dword [ecx]
mov eax, dword [eax]
cmp edx, 3
ja case.default.0x51fe32
jmp dword [edx*4 + 0x51fe88]
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.0051f960
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.0051f710
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.00520030
push str.TFTP_finished
push 0x5de69c
push eax
call fcn.004f89e0
add esp, 0xc
xor eax, eax
pop ebp
ret
push str.Internal_state_machine_error
push 0x5de694
push eax
call fcn.004f8940
add esp, 0xc
mov eax, 0x47
pop ebp
ret
Function at 0x5218a0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00521820
Function at 0x524030
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push edi
push str.kernel32
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x524050
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push esi
push 0x603de4
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [ebp + 8]
mov ebx, eax
push 0x603df4
push esi
mov dword [ebp - 8], ebx
call fcn.004dbf01
add esp, 8
test eax, eax
je 0x52409c
test ebx, ebx
je 0x52408c
push 8
push 0
push esi
call ebx
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x5240c5
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x5240c5
push 0x800
push 0
push esi
call ebx
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x5241a3
mov ecx, esi
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5240e1
sub ecx, ebx
sar ecx, 1
lea eax, [ecx + edx]
lea eax, [eax*2 + 2]
push eax
call dword [0x655c20]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x524199
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x524199
mov edx, ebx
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x524125
sub edx, ecx
mov ecx, 0x603e0c
sar edx, 1
lea edx, [ebx + edx*2]
sub edx, ecx
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x524140
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x524155
sub ecx, edx
sar ecx, 1
lea ecx, [ebx + ecx*2]
sub ecx, esi
nop dword [eax]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x524170
mov eax, dword [ebp - 8]
test eax, eax
je 0x524190
push 8
push 0
push ebx
call eax
jmp 0x524197
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
push ebx
call dword [0x655c24]
add esp, 4
pop esi
pop ebx
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x5412b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, 0x474
call fcn.004b4910
mov eax, dword [0x655140]
xor eax, esp
mov dword [esp + 0x470], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x44], ebx
test edi, edi
jne 0x5412f5
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x470]
xor ecx, esp
call fcn.004b3f1a
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x48]
push eax
push edi
call fcn.004d064f
add esp, 8
test eax, eax
js 0x5412de
mov eax, 8
call fcn.004b4910
xorps xmm0, xmm0
lea eax, [esp + 0x50]
movsd qword [esp], xmm0
push 0x30
push eax
call fcn.00540ff0
mov esi, dword [ebp + 0xc]
add esp, 0x10
test esi, esi
je 0x5412de
push 0x5de698
push edi
call fcn.004ca0e7
add esp, 8
mov dword [esp + 0x40], eax
test eax, eax
je 0x5413d1
nop dword [eax]
mov edi, 0x400
test esi, esi
jle 0x54135e
cmp esi, edi
cmovl edi, esi
push eax
push edi
lea eax, [esp + 0x80]
push 1
push eax
call fcn.004cad95
mov ebx, eax
add esp, 0x10
test ebx, ebx
jle 0x5413b2
movd xmm0, ebx
mov eax, 8
cvtdq2pd xmm0, xmm0
call fcn.004b4910
lea eax, [esp + 0x80]
movsd qword [esp], xmm0
push edi
push eax
call fcn.00540ff0
add dword [esp + 0x54], ebx
add esp, 0x10
mov eax, dword [esp + 0x40]
test esi, esi
jle 0x541350
sub esi, edi
test esi, esi
jg 0x541350
push dword [esp + 0x40]
call fcn.004caf74
lea eax, [esp + 0x7c]
push 0x400
push eax
call fcn.004fc3b0
mov ebx, dword [esp + 0x50]
add esp, 0xc
mov ecx, dword [esp + 0x47c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b3f1a
mov esp, ebp
pop ebp
ret

Function at 0x545010
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push esi
push edi
mov byte [edi], 0
call dword [sym.imp.WS2_32.dll_gethostname]
mov byte [edi + esi - 1], 0
test eax, eax
jne 0x545043
push 0x2e
push edi
call fcn.004b61d0
add esp, 8
test eax, eax
je 0x545041
mov byte [eax], 0
xor eax, eax
pop edi
pop esi
pop ebp
ret

Function at 0x546440
Capabilities:
Check if file exists

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
push esi
push dword [esp + 0x10]
call fcn.00546530
mov edi, eax
add esp, 8
test edi, edi
jne 0x5464d8
push 0xaf
push str..crypto_bio_bss_file.c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
push 2
call fcn.004fda30
push 0x6085c8
push esi
push 0x6085cc
push dword [esp + 0x2c]
push str.fopen_
push 5
call fcn.004fd070
add esp, 0x2c
call fcn.004c0f54
cmp dword [eax], 2
jne 0x5464bb
push 0xb2
push str..crypto_bio_bss_file.c
push 0x80
push 0x6d
push 0x20
call fcn.004fda30
add esp, 0x14
xor eax, eax
pop edi
pop esi
ret
push 0xb4
push str..crypto_bio_bss_file.c
push 2
push 0x6d
push 0x20
call fcn.004fda30
add esp, 0x14
xor eax, eax
pop edi
pop esi
ret
push 0x6561cc
call fcn.0052b8a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x5464f9
push edi
call fcn.004caf74
add esp, 4
xor eax, eax
pop edi
pop esi
ret
push 0
push esi
call fcn.0052b4d0
push edi
push 1
push 0x6a
push esi
call fcn.0052b500
add esp, 0x18
mov eax, esi
pop edi
pop esi
ret
Function at 0x547b30
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 0x14]
cmp dword [esp + 0x18], esi
jne 0x547bf9
mov ecx, dword [esp + 0x10]
mov al, byte [ecx]
cmp al, 0x6a
je 0x547b51
cmp al, 0x6b
jne 0x547bf9
inc ecx
cmp al, 0x6b
jne 0x547bbb
add esi, 0xfffffffd
xor eax, eax
test esi, esi
jle 0x547b72
nop
mov dl, byte [ecx]
inc ecx
cmp dl, 0xba
je 0x547b72
cmp dl, 0xbb
jne 0x547b9b
inc eax
cmp eax, esi
jl 0x547b60
sub esi, eax
test eax, eax
jne 0x547bbe
push 0x83
push str..crypto_rsa_rsa_x931.c
push 0x8a
push 0x80
push 4
call fcn.004fda30
add esp, 0x14
or eax, 0xffffffff
pop esi
ret
push 0x7b
push str..crypto_rsa_rsa_x931.c
push 0x8a
push 0x80
push 4
call fcn.004fda30
add esp, 0x14
or eax, 0xffffffff
pop esi
ret
add esi, 0xfffffffe
cmp byte [esi + ecx], 0xcc
je 0x547be7
push 0x8b
push str..crypto_rsa_rsa_x931.c
push 0x8b
push 0x80
push 4
call fcn.004fda30
add esp, 0x14
or eax, 0xffffffff
pop esi
ret
push esi
push ecx
push dword [esp + 0x10]
call fcn.004b63f0
add esp, 0xc
mov eax, esi
pop esi
ret
push 0x70
push str..crypto_rsa_rsa_x931.c
push 0x89
push 0x80
push 4
call fcn.004fda30
add esp, 0x14
or eax, 0xffffffff
pop esi
ret
Function at 0x54e830
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x70
call fcn.004b4910
mov eax, dword [0x655140]
xor eax, esp
mov dword [esp + 0x6c], eax
cmp dword [esp + 0x88], 0x40000000
mov eax, dword [esp + 0x7c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x84]
push ebp
mov ebp, dword [esp + 0x78]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x90]
push esi
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], 0
ja 0x54ea07
mov esi, dword [esp + 0x80]
cmp esi, 0x40000000
ja 0x54ea07
cmp dword [esp + 0x88], 0x40000000
ja 0x54ea07
push ebx
push edi
push eax
call fcn.004e9270
mov edi, eax
lea eax, [esp + 0x28]
push eax
call fcn.004e8d90
push 0
push dword [esp + 0x20]
lea eax, [esp + 0x34]
mov ebx, 1
push eax
call fcn.004e8970
push dword [esp + 0xa4]
lea eax, [esp + 0x3c]
mov dword [esp + 0x28], 0x1000000
push dword [esp + 0x30]
push eax
call fcn.004e8b20
add esp, 0x20
test eax, eax
je 0x54e9e3
push 4
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.004e8b20
add esp, 0xc
test eax, eax
je 0x54e9e3
push dword [esp + 0x98]
lea eax, [esp + 0x28]
push dword [esp + 0x24]
push eax
call fcn.004e8b20
add esp, 0xc
test eax, eax
je 0x54e9e3
push 0
cmp esi, edi
jb 0x54e9ab
lea eax, [esp + 0x28]
push ebp
push eax
call fcn.004e88a0
add esp, 0xc
test eax, eax
je 0x54e9e3
sub esi, edi
je 0x54e9db
push 0
push dword [esp + 0x18]
lea eax, [esp + 0x2c]
add ebp, edi
push eax
inc ebx
call fcn.004e8970
push dword [esp + 0x9c]
mov eax, ebx
mov byte [esp + 0x23], bl
push dword [esp + 0x28]
shr eax, 8
mov byte [esp + 0x26], al
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x25], al
mov eax, ebx
shr eax, 0x18
mov byte [esp + 0x24], al
lea eax, [esp + 0x38]
push eax
call fcn.004e8b20
add esp, 0x18
test eax, eax
jne 0x54e8f7
jmp 0x54e9e3
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.004e88a0
add esp, 0xc
test eax, eax
je 0x54e9e3
push esi
lea eax, [esp + 0x40]
push eax
push ebp
call fcn.004b63f0
lea eax, [esp + 0x48]
push edi
push eax
call fcn.004fc3b0
add esp, 0x14
mov dword [esp + 0x1c], 1
lea eax, [esp + 0x24]
push eax
call fcn.004e8b30
mov eax, dword [esp + 0x20]
add esp, 4
pop edi
pop ebx
pop esi
pop ebp
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.004b3f1a
add esp, 0x70
ret
mov ecx, dword [esp + 0x74]
xor eax, eax
pop esi
pop ebp
xor ecx, esp
call fcn.004b3f1a
add esp, 0x70
ret
Function at 0x54ebb0
Capabilities:
Encode data using xor

Disassembly:
push edi
mov edi, dword [esp + 8]
cmp dword [edi + 0x10c], 0xffffffff
jne 0x54ebc2
xor eax, eax
pop edi
ret
push ebp
push esi
push edi
call fcn.004e8da0
mov ecx, dword [esp + 0x1c]
add esp, 4
mov ebp, dword [esp + 0x14]
mov esi, eax
mov dword [ecx], esi
test ebp, ebp
je 0x54ec85
mov ecx, dword [edi + 0x10c]
push ebx
cmp ecx, esi
jne 0x54ec16
test esi, esi
jle 0x54ec64
mov edx, ebp
lea ecx, [edi + 0x8c]
mov ebx, esi
nop word [eax + eax]
mov al, byte [ecx + 0x60]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
lea edx, [edx + 1]
mov byte [edx - 1], al
sub ebx, 1
jne 0x54ec00
jmp 0x54ec64
sub eax, ecx
mov byte [ecx + edi + 0xec], 0x80
cmp eax, 1
jle 0x54ec3a
dec eax
push eax
lea eax, [edi + 0xed]
add eax, ecx
push 0
push eax
call fcn.004b69d0
add esp, 0xc
test esi, esi
jle 0x54ec64
mov edx, ebp
lea ecx, [edi + 0xac]
mov ebx, esi
nop dword [eax + eax]
mov al, byte [ecx + 0x40]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
lea edx, [edx + 1]
mov byte [edx - 1], al
sub ebx, 1
jne 0x54ec50
push esi
push ebp
push ebp
push edi
call fcn.004e9210
add esp, 0x10
pop ebx
test eax, eax
jne 0x54ec85
push esi
push ebp
call fcn.004fc3b0
add esp, 8
xor eax, eax
pop esi
pop ebp
pop edi
ret
pop esi
pop ebp
mov eax, 1
pop edi
ret

Function at 0x55ebd0
Capabilities:
Send data
Send data on socket

Disassembly:
push esi
push edi
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov edi, dword [esp + 0xc]
push 0
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [edi + 0x1c]
call dword [sym.imp.WS2_32.dll_send]
push 0xf
push edi
mov esi, eax
call fcn.0052b4d0
add esp, 8
test esi, esi
jg 0x55ec27
je 0x55ec09
cmp esi, 0xffffffff
jne 0x55ec27
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0055ee30
add esp, 4
test eax, eax
je 0x55ec27
push 0xa
push edi
call fcn.0052bbd0
add esp, 8
pop edi
mov eax, esi
pop esi
ret

Function at 0x569360
Capabilities:
Send data
Send data on socket

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x20]
cmp dword [eax], 6
je 0x56937b
push eax
push esi
call fcn.00569a10
add esp, 8
test eax, eax
jle 0x5693c3
push edi
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esi + 0x1c]
call dword [sym.imp.WS2_32.dll_send]
push 0xf
push esi
mov edi, eax
call fcn.0052b4d0
add esp, 8
test edi, edi
jg 0x5693c0
push edi
call fcn.0055eef0
add esp, 4
test eax, eax
je 0x5693c0
push 0xa
push esi
call fcn.0052bbd0
add esp, 8
mov eax, edi
pop edi
pop esi
ret
Function at 0x570450
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x6c
call fcn.004b4910
mov eax, dword [0x655140]
xor eax, esp
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x74]
push ebx
mov dword [esp + 0xc], eax
xor ebx, ebx
mov eax, dword [esp + 0x7c]
push ebp
mov ebp, dword [esp + 0x78]
push esi
mov dword [esp + 0x10], eax
xor esi, esi
mov dword [eax], ebx
lea eax, [esp + 0x1c]
push edi
mov edi, dword [esp + 0x8c]
push eax
call fcn.004e8d90
lea eax, [esp + 0x24]
push ebp
push eax
call fcn.004e8bf0
add esp, 0xc
test eax, eax
je 0x570552
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.004e88d0
add esp, 0xc
test eax, eax
je 0x570552
lea eax, [esp + 0x20]
push eax
call fcn.004e8b30
mov esi, dword [ebp]
add esp, 4
test byte [esi + 0xc], 4
je 0x570570
push edi
call fcn.00529c40
push ebx
push edi
mov dword [esp + 0x1c], eax
call fcn.004fe0a0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x570552
push esi
call fcn.00570db0
add esp, 4
test eax, eax
jle 0x570552
push dword [ebp]
push ebx
push 1
push 0xf8
push 0xffffffffffffffff
push esi
call fcn.004fde50
add esp, 0x18
test eax, eax
jle 0x570552
push dword [esp + 0x1c]
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x24]
push esi
call fcn.00570cd0
add esp, 0x14
test eax, eax
jle 0x570552
mov ecx, dword [esp + 0x14]
mov ebx, 1
mov eax, dword [esp + 0x10]
mov dword [ecx], eax
push esi
call fcn.004fe040
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.004b3f1a
add esp, 0x6c
ret
xor eax, eax
lea ecx, [esi + 0x2c]
mov edx, dword [ecx]
test edx, edx
je 0x570588
cmp dword [edi], edx
je 0x5705b2
inc eax
add ecx, 4
cmp eax, 4
jl 0x570575
push 0x7b
push str..cryptoevpp_sign.c
push 0x6e
push 0x6b
push 6
call fcn.004fda30
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.004b3f1a
add esp, 0x6c
ret
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x5705e6
push 0x80
push str..cryptoevpp_sign.c
push 0x68
push 0x6b
push 6
call fcn.004fda30
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.004b3f1a
add esp, 0x6c
ret
push dword [edi + 0x14]
mov ecx, dword [esp + 0x18]
push ecx
push dword [esp + 0x20]
lea ecx, [esp + 0x44]
push dword [esp + 0x28]
push ecx
push dword [esi]
call eax
mov ecx, dword [esp + 0x90]
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b3f1a
add esp, 0x6c
ret
Function at 0x57e070
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [0x655c20]
mov edi, eax
add esp, 4
test edi, edi
jne 0x57e09d
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [edi + 8], eax
cmp ebx, dword [esi + 0x10]
jbe 0x57e0e4
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [ebp + 0xc]
push dword [edi + 4]
call eax
mov eax, dword [edi + 8]
add eax, dword [esi + 0xc]
push dword [edi + 4]
mov dword [ebp - 4], eax
push eax
mov eax, dword [esi + 8]
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov dword [ebp + 0x10], ebx
jmp 0x57e0ea
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
push dword [edi + 4]
mov eax, dword [esi]
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [ebp + 0x10]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x57e14b
mov ebx, dword [ebp - 4]
mov dword [ebp - 8], eax
nop word [eax + eax]
movzx eax, byte [ebx]
xor al, 0x36
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebx]
lea ebx, [ebx + 1]
xor al, 0x5c
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub dword [ebp + 0x10], 1
jne 0x57e110
mov ebx, dword [ebp - 8]
cmp ebx, dword [esi + 0x10]
jae 0x57e177
mov eax, dword [esi + 4]
push 1
push 0x616e0f
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x616e10
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x57e150
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x593010
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xa8
call fcn.004b4910
mov eax, dword [0x655140]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xac]
push ebx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xb4]
push ebp
push esi
mov esi, dword [esp + 0xc4]
xor ebp, ebp
mov eax, dword [eax + 4]
push edi
mov edi, dword [esp + 0xc4]
mov dword [esp + 0x14], eax
sub eax, edi
mov dword [esp + 0x10], eax
cmp esi, edi
jae 0x593076
push str.orig_len___md_size
push 0xf8
push str.._ssl_s3_cbc.c
call fcn.004fc9a0
add esp, 0xc
cmp edi, 0x40
jbe 0x593092
push str.md_size___EVP_MAX_MD_SIZE
push 0xf9
push str.._ssl_s3_cbc.c
call fcn.004fc9a0
add esp, 0xc
lea eax, [esp + 0x34]
neg eax
lea ebx, [esp + 0x34]
and eax, 0x3f
add ebx, eax
lea eax, [edi + 0x100]
mov dword [esp + 0x1c], ebx
cmp esi, eax
jbe 0x5930b9
mov ebp, esi
sub ebp, edi
sub ebp, 0x100
mov eax, edi
xor edx, edx
and eax, 0xfffffffe
shl eax, 0x17
sub eax, ebp
add eax, dword [esp + 0x10]
div edi
push edi
mov esi, edx
push 0
push ebx
mov dword [esp + 0x38], esi
call fcn.004b69d0
add esp, 0xc
mov dword [esp + 0x18], 0
cmp ebp, dword [esp + 0xc8]
jae 0x5931af
mov ecx, dword [esp + 0x10]
mov edx, ecx
mov ebx, dword [esp + 0x14]
mov esi, ebx
mov eax, dword [esp + 0xc0]
sub esi, ecx
shr edx, 0x1f
mov dword [esp + 0x24], edx
mov edx, ebx
shr edx, 0x1f
mov eax, dword [eax + 0xc]
mov dword [esp + 0x14], edx
mov edx, ebp
sub edx, ebx
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x1c]
add eax, ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0x28], eax
mov ebx, dword [esp + 0x20]
mov ecx, ebp
mov eax, dword [esp + 0x24]
inc ebp
shr ecx, 0x1f
lea ebx, [ebx + edx]
shr edx, 0x1f
xor dl, byte [esp + 0x14]
shr ebx, 0x1f
xor bl, al
xor al, cl
or bl, al
mov al, cl
xor al, byte [esp + 0x14]
xor bl, cl
or dl, al
dec bl
mov eax, dword [esp + 0x10]
xor dl, cl
mov ecx, dword [esp + 0x28]
dec dl
not dl
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x18]
and dl, al
and dl, bl
or byte [ecx + esi], dl
mov edx, ecx
inc edx
mov ecx, edx
mov eax, edx
sub ecx, edi
xor eax, edi
xor ecx, edi
or ecx, eax
xor ecx, edx
shr ecx, 0x1f
neg ecx
and edx, ecx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
inc edx
mov dword [esp + 0x10], edx
cmp ebp, dword [esp + 0xc8]
jb 0x593130
mov esi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x1c]
xor edx, edx
test edi, edi
je 0x5931ea
mov ebp, dword [esp + 0x30]
nop dword [eax]
mov eax, esi
xor eax, 0x20
mov al, byte [eax + ebx]
movzx eax, byte [esi + ebx]
inc esi
mov byte [edx + ebp], al
mov ecx, esi
sub ecx, edi
mov eax, esi
xor ecx, edi
xor eax, edi
or ecx, eax
inc edx
xor ecx, esi
shr ecx, 0x1f
neg ecx
and esi, ecx
cmp edx, edi
jb 0x5931c0
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b3f1a
add esp, 0xa8
ret
Function at 0x593c60
Capabilities:
Encode data using xor

Disassembly:
mov eax, 8
call fcn.004b4910
push ebp
mov ebp, dword [esp + 0x1c]
push esi
mov esi, dword [esp + 0x18]
inc ebp
push edi
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x64]
test byte [eax + 0x38], 1
je 0x593caa
mov ecx, dword [esp + 0x20]
mov edx, dword [esi + 4]
lea eax, [ecx + ebp]
cmp eax, edx
jbe 0x593c9d
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 8
ret
add dword [esi + 0xc], ecx
add dword [esi + 0x10], ecx
sub edx, ecx
mov dword [esi + 4], edx
jmp 0x593caf
cmp ebp, dword [esi + 4]
ja 0x593c94
test dword [edi + 0x100], 0x200
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 4]
push ebx
movzx ebx, byte [ecx + eax - 1]
je 0x593d02
cmp dword [edi + 0x88], 0
jne 0x593d02
mov eax, dword [edi + 0x58]
push 8
add eax, 8
push 0x61c810
push eax
call fcn.004fc6d0
add esp, 0xc
test eax, eax
jne 0x593cf5
test bl, 1
jne 0x593cf5
mov eax, dword [edi + 0x58]
or dword [eax], 8
mov eax, dword [edi + 0x58]
test byte [eax], 8
je 0x593d02
test ebx, ebx
je 0x593d02
dec ebx
mov eax, dword [edi + 0x80]
push dword [eax]
call fcn.004e8e60
add esp, 4
test eax, 0x200000
je 0x593d2e
or eax, 0xffffffff
sub eax, ebx
add dword [esi + 4], eax
mov eax, 1
pop ebx
pop edi
pop esi
pop ebp
add esp, 8
ret
lea ecx, [ebx + ebp]
mov ebp, dword [esi + 4]
mov edx, ebp
mov dword [esp + 0x14], ebp
sub edx, ecx
mov eax, ebp
xor edx, ecx
xor eax, ecx
or edx, eax
mov ecx, 0xff
xor edx, ebp
lea eax, [ebp - 1]
shr edx, 0x1f
dec edx
cmp eax, ecx
mov dword [esp + 0x1c], edx
cmovb ecx, eax
xor edi, edi
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x593db9
mov ecx, ebx
dec ebp
shr ecx, 0x1f
add ebp, dword [esi + 0xc]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x28], ecx
mov al, byte [esp + 0x28]
lea ebp, [ebp - 1]
mov edx, ebx
mov ecx, edi
sub edx, edi
shr ecx, 0x1f
shr edx, 0x1f
xor al, cl
xor dl, cl
inc edi
or dl, al
movzx eax, byte [ebp + 1]
xor dl, byte [esp + 0x28]
xor eax, ebx
dec dl
movzx ecx, dl
mov edx, dword [esp + 0x1c]
and ecx, eax
not ecx
and edx, ecx
mov dword [esp + 0x1c], edx
cmp edi, esi
jb 0x593d76
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x14]
not edx
movzx eax, dl
lea ecx, [eax - 1]
not eax
shr eax, 0x1f
shr ecx, 0x1f
and ecx, eax
lea eax, [ebx + 1]
neg ecx
and eax, ecx
sub ebp, eax
shl eax, 8
or dword [esi], eax
mov eax, ecx
pop ebx
pop edi
mov dword [esi + 4], ebp
and eax, 1
not ecx
pop esi
or eax, ecx
pop ebp
add esp, 8
ret