joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4aea90
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
sub esp, 0x10
cmp dword [esp + 0x24], 0xc
jae 0x4aeaa8
mov eax, dword [esp + 0x28]
mov byte [eax], 0xff
or eax, 0xffffffff
add esp, 0x10
ret
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x24]
mov dword [esi], 0x12345678
mov dword [esi + 4], 0x23456789
mov dword [esi + 8], 0x34567890
test edi, edi
je 0x4aeb25
push ebx
mov ebx, dword [esp + 0x24]
nop
movzx eax, byte [ebx]
mov byte [esp + 0x30], al
lea eax, [esp + 0x30]
push 1
push eax
mov eax, dword [esi]
not eax
push eax
call fcn.004a87d0
not eax
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
movzx eax, byte [esi + 7]
mov byte [esp + 0x1f], al
lea eax, [esp + 0x1f]
push eax
mov eax, dword [esi + 8]
not eax
push eax
call fcn.004a87d0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [esi + 8], eax
dec edi
jne 0x4aead0
pop ebx
push 0xc
lea eax, [esp + 0x10]
push eax
push 0xc
push dword [esp + 0x34]
push esi
call fcn.004aea00
mov ecx, dword [esp + 0x44]
add esp, 0x14
mov al, byte [esp + 0x17]
pop edi
mov byte [ecx], al
xor eax, eax
pop esi
add esp, 0x10
ret
Function at 0x4b5c40
Capabilities:
Terminate process

