joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4056c0
Capabilities:
Hide graphical window

Disassembly:
push 0
mov eax, dword [0x40895c]
push eax
call sub.user32.dll_ShowWindow
push 0xffffffffffffffec
mov eax, dword [0x40895c]
push eax
call sub.user32.dll_GetWindowLongA
or eax, 0x80
push eax
push 0xffffffffffffffec
mov eax, dword [0x40895c]
push eax
call sub.user32.dll_SetWindowLongA
push 5
mov eax, dword [0x40895c]
push eax
call sub.user32.dll_ShowWindow
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x40279c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
imul edx, dword [0x40c02c], 0x8088405
inc edx
mov dword [0x40c02c], edx
mul edx
mov eax, edx
ret

Function at 0x4045a0
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
mov edx, ebx
mov eax, esp
call fcn.0040458c
add esp, 0x104
pop ebx
ret

Function at 0x405694
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x4056cd
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403278
jmp 0x4056d6
mov eax, ebx
mov edx, esi
call fcn.0040322c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4056e0
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x405701
mov al, byte [esp]
jmp 0x405703
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x406e64
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x406eac
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 4]
mov eax, ebx
call fcn.00406e00
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
call sub.kernel32.dll_GetFileAttributesA
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406eb3
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x4070b4
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x407142
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
jne 0x4070ff
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [ebp - 0x108]
mov eax, esi
call fcn.00403278
jmp 0x40712c
call sub.kernel32.dll_GetCommandLineA_1
cmp byte [eax], 0
jne 0x407113
lea eax, [ebp - 4]
call fcn.00403198
jmp 0x407122
lea edx, [ebp - 4]
call fcn.00406f78
test ebx, ebx
je 0x407122
dec ebx
jmp 0x407104
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.0040322c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407149
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x407150
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov edx, ebx
mov eax, esp
call fcn.00405268
add esp, 0x104
pop ebx
ret

Function at 0x40717c
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
mov edx, ebx
mov eax, esp
call fcn.00405268
add esp, 0x104
pop ebx
ret
Function at 0x4072c4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov edi, eax
xor eax, eax
push ebp
push 0x4073fc
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
mov eax, dword [ebp - 4]
push eax
push edi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x4073e6
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
je 0x407321
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 8]
jne 0x4073e6
cmp dword [ebp - 0x10], 0
jne 0x407336
mov eax, dword [ebp - 8]
call fcn.00403198
mov bl, 1
jmp 0x4073e6
cmp dword [ebp - 0x10], 0x70000000
jb 0x407344
call fcn.00405d0c
mov esi, dword [ebp - 0x10]
test esi, esi
sar esi, 0
lea eax, [ebp - 0x14]
mov ecx, esi
xor edx, edx
call fcn.00403278
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
call fcn.00403420
push eax
lea eax, [ebp - 0xc]
push eax
push 0
mov eax, dword [ebp - 4]
push eax
push edi
call sub.advapi32.dll_RegQueryValueExA
cmp eax, 0xea
je 0x4072ea
test eax, eax
jne 0x4073e6
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
je 0x407394
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 8]
jne 0x4073e6
mov esi, dword [ebp - 0x10]
test esi, esi
sar esi, 0
jmp 0x40739f
dec esi
test esi, esi
je 0x4073ad
mov eax, dword [ebp - 0x14]
cmp byte [eax + esi - 1], 0
je 0x40739e
cmp dword [ebp - 0xc], 7
jne 0x4073b8
test esi, esi
je 0x4073b8
inc esi
lea eax, [ebp - 0x14]
mov edx, esi
call fcn.004034f0
cmp dword [ebp - 0xc], 7
jne 0x4073d9
test esi, esi
je 0x4073d9
lea eax, [ebp - 0x14]
call fcn.00403420
mov byte [eax + esi - 1], 0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
call fcn.004031e8
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407403
lea eax, [ebp - 0x14]
call fcn.00403198
ret

Function at 0x407d44
Capabilities:
Hash data with crc32

Disassembly:
push esi
xor esi, esi
mov ecx, 0x40c560
mov eax, esi
mov edx, 8
test al, 1
je 0x407d60
shr eax, 1
xor eax, 0xedb88320
jmp 0x407d62
shr eax, 1
dec edx
jne 0x407d53
mov dword [ecx], eax
inc esi
add ecx, 4
cmp esi, 0x100
jne 0x407d4c
pop esi
ret

