joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4eece0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp dword [ebp + 0xc], 0
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
jne 0x4eed53
test edx, edx
jne 0x4eed53
test ecx, ecx
jne 0x4eed53
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x4eed74
mov eax, 0x10624dd3
imul dword [esi + 4]
imul eax, dword [esi], 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
mov eax, 1
cmove ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0xc]
call fcn.00487ec0
mov ecx, dword [ebp + 0x1c]
pop esi
movq xmm0, qword [eax]
movq qword [ecx], xmm0
mov eax, dword [eax + 8]
mov dword [ecx + 8], eax
xor eax, eax
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x4eed74
cmp dword [esi], 0
jne 0x4eed74
mov eax, dword [esi + 4]
test eax, eax
jle 0x4eed74
cmp eax, 0x3e8
jge 0x4eed74
mov dword [esi + 4], 0x3e8
push edi
mov edi, dword [ebp + 0x1c]
push edi
push esi
push ecx
push edx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_select]
push eax
call fcn.004a4ba0
add esp, 8
test eax, eax
js 0x4eede2
mov ecx, dword [0x68f4b8]
mov dword [ebp - 0xc], 0
mov byte [ebp - 8], 0
test cl, 1
jne 0x4eedd2
or ecx, 1
mov dword [0x68f4b0], 0x25c5e09b
mov dword [0x68f4b8], ecx
mov dword [0x68f4b4], 0x8fafd21e
mov dword [0x68f4a8], 0x612c44
movq xmm0, qword [ebp - 0xc]
movq qword [edi], xmm0
mov dword [edi + 8], 0x68f4a8
pop edi
pop esi
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov esi, dword [ebp + 0x18]
lea eax, [ebp - 4]
push esi
push 0
push 0
push dword [ebp + 0x14]
mov dword [ebp - 4], 0
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_WSASend]
push eax
call fcn.004a4ba0
mov ecx, dword [esi]
add esp, 8
mov edi, eax
cmp ecx, 0x40
jne 0x4eee3e
push 0x2746
jmp 0x4eee4b
cmp ecx, 0x4d2
jne 0x4eee52
push 0x274d
mov ecx, esi
call fcn.0048c390
test edi, edi
je 0x4eee5f
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x68f4b8]
mov dword [ebp - 0x10], 0
mov byte [ebp - 0xc], 0
test al, 1
jne 0x4eee99
or eax, 1
mov dword [0x68f4b0], 0x25c5e09b
mov dword [0x68f4b8], eax
mov dword [0x68f4b4], 0x8fafd21e
mov dword [0x68f4a8], 0x612c44
movq xmm0, qword [ebp - 0x10]
mov eax, dword [ebp - 4]
movq qword [esi], xmm0
pop edi
mov dword [esi + 8], 0x68f4a8
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4ef880
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov edi, dword [ebp + 0x14]
push edi
push 1
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_WSASocketW]
push eax
call fcn.004a4ba0
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x4ef8c1
pop edi
or eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 0x17
jne 0x4ef8df
push 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0x1b
push 0x29
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [0x68f4b8]
mov dword [ebp - 0x10], 0
mov byte [ebp - 0xc], 0
test al, 1
jne 0x4ef919
or eax, 1
mov dword [0x68f4b0], 0x25c5e09b
mov dword [0x68f4b8], eax
mov dword [0x68f4b4], 0x8fafd21e
mov dword [0x68f4a8], 0x612c44
movq xmm0, qword [ebp - 0x10]
mov eax, esi
movq qword [edi], xmm0
mov dword [edi + 8], 0x68f4a8
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4f1160
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 4]
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp byte [ebp + 0x18], 0
je 0x4f118d
mov ecx, dword [esi + 4]
push 0
push 0
push dword [ebp + 0x1c]
call fcn.004e37c0
pop esi
pop ebp
ret 0x18
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
cmp ecx, 0xffffffff
jne 0x4f11ae
mov ecx, dword [esi + 4]
push 0
push 0x2719
push dword [ebp + 0x1c]
call fcn.004e37c0
pop esi
pop ebp
ret 0x18
mov eax, dword [ebp + 0x14]
push ebx
push edi
mov edi, dword [ebp + 0x1c]
push 0
push edi
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x18]
mov dword [ebp + 0x18], 0
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
jne 0x4f11ec
mov eax, 0x2746
jmp 0x4f11f9
cmp eax, 0x4d2
mov ecx, 0x274d
cmove eax, ecx
test ebx, ebx
je 0x4f1218
cmp eax, 0x3e5
je 0x4f1218
push dword [ebp + 0x18]
mov ecx, dword [esi + 4]
push eax
push edi
call fcn.004e37c0
pop edi
pop ebx
pop esi
pop ebp
ret 0x18
mov ecx, dword [esi + 4]
push edi
call fcn.004e3870
pop edi
pop ebx
pop esi
pop ebp
ret 0x18

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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
mov eax, dword [edi + 4]
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp byte [ebp + 0x18], 0
je 0x4f125d
mov ecx, dword [edi + 4]
push 0
push 0
push dword [ebp + 0x1c]
call fcn.004e37c0
pop edi
pop ebp
ret 0x18
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x4f127e
mov ecx, dword [edi + 4]
push 0
push 0x2719
push dword [ebp + 0x1c]
call fcn.004e37c0
pop edi
pop ebp
ret 0x18
push ebx
mov ebx, dword [ebp + 0x1c]
lea ecx, [ebp + 0x18]
push esi
push 0
push ebx
push dword [ebp + 0x14]
mov dword [ebp + 0x18], 0
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_WSASend]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x4d2
mov ecx, 0x274d
cmove eax, ecx
test esi, esi
je 0x4f12d5
cmp eax, 0x3e5
je 0x4f12d5
push dword [ebp + 0x18]
mov ecx, dword [edi + 4]
push eax
push ebx
call fcn.004e37c0
pop esi
pop ebx
pop edi
pop ebp
ret 0x18
mov ecx, dword [edi + 4]
push ebx
call fcn.004e3870
pop esi
pop ebx
pop edi
pop ebp
ret 0x18
Function at 0x4f12f0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 0
push 0
push 1
mov ebx, ecx
push 0
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, dword [ebp + 8]
mov esi, eax
mov dword [edi + 4], esi
test esi, esi
jne 0x4f1385
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [ebp + 8], eax
call dword [edx]
mov ecx, dword [0x68f4b8]
test cl, 1
jne 0x4f135d
or ecx, 1
mov dword [0x68f4b0], 0x25c5e09b
mov eax, vtable.boost::system::detail::system_error_category.0
mov dword [0x68f4b8], ecx
mov dword [0x68f4b4], 0x8fafd21e
mov dword [0x68f4a8], eax
jmp 0x4f1362
mov eax, dword [0x68f4a8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x14], ecx
push ecx
mov ecx, 0x68f4a8
call eax
mov byte [ebp - 0x10], al
mov dword [ebp - 0xc], 0x68f4a8
test al, al
jne 0x4f14cc
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebx + 8], eax
mov dword [edi + 8], eax
cmp dword [ebx + 8], 0
jne 0x4f140c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [ebp + 8], eax
call dword [edx]
mov ecx, dword [0x68f4b8]
test cl, 1
jne 0x4f13e4
or ecx, 1
mov dword [0x68f4b0], 0x25c5e09b
mov eax, vtable.boost::system::detail::system_error_category.0
mov dword [0x68f4b8], ecx
mov dword [0x68f4b4], 0x8fafd21e
mov dword [0x68f4a8], eax
jmp 0x4f13e9
mov eax, dword [0x68f4a8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x14], ecx
push ecx
mov ecx, 0x68f4a8
call eax
mov byte [ebp - 0x10], al
mov dword [ebp - 0xc], 0x68f4a8
test al, al
jne 0x4f14da
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0
push edi
push 0x4f3c20
push dword [ebp + 0xc]
push 0
call fcn.005bfeb2
add esp, 0x18
mov dword [ebx + 4], eax
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4f14b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [ebp + 8], eax
call dword [edx]
test esi, esi
je 0x4f1451
push esi
call ebx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x4f145e
push eax
call ebx
mov eax, dword [0x68f4b8]
test al, 1
jne 0x4f148f
or eax, 1
mov dword [0x68f4b0], 0x25c5e09b
mov dword [0x68f4b8], eax
mov eax, vtable.boost::system::detail::system_error_category.0
mov dword [0x68f4b4], 0x8fafd21e
mov dword [0x68f4a8], eax
jmp 0x4f1494
mov eax, dword [0x68f4a8]
mov edx, dword [ebp + 8]
mov ecx, 0x68f4a8
mov eax, dword [eax + 0x18]
push edx
mov dword [ebp - 0x14], edx
call eax
mov byte [ebp - 0x10], al
mov dword [ebp - 0xc], 0x68f4a8
test al, al
jne 0x4f14e8
test esi, esi
je 0x4f14c3
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push str.thread.entry_event
lea eax, [ebp - 0x14]
push eax
call fcn.00489420
push str.thread.exit_event
lea eax, [ebp - 0x14]
push eax
call fcn.00489420
push str.thread
lea eax, [ebp - 0x14]
push eax
call fcn.00489420
int3
Function at 0x4f4800
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x600dd8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x686300]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp byte [0x68f9d5], 0
mov esi, dword [ebp + 0xc]
je 0x4f4877
cmp dword [esi + 0x14], 0x10
jb 0x4f4840
mov eax, dword [esi]
jmp 0x4f4842
mov eax, esi
push eax
lea eax, [ebp - 0x28]
push 0x614cd8
push eax
call fcn.004f54e0
add esp, 0xc
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp - 0x14], 0x10
jb 0x4f4877
push dword [ebp - 0x28]
call fcn.005b7634
add esp, 4
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.004f4ed0
add esp, 8
mov eax, dword [0x68f9e0]
mov dword [ebp - 4], 0
test eax, eax
jne 0x4f48bc
push 0x18
call fcn.005b75e3
add esp, 4
mov dword [0x68f9e0], eax
xorps xmm0, xmm0
movdqu xmmword [eax], xmm0
push eax
movq qword [eax + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [0x68f9e0]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.004fdb30
lea ecx, [ebp - 0x40]
push ecx
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx + 0x20]
call eax
test eax, eax
jne 0x4f48e3
push eax
push eax
call fcn.004f4460
add esp, 8
push dword [0x68f9e0]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.004fdb30
cmp dword [esi + 0x10], 0
mov edi, eax
je case.default.0x4f4911
mov edx, dword [edi]
mov ecx, edi
mov edx, dword [edx + 0xc]
call edx
mov ecx, dword [ebp + 8]
cmp ecx, eax
jg case.default.0x4f4911
cmp ecx, 3
ja case.default.0x4f4911
jmp dword [ecx*4 + 0x4f496c]
push esi
mov ecx, edi
call fcn.004fd610
jmp case.default.0x4f4911
push esi
mov ecx, edi
call fcn.004fdc00
jmp case.default.0x4f4911
push esi
mov ecx, edi
call fcn.004fe0d0
jmp case.default.0x4f4911
push esi
mov ecx, edi
call fcn.004fd950
cmp dword [ebp - 0x2c], 0x10
jb 0x4f494f
push dword [ebp - 0x40]
call fcn.005b7634
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005b7dc4
mov esp, ebp
pop ebp
ret
Function at 0x4f52d0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x600f00
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x686300]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp + 8]
mov dword [ebp - 4], 0
push eax
call fcn.004f5e50
add esp, 4
cmp dword [ebp + 0x18], 0
jle 0x4f54ab
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp + 8]
push eax
call fcn.00423cd0
call fcn.004f5710
add esp, 0x18
test al, al
je 0x4f534f
mov bl, 1
jmp 0x4f54ad
call fcn.004f5a80
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0042a8e0
mov esi, eax
add esp, 0xc
lea eax, [ebp + 8]
cmp eax, esi
je 0x4f539c
cmp dword [ebp + 0x1c], 8
jb 0x4f537f
push dword [ebp + 8]
call fcn.005b7634
add esp, 4
xor eax, eax
mov dword [ebp + 0x1c], 7
push esi
lea ecx, [ebp + 8]
mov dword [ebp + 0x18], 0
mov word [ebp + 8], ax
call fcn.00424e30
cmp dword [ebp - 0x14], 8
jb 0x4f53ad
push dword [ebp - 0x28]
call fcn.005b7634
add esp, 4
lea eax, [ebp + 8]
push eax
call fcn.004f5920
mov ecx, dword [ebp + 0x18]
mov esi, 1
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
add esp, 4
cmp ecx, esi
jbe 0x4f545d
cmp ecx, esi
jbe 0x4f54a1
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
cmp word [eax + esi*2], 0x5c
jne 0x4f5454
push esi
push 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp + 8]
call fcn.00423df0
sub esp, 0x18
mov byte [ebp - 4], 1
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x28]
push eax
call fcn.00423cd0
call fcn.004f5710
add esp, 0x18
test al, al
jne 0x4f543c
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push eax
call edi
cmp dword [ebp - 0x14], 8
mov byte [ebp - 4], 0
jb 0x4f5451
push dword [ebp - 0x28]
call fcn.005b7634
add esp, 4
mov ecx, dword [ebp + 0x18]
inc esi
cmp ecx, esi
ja 0x4f53d7
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
push 0
cmovae eax, dword [ebp + 8]
push eax
call edi
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp + 8]
push eax
call fcn.00423cd0
call fcn.004f5710
add esp, 0x18
test al, al
je 0x4f54ab
mov bl, 1
jmp 0x4f54ad
push str.invalid_string_position
call fcn.005a2735
xor bl, bl
cmp dword [ebp + 0x1c], 8
jb 0x4f54be
push dword [ebp + 8]
call fcn.005b7634
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005b7dc4
mov esp, ebp
pop ebp
ret
Function at 0x4f5710
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x600f68
mov eax, dword fs:[0]
push eax
push ebx
mov eax, dword [0x686300]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp + 8]
mov dword [ebp - 4], 0
push eax
call fcn.004f5920
add esp, 4
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne bl
cmp dword [ebp + 0x1c], 8
jb 0x4f576e
push dword [ebp + 8]
call fcn.005b7634
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x500bf0
Capabilities:
Get number of processors
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x601ec9
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x686300]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
push 0xffffffffffffffff
push 0
push dword [ebp + 8]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
call fcn.00420f90
push 0xffffffffffffffff
lea ecx, [esi + 0x18]
mov dword [ebp - 4], 0
mov dword [ecx + 0x14], 0xf
push 0
push dword [ebp + 0xc]
mov dword [ecx + 0x10], 0
mov byte [ecx], 0
call fcn.00420f90
push 0xffffffffffffffff
lea ecx, [esi + 0x30]
mov byte [ebp - 4], 1
mov dword [ecx + 0x14], 0xf
push 0
push dword [ebp + 0x10]
mov dword [ecx + 0x10], 0
mov byte [ecx], 0
call fcn.00420f90
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x48], eax
lea eax, [esi + 0x4c]
push eax
mov byte [ebp - 4], 2
call fcn.00502ef0
add esp, 4
lea ecx, [esi + 0x64]
mov byte [ebp - 4], 3
call fcn.00502d30
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 0x10

