joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ef770
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 0x4ef7e3
test edx, edx
jne 0x4ef7e3
test ecx, ecx
jne 0x4ef7e3
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x4ef804
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.00487e10
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 0x4ef804
cmp dword [esi], 0
jne 0x4ef804
mov eax, dword [esi + 4]
test eax, eax
jle 0x4ef804
cmp eax, 0x3e8
jge 0x4ef804
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.004a4dd0
add esp, 8
test eax, eax
js 0x4ef872
mov ecx, dword [0x6924b8]
mov dword [ebp - 0xc], 0
mov byte [ebp - 8], 0
test cl, 1
jne 0x4ef862
or ecx, 1
mov dword [0x6924b0], 0x25c5e09b
mov dword [0x6924b8], ecx
mov dword [0x6924b4], 0x8fafd21e
mov dword [0x6924a8], 0x614814
movq xmm0, qword [ebp - 0xc]
movq qword [edi], xmm0
mov dword [edi + 8], 0x6924a8
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4ef880
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.004a4dd0
mov ecx, dword [esi]
add esp, 8
mov edi, eax
cmp ecx, 0x40
jne 0x4ef8ce
push 0x2746
jmp 0x4ef8db
cmp ecx, 0x4d2
jne 0x4ef8e2
push 0x274d
mov ecx, esi
call fcn.0048c2d0
test edi, edi
je 0x4ef8ef
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x6924b8]
mov dword [ebp - 0x10], 0
mov byte [ebp - 0xc], 0
test al, 1
jne 0x4ef929
or eax, 1
mov dword [0x6924b0], 0x25c5e09b
mov dword [0x6924b8], eax
mov dword [0x6924b4], 0x8fafd21e
mov dword [0x6924a8], 0x614814
movq xmm0, qword [ebp - 0x10]
mov eax, dword [ebp - 4]
movq qword [esi], xmm0
pop edi
mov dword [esi + 8], 0x6924a8
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4f0310
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.004a4dd0
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x4f0351
pop edi
or eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 0x17
jne 0x4f036f
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 [0x6924b8]
mov dword [ebp - 0x10], 0
mov byte [ebp - 0xc], 0
test al, 1
jne 0x4f03a9
or eax, 1
mov dword [0x6924b0], 0x25c5e09b
mov dword [0x6924b8], eax
mov dword [0x6924b4], 0x8fafd21e
mov dword [0x6924a8], 0x614814
movq xmm0, qword [ebp - 0x10]
mov eax, esi
movq qword [edi], xmm0
mov dword [edi + 8], 0x6924a8
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4f1bb0
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 0x4f1bdd
mov ecx, dword [esi + 4]
push 0
push 0
push dword [ebp + 0x1c]
call fcn.004e42f0
pop esi
pop ebp
ret 0x18
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
cmp ecx, 0xffffffff
jne 0x4f1bfe
mov ecx, dword [esi + 4]
push 0
push 0x2719
push dword [ebp + 0x1c]
call fcn.004e42f0
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 0x4f1c3c
mov eax, 0x2746
jmp 0x4f1c49
cmp eax, 0x4d2
mov ecx, 0x274d
cmove eax, ecx
test ebx, ebx
je 0x4f1c68
cmp eax, 0x3e5
je 0x4f1c68
push dword [ebp + 0x18]
mov ecx, dword [esi + 4]
push eax
push edi
call fcn.004e42f0
pop edi
pop ebx
pop esi
pop ebp
ret 0x18
mov ecx, dword [esi + 4]
push edi
call fcn.004e43a0
pop edi
pop ebx
pop esi
pop ebp
ret 0x18