Function at 0x407d78
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
cmp dword [0x40c55c], 0
jne 0x407d9b
call fcn.00407d44
push 1
push 0x40c55c
call sub.kernel32.dll_InterlockedExchange
mov eax, edi
test esi, esi
je 0x407dc6
mov edx, ebx
and dx, 0xff
xor ecx, ecx
mov cl, byte [eax]
xor dx, cx
movzx edx, dx
mov edx, dword [edx*4 + 0x40c560]
shr ebx, 8
xor edx, ebx
mov ebx, edx
dec esi
inc eax
test esi, esi
jne 0x407da1
mov eax, ebx
pop edi
pop esi
pop ebx
ret
Function at 0x409420
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
mov esi, edx
mov ebx, eax
lea edx, [ebp - 0xc]
mov eax, ebx
call fcn.004093d4
test al, al
jne 0x409441
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x40948d
xor eax, eax
push ebp
push 0x40947d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
call fcn.00403414
push eax
call sub.kernel32.dll_DeleteFileA
mov dword [ebp - 4], eax
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409484
lea eax, [ebp - 0xc]
call fcn.00409410
ret
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4097b8
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov esi, eax
xor eax, eax
push ebp
push 0x4098a7
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
call fcn.004071a8
mov edx, dword [ebp - 8]
mov ecx, 0x4098c0
xor eax, eax
call fcn.004096ac
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
call sub.kernel32.dll_CreateDirectoryA
test eax, eax
jne 0x409875
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
cmp ebx, 0xb7
je 0x4097d8
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x18]
mov edx, dword [ebp - 4]
mov al, 0x36
call fcn.0040925c
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.0040511c
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.00407738
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x14]
mov ecx, 2
mov al, 0x69
call fcn.0040922c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, 0x404ae8
call fcn.00405d18
call fcn.00402eb4
jmp 0x4097d8
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.0040322c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4098ae
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.004031b8
lea eax, [ebp - 8]
mov edx, 2
call fcn.004031b8
ret

Function at 0x4098d0
Capabilities:
Shutdown system

Disassembly:
push ebx
push esi
add esp, 0xffffffec
mov esi, edx
mov ebx, eax
cmp dword [0x40b07c], 2
jne 0x40993d
push esp
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
jne 0x4098f8
xor eax, eax
jmp 0x40994a
lea eax, [esp + 8]
push eax
push 0x409950
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
mov dword [esp + 4], 1
mov dword [esp + 0x10], 2
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push 0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
call sub.kernel32.dll_GetLastError_1
test eax, eax
je 0x40993d
xor eax, eax
jmp 0x40994a
push esi
push ebx
call sub.user32.dll_ExitWindowsEx
neg eax
sbb eax, eax
neg eax
add esp, 0x14
pop esi
pop ebx
ret
Function at 0x409974
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x4099ce
inc esi
xor edi, edi
cmp edi, 1
jne 0x40999a
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x4099a8
cmp edi, 1
jle 0x4099a8
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00409420
test eax, eax
jne 0x4099ce
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x4099ce
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x4099ce
inc edi
dec esi
jne 0x40998a
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8