Disassembly:
push esi
push 0x24
push str.Fatal_Internal_Error_in_libarchive:
push 2
call fcn.004bbe90
mov edx, dword [esp + 0x18]
add esp, 0xc
mov ecx, edx
lea esi, [ecx + 1]
jmp 0x4b5c60
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b5c60
sub ecx, esi
push ecx
push edx
push 2
call fcn.004bbe90
push 1
push 0x535e60
push 2
call fcn.004bbe90
add esp, 0x18
push dword [esp + 8]
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
int3
Function at 0x4b6690
Capabilities:
Terminate process

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [ebx + 0x30]
push edi
mov dword [esi + 0x30], eax
mov dword [esi + 4], 0
mov edi, dword [ebx + 4]
mov ebp, dword [ebx]
lea eax, [edi + 1]
push eax
push esi
call fcn.004b7640
add esp, 8
test eax, eax
je 0x4b66e2
test edi, edi
je 0x4b66d4
mov eax, dword [esi + 4]
add eax, dword [esi]
push edi
push ebp
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
add dword [esi + 4], edi
mov ecx, dword [esi + 4]
mov eax, dword [esi]
mov byte [ecx + eax], 0
jmp 0x4b66f1
push str.Out_of_memory
push 1
call fcn.004b5c40
add esp, 8
mov dword [esi + 0x10], 0
lea edi, [esi + 0xc]
mov eax, dword [ebx + 0xc]
mov ebp, dword [ebx + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 4]
inc eax
add eax, ebp
push eax
push edi
call fcn.004b7640
add esp, 8
test eax, eax
je 0x4b673f
test ebp, ebp
je 0x4b6731
mov eax, dword [edi + 4]
add eax, dword [edi]
push ebp
push dword [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
add dword [edi + 4], ebp
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov byte [ecx + eax], 0
jmp 0x4b674e
push str.Out_of_memory
push 1
call fcn.004b5c40
add esp, 8
mov dword [esi + 0x1c], 0
add esi, 0x18
mov edi, dword [ebx + 0x1c]
mov ebx, dword [ebx + 0x18]
mov eax, dword [esi + 4]
inc eax
add eax, edi
add eax, eax
push eax
push esi
call fcn.004b7640
add esp, 8
test eax, eax
je 0x4b67a2
test edi, edi
je 0x4b678f
mov ecx, dword [esi + 4]
lea eax, [edi + edi]
push eax
mov eax, dword [esi]
push ebx
lea eax, [eax + ecx*2]
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
add dword [esi + 4], edi
xor edx, edx
mov ecx, dword [esi + 4]
mov eax, dword [esi]
pop edi
pop esi
pop ebp
mov word [eax + ecx*2], dx
pop ebx
ret
pop edi
pop esi
pop ebp
pop ebx
mov dword [esp + 8], str.Out_of_memory
mov dword [esp + 4], 1
jmp fcn.004b5c40

Function at 0x4b7300
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov ebx, dword [eax]
push edi
mov edi, dword [eax + 4]
mov eax, dword [esi + 4]
inc eax
add eax, edi
push eax
push esi
call fcn.004b7640
add esp, 8
test eax, eax
je 0x4b7349
test edi, edi
je 0x4b7339
mov eax, dword [esi + 4]
add eax, dword [esi]
push edi
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
add dword [esi + 4], edi
mov ecx, dword [esi + 4]
mov eax, dword [esi]
pop edi
pop esi
pop ebx
mov byte [ecx + eax], 0
ret
pop edi
pop esi
pop ebx
mov dword [esp + 8], str.Out_of_memory
mov dword [esp + 4], 1
jmp fcn.004b5c40
Function at 0x4bb930
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov ebp, dword [esp + 0xc]
push esi
xor esi, esi
push edi
mov edi, dword [sym.imp.MSVCRT.dll__errno]
test eax, 0xffff7fff
jne 0x4bba14
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4bb9ad
call ebx
cmp eax, 3
jne 0x4bb993
push ebp
call fcn.004bbc60
mov esi, eax
add esp, 4
test esi, esi
jne 0x4bb987
call edi
pop edi
pop esi
pop ebp
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4bb9ad
call ebx
push eax
call fcn.004bb870
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x4bba08
push 0
push 0x2000001
push 3
push 0
push 0
push 0
test esi, esi
je 0x4bb9cd
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4bb9d4
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
mov edi, eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
cmp edi, 0xffffffff
jne 0x4bb9f7
call ebx
push eax
call fcn.004bb870
add esp, 4
or eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push 0
push edi
call dword [sym.imp.MSVCRT.dll__open_osfhandle]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
ret
test esi, esi
jne 0x4bbaab
mov eax, dword [esp + 0x18]
push dword [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.MSVCRT.dll__open]
mov esi, eax
add esp, 0xc
test esi, esi
jns 0x4bbb39
call edi
cmp dword [eax], 0xd
jne 0x4bba81
test dword [esp + 0x18], 0x100
je 0x4bba81
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4bba5d
call ebx
push eax
call fcn.004bb870
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x4bba71
call edi
pop edi
pop esi
pop ebp
mov dword [eax], 0x15
or eax, 0xffffffff
pop ebx
ret
call edi
pop edi
pop esi
pop ebp
mov dword [eax], 0xd
or eax, 0xffffffff
pop ebx
ret
call edi
cmp dword [eax], 2
jne 0x4bbb39
push ebp
call fcn.004bbc60
mov esi, eax
add esp, 4
test esi, esi
jne 0x4bbaab
call edi
pop edi
pop esi
pop ebp
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
ret
push dword [esp + 0x1c]
mov ebp, dword [esp + 0x1c]
push ebp
push esi
call dword [sym.imp.MSVCRT.dll__wopen]
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jns 0x4bbb26
call edi
cmp dword [eax], 0xd
jne 0x4bbb26
test ebp, 0x100
je 0x4bbb26
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4bbaff
call ebx
push eax
call fcn.004bb870
add esp, 4
push esi
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x4bbb1e
call edi
push esi
mov dword [eax], 0x15
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret
call edi
mov dword [eax], 0xd
push esi
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
Function at 0x4bbb40
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x4bbb58
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
cmp dword [esp + 0xc], 0
jne 0x4bbb62
xor eax, eax
ret
push eax
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
add esp, 4
lea ecx, [esp + 4]
push 0
push ecx
push dword [esp + 0x14]
push dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4bbbca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe8
jne 0x4bbba3
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xb
or eax, 0xffffffff
ret
cmp eax, 0x6d
je 0x4bbb5f
cmp eax, 5
jne 0x4bbbbd
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.004bb870
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x4bbe90
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x4bbea8
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push 0
lea ecx, [esp + 8]
push ecx
push dword [esp + 0x14]
push dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4bbef4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4bbee7
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.004bb870
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x4bc1e0
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea eax, [esp + 4]
push 0xf0000000
push 1
push 0
push 0
push eax
call esi
test eax, eax
jne 0x4bc21e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x4bc247
push 8
push 1
push 0
push 0
lea eax, [esp + 0x14]
push eax
call esi
test eax, eax
je 0x4bc247
push dword [esp + 0xc]
push dword [esp + 0x14]
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [esp + 8]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test esi, esi
je 0x4bc247
xor eax, eax
pop esi
pop ecx
ret
mov eax, 0xffffffe7
pop esi
pop ecx
ret
Function at 0x4e47e0
Capabilities:
Encode data using xor

Disassembly:
push edi
call fcn.004e4820
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0xc]
not eax
test edi, edi
je 0x4e4819
push esi
mov esi, dword [esp + 0xc]
lea esp, [esp]
movzx ecx, byte [esi]
lea esi, [esi + 1]
movzx edx, al
xor edx, ecx
shr eax, 8
xor eax, dword [edx*4 + 0x697090]
dec edi
jne 0x4e4800
pop esi
not eax
pop edi
ret
Function at 0x4e5f40
Capabilities:
Encode data using xor