Function at 0x502810
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push dword [0x68fae0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x502864
push esi
push 0x10
call fcn.005b75e3
add esp, 4
test eax, eax
je 0x50283a
mov ecx, eax
call fcn.00502020
mov esi, eax
jmp 0x50283c
xor esi, esi
push dword [0x68fae0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x502854
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push esi
push dword [0x68fae0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, esi
pop esi
ret
Function at 0x524730
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xa8
call fcn.005b9970
mov eax, dword [0x686300]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xac]
push ebx
mov dword [esp + 0x20], 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 0x524796
push str.orig_len___md_size
push 0xf8
push str.._ssl_s3_cbc.c
call fcn.0052d4c0
add esp, 0xc
cmp edi, 0x40
jbe 0x5247b2
push str.md_size___EVP_MAX_MD_SIZE
push 0xf9
push str.._ssl_s3_cbc.c
call fcn.0052d4c0
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 0x5247d9
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 + 0x30], esi
call fcn.005b99a0
add esp, 0xc
mov dword [esp + 0x18], 0
cmp ebp, dword [esp + 0xc8]
jae 0x5248cf
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 + 0x28], 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 + 0x30], eax
mov ebx, dword [esp + 0x20]
mov ecx, ebp
mov eax, dword [esp + 0x28]
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 + 0x30]
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 0x524850
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
xor edx, edx
test edi, edi
je 0x52490a
mov ebp, dword [esp + 0x2c]
lea esp, [esp]
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 0x5248e0
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005b7dc4
add esp, 0xa8
ret
Function at 0x5253f0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 4
call fcn.005b9970
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x14]
inc ebp
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x64]
test byte [eax + 0x38], 1
je 0x525438
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 4]
lea eax, [ecx + ebp]
cmp eax, edx
jbe 0x52542b
pop edi
pop esi
xor eax, eax
pop ebp
pop ecx
ret
add dword [esi + 0xc], ecx
add dword [esi + 0x10], ecx
sub edx, ecx
mov dword [esi + 4], edx
jmp 0x52543d
cmp ebp, dword [esi + 4]
ja 0x525424
test dword [edi + 0x100], 0x200
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 4]
push ebx
movzx ebx, byte [ecx + eax - 1]
je 0x525490
cmp dword [edi + 0x88], 0
jne 0x525490
mov eax, dword [edi + 0x58]
push 8
add eax, 8
push 0x61b7ac
push eax
call fcn.0052d0c0
add esp, 0xc
test eax, eax
jne 0x525483
test bl, 1
jne 0x525483
mov eax, dword [edi + 0x58]
or dword [eax], 8
mov eax, dword [edi + 0x58]
test byte [eax], 8
je 0x525490
test ebx, ebx
je 0x525490
dec ebx
mov eax, dword [edi + 0x80]
push dword [eax]
call fcn.005042d0
add esp, 4
test eax, 0x200000
je 0x5254ba
or eax, 0xffffffff
sub eax, ebx
add dword [esi + 4], eax
mov eax, 1
pop ebx
pop edi
pop esi
pop ebp
pop ecx
ret
mov edx, dword [esi + 4]
lea ecx, [ebx + ebp]
mov edi, edx
mov dword [esp + 0x10], edx
sub edi, ecx
mov eax, edx
xor edi, ecx
xor eax, ecx
or edi, eax
mov ecx, 0xff
xor edi, edx
lea eax, [edx - 1]
shr edi, 0x1f
dec edi
cmp eax, ecx
cmovb ecx, eax
xor ebp, ebp
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x52553d
mov eax, dword [esi + 0xc]
mov ecx, ebx
shr ecx, 0x1f
lea esi, [edx - 1]
mov dword [esp + 0x24], ecx
add esi, eax
mov edi, edi
mov al, byte [esp + 0x24]
lea esi, [esi - 1]
mov edx, ebx
mov ecx, ebp
sub edx, ebp
shr ecx, 0x1f
shr edx, 0x1f
xor al, cl
xor dl, cl
inc ebp
or dl, al
movzx eax, byte [esi + 1]
xor dl, byte [esp + 0x24]
xor eax, ebx
dec dl
movzx ecx, dl
and ecx, eax
not ecx
and edi, ecx
cmp ebp, dword [esp + 0x18]
jb 0x525500
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
not edi
lea eax, [ebx + 1]
and edi, 0xff
pop ebx
lea ecx, [edi - 1]
not edi
shr ecx, 0x1f
shr edi, 0x1f
and ecx, edi
neg ecx
and eax, ecx
sub edx, eax
shl eax, 8
or dword [esi], eax
mov dword [esi + 4], edx
mov dword [esp + 0x20], ecx
not ecx
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x20]
pop edi
and eax, 1
or eax, dword [esp + 0x10]
pop esi
pop ebp
pop ecx
ret