Function at 0x4099d8
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 1], dl
mov esi, eax
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax], edx
mov byte [ebp - 2], 0
test edi, edi
je 0x409a25
xor ebx, ebx
jmp 0x409a1a
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov eax, edi
call fcn.004050c8
test eax, eax
jne 0x409a19
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 2
jmp 0x409ad5
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x4099fb
mov al, byte [ebp - 1]
sub al, 1
jb 0x409a30
je 0x409a39
jmp 0x409a42
call fcn.004074d8
mov edi, eax
jmp 0x409a44
call sub.kernel32.dll_GetUserDefaultLangID
mov edi, eax
jmp 0x409a44
xor edi, edi
test di, di
je 0x409ad5
xor ebx, ebx
jmp 0x409a80
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
movzx edx, di
cmp eax, edx
jne 0x409a7f
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
je 0x409a74
call sub.kernel32.dll_GetACP
mov edx, dword [ebp - 8]
cmp eax, dword [edx + 0x2c]
jne 0x409a7f
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x409ad5
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x409a51
xor ebx, ebx
jmp 0x409aca
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
and eax, 0x3ff
mov edx, edi
and dx, 0x3ff
movzx edx, dx
cmp eax, edx
jne 0x409ac9
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
je 0x409abe
call sub.kernel32.dll_GetACP
mov edx, dword [ebp - 8]
cmp eax, dword [edx + 0x2c]
jne 0x409ac9
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x409ad5
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x409a8f
mov al, byte [ebp - 2]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 4
Function at 0x409e88
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x409f5b
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x409f74
push ebx
push 0x409f80
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.004033b4
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409f08
mov al, 0x6b
call fcn.00409ae4
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.00409e5c
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409f11
call fcn.00409e5c
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409f62
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x409ff4
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x40a0a8
jmp 0x40a09d
cmp dword [esi + 0x10], 0x1000
jne 0x40a089
test byte [esi + 0x15], 1
jne 0x40a089
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x40a048
cmp eax, 2
je 0x40a048
cmp eax, 0x10
je 0x40a048
cmp eax, 0x20
jne 0x40a05d
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x40a05d
mov bl, 1
xor ebp, ebp
jmp 0x40a06e
mov eax, dword [esi]
add eax, ebp
call fcn.00409fec
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x40a061
test bl, bl
je 0x40a089
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x40a0a8
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40a020
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x401840
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x4018a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x417078]
test esi, esi
jle 0x4019c0
mov eax, dword [0x41707c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x4018d4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401957
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x4018c0
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x4019e7
mov eax, dword [0x41707c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x41707c]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4019c7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401950
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401960
add dword [0x417078], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x41707c]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401950
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x4018de
mov eax, dword [0x41707c]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop
Function at 0x401ea0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x417094
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x41708c]
sub esp, 4
test ebx, ebx
je 0x401ef5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x401eee
test esi, esi
je 0x401eee
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401ed0
mov dword [esp], 0x417094
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402220
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402245
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402250
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402245
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test esi, esi
je 0x402298
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40228e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40229a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402280
xor eax, eax
pop ebx
pop esi
ret
Function at 0x40f580
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov dword [esp], ebp
call sym._strlen
mov dword [esp + 0x1c], eax
xor eax, eax
lea esi, [esi]
mov byte [esi + eax], al
add eax, 1
cmp eax, 0x100
jne 0x40f5a0
xor ebx, ebx
xor ecx, ecx
lea esi, [esi]
mov eax, ebx
movzx edi, byte [esi + ebx]
cdq
idiv dword [esp + 0x1c]
movsx eax, byte [ebp + edx]
mov edx, edi
movzx edx, dl
add ecx, edx
add ecx, eax
mov eax, ecx
sar eax, 0x1f
shr eax, 0x18
add ecx, eax
movzx ecx, cl
sub ecx, eax
lea eax, [esi + ecx]
movzx edx, byte [eax]
mov byte [esi + ebx], dl
mov edx, edi
add ebx, 1
mov byte [eax], dl
cmp ebx, 0x100
jne 0x40f5b8
add esp, 0x2c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40f610
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 4
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
test eax, eax
je 0x40f673
xor edx, edx
xor ebx, ebx
xor ecx, ecx
mov dword [esp], edx
lea esi, [esi]
mov edx, dword [esp]
add edx, 1
movzx eax, dl
lea esi, [edi + eax]
mov dword [esp], eax
movzx eax, byte [esi]
add ecx, eax
movzx ecx, cl
lea ebp, [edi + ecx]
movzx edx, byte [ebp]
mov byte [esi], dl
mov edx, dword [esp + 0x20]
mov byte [ebp], al
add al, byte [esi]
mov esi, dword [esp + 0x1c]
movzx eax, al
movzx eax, byte [edi + eax]
xor al, byte [esi + ebx]
mov byte [edx + ebx], al
add ebx, 1
cmp dword [esp + 0x24], ebx
jne 0x40f630
add esp, 4
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40fc00
Capabilities:
Initialize winsock library

Disassembly:
push edi
mov ecx, 0x3c
xor edx, edx
push esi
mov esi, 0x4123a0
sub esp, 0x294
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x3b
jmp 0x40fc2f
lea ecx, [eax - 1]
cmp ecx, edx
jl 0x40fc47
mov eax, ecx
sub eax, edx
sar eax, 1
add eax, edx
cmp dword [esp + eax*4 + 0x10], 0x43
je 0x40fc47
jg 0x40fc28
lea edx, [eax + 1]
cmp ecx, edx
jge 0x40fc2f
lea eax, [esp + 0x100]
mov dword [esp], 0x202
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov edx, eax
sub esp, 8
mov eax, 1
test edx, edx
jne 0x40fc72
call sym._get_time.part.0
add esp, 0x294
pop esi
pop edi
ret