Disassembly:
cmp byte [0x696308], 0
push ebx
push esi
push edi
jne 0x4e605e
mov byte [0x696308], 1
xor esi, esi
lea esp, [esp]
mov ecx, esi
xor eax, eax
and ecx, 1
mov edx, esi
or ecx, eax
je 0x4e5f80
shrd edx, eax, 1
shr eax, 1
xor edx, 0xd7870f42
xor eax, 0xc96c5795
jmp 0x4e5f86
shrd edx, eax, 1
shr eax, 1
mov ecx, edx
shrd edx, eax, 1
and ecx, 1
shr eax, 1
or ecx, 0
je 0x4e5fa1
xor edx, 0xd7870f42
xor eax, 0xc96c5795
mov ecx, edx
shrd edx, eax, 1
and ecx, 1
shr eax, 1
or ecx, 0
je 0x4e5fbc
xor edx, 0xd7870f42
xor eax, 0xc96c5795
mov ecx, edx
shrd edx, eax, 1
and ecx, 1
shr eax, 1
or ecx, 0
je 0x4e5fd7
xor edx, 0xd7870f42
xor eax, 0xc96c5795
mov ecx, edx
shrd edx, eax, 1
and ecx, 1
shr eax, 1
or ecx, 0
je 0x4e5ff2
xor edx, 0xd7870f42
xor eax, 0xc96c5795
mov ecx, edx
shrd edx, eax, 1
and ecx, 1
shr eax, 1
or ecx, 0
je 0x4e600d
xor edx, 0xd7870f42
xor eax, 0xc96c5795
mov ecx, edx
shrd edx, eax, 1
and ecx, 1
shr eax, 1
or ecx, 0
je 0x4e6028
xor edx, 0xd7870f42
xor eax, 0xc96c5795
mov ecx, edx
shrd edx, eax, 1
and ecx, 1
shr eax, 1
or ecx, 0
je 0x4e6043
xor edx, 0xd7870f42
xor eax, 0xc96c5795
mov dword [esi*8 + 0x696310], edx
mov dword [esi*8 + 0x696314], eax
inc esi
cmp esi, 0x100
jb 0x4e5f60
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
not ebx
mov edi, dword [esp + 0x14]
not edx
test edi, edi
je 0x4e6099
mov esi, dword [esp + 0x10]
movzx eax, byte [esi]
lea esi, [esi + 1]
movzx ecx, bl
shrd ebx, edx, 8
xor ecx, eax
shr edx, 8
xor ebx, dword [ecx*8 + 0x696310]
xor edx, dword [ecx*8 + 0x696314]
dec edi
jne 0x4e6076
pop edi
not ebx
not edx
pop esi
mov eax, ebx
pop ebx
ret

Function at 0x4fa9a0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x4fa9c0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x4fa9c0
mov eax, dword [eax + 0x44]
test eax, eax
je 0x4fa9c0
push dword [esp + 8]
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x50b800
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x14], 0xca
jne 0x50b82f
push esi
call fcn.0050b9e0
add esp, 4
cmp byte [esi + 0x40], 0
je 0x50b828
mov dword [esi + 0x14], 0xcf
mov al, 1
pop esi
ret
mov dword [esi + 0x14], 0xcb
mov eax, dword [esi + 0x14]
push edi
cmp eax, 0xcb
jne 0x50b8b2
mov eax, dword [esi + 0x1a8]
cmp byte [eax + 0x10], 0
je 0x50b89d
mov eax, dword [esi + 8]
test eax, eax
je 0x50b855
mov eax, dword [eax]
push esi
call eax
add esp, 4
mov eax, dword [esi + 0x1a8]
push esi
mov eax, dword [eax]
call eax
add esp, 4
test eax, eax
je 0x50b898
cmp eax, 2
je 0x50b89d
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x50b846
cmp eax, 3
je 0x50b87d
cmp eax, 1
jne 0x50b846
inc dword [ecx + 4]
mov edx, dword [esi + 8]
mov edi, dword [edx + 8]
cmp dword [ecx + 4], edi
jl 0x50b846
mov eax, dword [esi + 0x128]
add eax, edi
mov dword [edx + 8], eax
jmp 0x50b846
pop edi
xor al, al
pop esi
ret
mov eax, dword [esi + 0x7c]
push esi
mov dword [esi + 0x84], eax
call fcn.0050b8e0
add esp, 4
pop edi
pop esi
ret
cmp eax, 0xcc
je 0x50b8d4
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x15
mov ecx, dword [esi]
mov eax, dword [esi + 0x14]
mov dword [ecx + 0x18], eax
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
push esi
call fcn.0050b8e0
add esp, 4
pop edi
pop esi
ret