Function at 0x4f1c80
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 0x4f1cad
mov ecx, dword [edi + 4]
push 0
push 0
push dword [ebp + 0x1c]
call fcn.004e42f0
pop edi
pop ebp
ret 0x18
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x4f1cce
mov ecx, dword [edi + 4]
push 0
push 0x2719
push dword [ebp + 0x1c]
call fcn.004e42f0
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 0x4f1d25
cmp eax, 0x3e5
je 0x4f1d25
push dword [ebp + 0x18]
mov ecx, dword [edi + 4]
push eax
push ebx
call fcn.004e42f0
pop esi
pop ebx
pop edi
pop ebp
ret 0x18
mov ecx, dword [edi + 4]
push ebx
call fcn.004e43a0
pop esi
pop ebx
pop edi
pop ebp
ret 0x18
Function at 0x4f1d40
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 0x4f1dd5
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 [0x6924b8]
test cl, 1
jne 0x4f1dad
or ecx, 1
mov dword [0x6924b0], 0x25c5e09b
mov eax, vtable.boost::system::detail::system_error_category.0
mov dword [0x6924b8], ecx
mov dword [0x6924b4], 0x8fafd21e
mov dword [0x6924a8], eax
jmp 0x4f1db2
mov eax, dword [0x6924a8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x14], ecx
push ecx
mov ecx, 0x6924a8
call eax
mov byte [ebp - 0x10], al
mov dword [ebp - 0xc], 0x6924a8
test al, al
jne 0x4f1f1c
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 0x4f1e5c
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 [0x6924b8]
test cl, 1
jne 0x4f1e34
or ecx, 1
mov dword [0x6924b0], 0x25c5e09b
mov eax, vtable.boost::system::detail::system_error_category.0
mov dword [0x6924b8], ecx
mov dword [0x6924b4], 0x8fafd21e
mov dword [0x6924a8], eax
jmp 0x4f1e39
mov eax, dword [0x6924a8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x14], ecx
push ecx
mov ecx, 0x6924a8
call eax
mov byte [ebp - 0x10], al
mov dword [ebp - 0xc], 0x6924a8
test al, al
jne 0x4f1f2a
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0
push edi
push 0x4f4630
push dword [ebp + 0xc]
push 0
call fcn.005c0862
add esp, 0x18
mov dword [ebx + 4], eax
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4f1f03
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 0x4f1ea1
push esi
call ebx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x4f1eae
push eax
call ebx
mov eax, dword [0x6924b8]
test al, 1
jne 0x4f1edf
or eax, 1
mov dword [0x6924b0], 0x25c5e09b
mov dword [0x6924b8], eax
mov eax, vtable.boost::system::detail::system_error_category.0
mov dword [0x6924b4], 0x8fafd21e
mov dword [0x6924a8], eax
jmp 0x4f1ee4
mov eax, dword [0x6924a8]
mov edx, dword [ebp + 8]
mov ecx, 0x6924a8
mov eax, dword [eax + 0x18]
push edx
mov dword [ebp - 0x14], edx
call eax
mov byte [ebp - 0x10], al
mov dword [ebp - 0xc], 0x6924a8
test al, al
jne 0x4f1f38
test esi, esi
je 0x4f1f13
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.00489360
push str.thread.exit_event
lea eax, [ebp - 0x14]
push eax
call fcn.00489360
push str.thread
lea eax, [ebp - 0x14]
push eax
call fcn.00489360
int3
Function at 0x4f5200
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x601768
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x689300]
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 [0x6929d5], 0
mov esi, dword [ebp + 0xc]
je 0x4f5277
cmp dword [esi + 0x14], 0x10
jb 0x4f5240
mov eax, dword [esi]
jmp 0x4f5242
mov eax, esi
push eax
lea eax, [ebp - 0x28]
push 0x6170e0
push eax
call fcn.004f5ee0
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 0x4f5277
push dword [ebp - 0x28]
call fcn.00470aa0
add esp, 4
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.004f58d0
add esp, 8
mov eax, dword [0x6929e0]
mov dword [ebp - 4], 0
test eax, eax
jne 0x4f52bc
push 0x18
call fcn.005b7f9f
add esp, 4
mov dword [0x6929e0], 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 [0x6929e0]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.004fe880
lea ecx, [ebp - 0x40]
push ecx
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx + 0x20]
call eax
test eax, eax
jne 0x4f52e3
push eax
push eax
call fcn.004f4e60
add esp, 8
push dword [0x6929e0]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.004fe880
cmp dword [esi + 0x10], 0
mov edi, eax
je case.default.0x4f5311
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.0x4f5311
cmp ecx, 3
ja case.default.0x4f5311
jmp dword [ecx*4 + 0x4f536c]
push esi
mov ecx, edi
call fcn.004fe360
jmp case.default.0x4f5311
push esi
mov ecx, edi
call fcn.004fe950
jmp case.default.0x4f5311
push esi
mov ecx, edi
call fcn.004fee20
jmp case.default.0x4f5311
push esi
mov ecx, edi
call fcn.004fe6a0
cmp dword [ebp - 0x2c], 0x10
jb 0x4f534f
push dword [ebp - 0x40]
call fcn.00470aa0
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.005b8774
mov esp, ebp
pop ebp
ret
Function at 0x4f5cd0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x601890
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x689300]
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.004f6850
add esp, 4
cmp dword [ebp + 0x18], 0
jle 0x4f5eab
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.004f6110
add esp, 0x18
test al, al
je 0x4f5d4f
mov bl, 1
jmp 0x4f5ead
call fcn.004f6480
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 0x4f5d9c
cmp dword [ebp + 0x1c], 8
jb 0x4f5d7f
push dword [ebp + 8]
call fcn.00470aa0
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 0x4f5dad
push dword [ebp - 0x28]
call fcn.00470aa0
add esp, 4
lea eax, [ebp + 8]
push eax
call fcn.004f6320
mov ecx, dword [ebp + 0x18]
mov esi, 1
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
add esp, 4
cmp ecx, esi
jbe 0x4f5e5d
cmp ecx, esi
jbe 0x4f5ea1
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
cmp word [eax + esi*2], 0x5c
jne 0x4f5e54
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.004f6110
add esp, 0x18
test al, al
jne 0x4f5e3c
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 0x4f5e51
push dword [ebp - 0x28]
call fcn.00470aa0
add esp, 4
mov ecx, dword [ebp + 0x18]
inc esi
cmp ecx, esi
ja 0x4f5dd7
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.004f6110
add esp, 0x18
test al, al
je 0x4f5eab
mov bl, 1
jmp 0x4f5ead
push str.invalid_string_position
call fcn.005a30b8
xor bl, bl
cmp dword [ebp + 0x1c], 8
jb 0x4f5ebe
push dword [ebp + 8]
call fcn.00470aa0
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.005b8774
mov esp, ebp
pop ebp
ret
Function at 0x4f6110
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x601928
mov eax, dword fs:[0]
push eax
push ebx
mov eax, dword [0x689300]
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.004f6320
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 0x4f616e
push dword [ebp + 8]
call fcn.00470aa0
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 0x5019e0
Capabilities:
Get number of processors
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x602889
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x689300]
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.00503890
add esp, 4
lea ecx, [esi + 0x64]
mov byte [ebp - 4], 3
call fcn.005036d0
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 0x5031b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push dword [0x692ae0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x503204
push esi
push 0x10
call fcn.005b7f9f
add esp, 4
test eax, eax
je 0x5031da
mov ecx, eax
call fcn.00502a10
mov esi, eax
jmp 0x5031dc
xor esi, esi
push dword [0x692ae0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x5031f4
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push esi
push dword [0x692ae0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, esi
pop esi
ret
Function at 0x5250d0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xa8
call fcn.005ba320
mov eax, dword [0x689300]
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 0x525136
push str.orig_len___md_size
push 0xf8
push str.._ssl_s3_cbc.c
call fcn.0052de80
add esp, 0xc
cmp edi, 0x40
jbe 0x525152
push str.md_size___EVP_MAX_MD_SIZE
push 0xf9
push str.._ssl_s3_cbc.c
call fcn.0052de80
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 0x525179
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.005ba350
add esp, 0xc
mov dword [esp + 0x18], 0
cmp ebp, dword [esp + 0xc8]
jae 0x52526f
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 0x5251f0
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
xor edx, edx
test edi, edi
je 0x5252aa
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 0x525280
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005b8774
add esp, 0xa8
ret
Function at 0x525d90
Capabilities:
Encode data using xor

Disassembly:
mov eax, 4
call fcn.005ba320
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 0x525dd8
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 4]
lea eax, [ecx + ebp]
cmp eax, edx
jbe 0x525dcb
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 0x525ddd
cmp ebp, dword [esi + 4]
ja 0x525dc4
test dword [edi + 0x100], 0x200
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 4]
push ebx
movzx ebx, byte [ecx + eax - 1]
je 0x525e30
cmp dword [edi + 0x88], 0
jne 0x525e30
mov eax, dword [edi + 0x58]
push 8
add eax, 8
push 0x61dbbc
push eax
call fcn.0052da80
add esp, 0xc
test eax, eax
jne 0x525e23
test bl, 1
jne 0x525e23
mov eax, dword [edi + 0x58]
or dword [eax], 8
mov eax, dword [edi + 0x58]
test byte [eax], 8
je 0x525e30
test ebx, ebx
je 0x525e30
dec ebx
mov eax, dword [edi + 0x80]
push dword [eax]
call fcn.00540b00
add esp, 4
test eax, 0x200000
je 0x525e5a
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 0x525edd
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 0x525ea0
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