Function at 0x50b8e0
Capabilities:
Check for software breakpoints

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0xcc
je 0x50b90c
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax]
call eax
add esp, 4
mov dword [esi + 0x78], 0
mov dword [esi + 0x14], 0xcc
mov eax, dword [esi + 0x198]
cmp byte [eax + 8], 0
je 0x50b992
lea ebx, [esi + 0x78]
jmp 0x50b920
mov eax, dword [ebx]
cmp eax, dword [esi + 0x60]
jae 0x50b966
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x50b945
mov dword [ecx + 4], eax
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0x60]
push esi
mov dword [ecx + 8], eax
mov eax, dword [esi + 8]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [esi + 0x19c]
mov edi, dword [ebx]
push 0
push ebx
mov eax, dword [eax + 4]
push 0
push esi
call eax
mov eax, dword [ebx]
add esp, 0x10
cmp eax, edi
je 0x50b9a8
cmp eax, dword [esi + 0x60]
jb 0x50b927
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax + 4]
call eax
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax]
call eax
mov dword [ebx], 0
add esp, 8
mov eax, dword [esi + 0x198]
cmp byte [eax + 8], 0
jne 0x50b920
xor eax, eax
cmp byte [esi + 0x41], al
pop edi
setne al
add eax, 0xcd
mov dword [esi + 0x14], eax
mov al, 1
pop esi
pop ebx
ret
pop edi
pop esi
xor al, al
pop ebx
ret
Function at 0x50cb20
Capabilities:
Query environment variable

Disassembly:
push ecx
push esi
push edi
mov edi, dword [esp + 0x10]
push edi
mov dword [edi + 4], 0
call fcn.00518d40
push 0x54
push edi
mov dword [esp + 0x14], eax
call fcn.00518d10
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x50cb67
push edi
call fcn.00518d50
mov ecx, dword [edi]
push edi
mov dword [ecx + 0x14], 0x38
mov ecx, dword [edi]
mov dword [ecx + 0x18], esi
mov eax, dword [edi]
mov eax, dword [eax]
call eax
add esp, 8
mov dword [esi], fcn.0050c7b0
mov dword [esi + 4], fcn.0050c640
mov dword [esi + 8], fcn.0050c710
mov dword [esi + 0xc], fcn.0050c590
mov dword [esi + 0x10], 0x50ce80
mov dword [esi + 0x14], 0x50ce10
mov dword [esi + 0x18], 0x50cc70
mov dword [esi + 0x1c], 0x50c440
mov dword [esi + 0x20], 0x50c2f0
mov dword [esi + 0x24], 0x50ca20
mov dword [esi + 0x28], 0x50cef0
mov dword [esi + 0x30], 0x3b9aca00
mov eax, dword [esp + 8]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x38], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0x54
push str.JPEGMEM
mov dword [edi + 4], esi
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x50cc4a
lea ecx, [esp + 0x10]
mov byte [esp + 0x10], 0x78
push ecx
lea ecx, [esp + 0xc]
push ecx
push str._ld_c
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x10
test eax, eax
jle 0x50cc4a
mov al, byte [esp + 0x10]
cmp al, 0x6d
je 0x50cc39
cmp al, 0x4d
mov eax, dword [esp + 8]
jne 0x50cc41
imul eax, dword [esp + 8], 0x3e8
imul eax, eax, 0x3e8
mov dword [esi + 0x2c], eax
pop edi
pop esi
pop ecx
ret
Function at 0x510410
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
cmp dword [ebp + 0x4c], 1
mov ebx, dword [ebp + 0x1c0]
mov dword [esp + 0x1c], ebx
jne 0x510435
mov esi, 0x1fe
mov byte [ebx + 0x1c], 1
jmp 0x51043b
xor esi, esi
mov byte [ebx + 0x1c], 0
push dword [ebp + 0x64]
mov ecx, dword [ebp + 4]
lea eax, [esi + 0x100]
push eax
push 1
push ebp
mov eax, dword [ecx + 8]
mov dword [esp + 0x20], esi
call eax
xor ecx, ecx
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x14]
add esp, 0x10
mov dword [esp + 0x14], ecx
cmp dword [ebp + 0x64], ecx
jle 0x510550
push edi
lea ecx, [ecx]
mov edi, dword [ebx + ecx*4 + 0x20]
cdq
idiv edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], eax
test esi, esi
je 0x51048d
mov eax, dword [ebx + 0x18]
add dword [eax + ecx*4], 0xff
mov eax, dword [ebx + 0x18]
xor ebx, ebx
mov ebp, dword [eax + ecx*4]
lea eax, [edi + 0xfe]
lea ecx, [edi*2 - 2]
cdq
idiv ecx
xor esi, esi
mov edx, eax
lea esp, [esp]
cmp esi, edx
jle 0x5104e6
mov ecx, dword [esp + 0x10]
lea edi, [edi*2 - 2]
imul eax, ebx, 0x1fe
add ecx, 0xfe
add ecx, eax
lea ecx, [ecx]
add ecx, 0x1fe
inc ebx
mov eax, ecx
cdq
idiv edi
mov edx, eax
cmp esi, edx
jg 0x5104d0
mov edi, dword [esp + 0x10]
mov al, byte [esp + 0x1c]
imul bl
mov byte [esi + ebp], al
inc esi
cmp esi, 0xff
jle 0x5104b0
mov esi, dword [esp + 0x14]
test esi, esi
je 0x510531
mov ecx, 1
lea edx, [ebp - 1]
jmp 0x510510
movzx eax, byte [ebp]
lea edx, [edx - 1]
mov byte [edx + 1], al
movzx eax, byte [ebp + 0xff]
mov byte [ecx + ebp + 0xff], al
inc ecx
cmp ecx, 0xff
jle 0x510510
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [eax + 0x64]
mov eax, dword [esp + 0x1c]
jl 0x510470
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x525396
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x696b10], 0
push ebx
push esi
mov esi, 0x696b18
jne 0x5253c2
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x696b30], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x696b10], 1
push dword [0x696b30]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x52545f
push 0x14
push 8
push dword [0x61c4e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x525489
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x696b14]
test eax, eax
je 0x525404
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x696b14], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x52548e
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x696b30]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x61c4e4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x525489
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8
Function at 0x10002e00
Capabilities:
Create thread

Disassembly:
push esi
push edi
mov esi, ecx
call fcn.10005da0
push 0x180
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x10002e23
mov ecx, eax
call fcn.1001b380
jmp 0x10002e25
xor eax, eax
test eax, eax
mov dword [esi + 4], eax
jne 0x10002e34
pop edi
or eax, 0xffffffff
pop esi
ret 8
mov ecx, str.GWNCSimu
test ecx, ecx
je 0x10002e50
push 0xfa
add eax, 0x7c
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov ecx, dword [esi + 4]
push 0
push 0x10056bbc
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push eax
push ecx
mov ecx, dword [esi + 4]
call fcn.1001b660
mov ecx, dword [esi + 4]
push 0
push 2
push 1
push esi
call fcn.10014250
mov eax, dword [esi + 4]
mov dword [eax + 0x68], 0x10002a30
mov dword [eax + 0x6c], esi
mov ecx, dword [esi + 4]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov eax, dword [esi + 4]
lea edi, [esi + 0xc]
push eax
mov ecx, edi
call fcn.10012ed0
lea ecx, [esi + 0x30e64]
push ecx
push 0
push esi
push 0x10002a10
push 0x200000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x70
mov dword [esi + 0x30e60], eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x10002edc
mov ecx, eax
call fcn.10001000
jmp 0x10002ede
xor eax, eax
test eax, eax
mov dword [esi + 8], eax
jne 0x10002eef
pop edi
mov eax, 0xfffffffe
pop esi
ret 8
push 0
push 8
push 7
push esi
mov ecx, eax
call fcn.10014250
mov ecx, dword [esi + 8]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov eax, dword [esi + 8]
mov ecx, edi
push eax
call fcn.10012ed0
pop edi
xor eax, eax
pop esi
ret 8

Function at 0x10004510
Capabilities:
Get routing table

Disassembly:
push ecx
push esi
lea eax, [esp + 4]
push 0
push eax
push 0
mov dword [esp + 0x10], 0
call sub.iphlpapi.dll_GetIpForwardTable
cmp eax, 0x7a
jne 0x10004566
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x10004576
lea edx, [esp + 4]
push 0
push edx
push esi
call sub.iphlpapi.dll_GetIpForwardTable
test eax, eax
je 0x10004561
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop esi
pop ecx
ret
mov eax, esi
pop esi
pop ecx
ret
push eax
push str.GetIpForwardTable_Failed_Err:0x_x
push 4
call fcn.1000be40
add esp, 0xc
xor eax, eax
pop esi
pop ecx
ret