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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x5f7350]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x64]
mov dword [ebp - 0x104], eax
mov dword [ebp - 0x208], eax
mov eax, dword [ebp + 0xc]
cdq
mov ecx, 0x3e8
idiv ecx
push ebx
push esi
xor esi, esi
inc esi
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x20c], esi
imul edx, edx, 0x3e8
mov dword [ebp - 0x214], eax
xor eax, eax
mov dword [ebp - 0x210], edx
cmp byte [ebp + 8], bl
je 0x50f3b4
lea ecx, [ebp - 0x108]
jmp 0x50f3ba
lea eax, [ebp - 0x108]
cmp dword [ebp + 0xc], ebx
jl 0x50f3c7
lea edx, [ebp - 0x214]
jmp 0x50f3c9
xor edx, edx
push edx
lea edx, [ebp - 0x20c]
push edx
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jne 0x50f3e2
xor eax, eax
jmp 0x50f414
cmp eax, 0xffffffff
jne 0x50f3ec
or eax, 0xffffffff
jmp 0x50f414
mov ebx, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
lea eax, [ebp - 0x20c]
push eax
push dword [edi + 0x64]
call ebx
test eax, eax
je 0x50f412
lea eax, [ebp - 0x108]
push eax
push dword [edi + 0x64]
call ebx
test eax, eax
je 0x50f3e7
mov eax, esi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.005146df
leave
ret 8

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
and dword [ebp - 8], 0
push ebx
push esi
push edi
lea esi, [ebp - 0x18]
mov edi, eax
call fcn.00498215
mov ebx, dword [sym.imp.WS2_32.dll_send]
mov byte [ebp - 1], 1
jmp 0x50f4b1
jle 0x50f454
add dword [ebp - 8], eax
sub dword [ebp + 0xc], eax
add dword [ebp + 8], eax
jmp 0x50f461
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x50f4cc
cmp dword [ebp + 0xc], 0
je 0x50f4c2
cmp byte [ebp - 1], 0
mov ecx, dword [ebp + 0x10]
jne 0x50f49f
test ecx, ecx
js 0x50f49f
lea esi, [ebp - 0x10]
call fcn.00498215
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
sbb ecx, dword [ebp - 0x14]
push 0
push 0x2710
push ecx
push eax
call fcn.00531b10
mov ecx, dword [ebp + 0x10]
sub ecx, eax
test ecx, ecx
jle 0x50f4c2
push ecx
push 1
call fcn.0050f351
mov byte [ebp - 1], 0
test eax, eax
js 0x50f4cc
je 0x50f4c2
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 0x64]
call ebx
test eax, eax
jne 0x50f447
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0xc
or eax, 0xffffffff
jmp 0x50f4c5

Function at 0x50f4d1
Capabilities:
Parse pe header

Disassembly:
push 0x24
push 0x5c8b28
call fcn.00517a00
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
and dword [ebp - 4], 0
mov edx, dword [ebp - 0x30]
cmp word [edx], 0x5a4d
jne 0x50f536
mov eax, dword [edx + 0x3c]
add eax, edx
cmp dword [eax], 0x4550
jne 0x50f536
mov ecx, dword [eax + 0xd8]
lea esi, [ecx + edx]
cmp dword [ebp + 0xc], esi
jb 0x50f536
mov eax, dword [eax + 0xdc]
add eax, ecx
add eax, edx
cmp dword [ebp + 0xc], eax
jae 0x50f536
mov dword [ebp - 4], 0xfffffffe
mov al, 1
jmp 0x50f53f
mov dword [ebp - 4], 0xfffffffe
xor al, al
call fcn.00517a45
ret
Function at 0x50f62f
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, 0x7ff80000
push edi
jbe 0x50f64e
lea eax, [esi - 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x50f655
mov dword [ebp - 4], 0x10000
cmp esi, 0x80000000
jae 0x50f668
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 8], eax
jmp 0x50f66f
mov dword [ebp - 8], 0xfff80000
mov eax, dword [0x5ffe04]
test eax, eax
mov ecx, dword [0x5ffe00]
jne 0x50f689
test ecx, ecx
je 0x50f69e
mov eax, ecx
mov dword [0x5ffe04], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x50f69e
cmp edx, dword [ebp - 4]
jb 0x50f69e
cmp edx, dword [ebp - 8]
jbe 0x50f7c9
mov eax, ecx
test ecx, ecx
jmp 0x50f6c2
test eax, eax
je 0x50f6bd
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x50f6bd
cmp ecx, dword [ebp - 4]
jb 0x50f6bd
cmp ecx, dword [ebp - 8]
jbe 0x50f7c9
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x5ffe04], eax
jne 0x50f6a4
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, esi
and eax, 0xffff
sub esi, eax
cmp esi, dword [ebp - 4]
mov dword [ebp + 8], esi
mov ebx, 0x3000
jbe 0x50f78b
lea eax, [esi - 0x70000000]
cmp eax, 0x10000000
ja 0x50f6fb
mov esi, 0x6fff0000
push 0x1c
lea eax, [ebp - 0x40]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x50f73b
mov eax, 0x10000
cmp dword [ebp - 0x30], eax
jne 0x50f71b
cmp dword [ebp - 0x34], eax
jae 0x50f72b
mov esi, dword [ebp - 0x3c]
add esi, 0xffff0000
cmp esi, dword [ebp - 4]
ja 0x50f6e9
jmp 0x50f73b
push 0x40
push ebx
push eax
push esi
call edi
test eax, eax
mov dword [0x5ffe04], eax
jne 0x50f797
mov esi, dword [ebp + 8]
jmp 0x50f78b
lea eax, [esi - 0x70000000]
cmp eax, 0x10000000
ja 0x50f752
mov esi, 0x80010000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x50f790
mov eax, 0x10000
cmp dword [ebp - 0x14], eax
jne 0x50f782
cmp dword [ebp - 0x18], eax
jb 0x50f782
push 0x40
push ebx
push eax
push esi
call edi
test eax, eax
mov dword [0x5ffe04], eax
jne 0x50f797
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
lea esi, [eax + ecx]
cmp esi, dword [ebp - 8]
jb 0x50f740
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov ecx, dword [0x5ffe00]
xor edx, edx
mov dword [eax + 4], ecx
mov dword [eax], 0x52727464
mov dword [eax + 8], edx
mov dword [0x5ffe00], eax
lea ecx, [eax + 0xffe0]
mov esi, 0x7fd
mov dword [ecx + 0x18], edx
mov edx, ecx
sub ecx, 0x20
dec esi
jne 0x50f7bb
mov dword [eax + 8], edx
mov esi, dword [eax + 8]
cmp esi, dword [ebp - 4]
jb 0x50f790
cmp esi, dword [ebp - 8]
ja 0x50f790
mov ecx, dword [esi + 0x18]
push 0x20
push 0xcc
push esi
mov dword [eax + 8], ecx
call fcn.00517bf0
add esp, 0xc
mov eax, esi
jmp 0x50f792
Function at 0x50f811
Capabilities:
Parse pe header

Disassembly:
push 0x24
push 0x5c8b48
call fcn.00517a00
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x50f869
and dword [ebp - 4], 0
mov eax, dword [ebp - 0x30]
cmp word [eax], 0x5a4d
jne 0x50f862
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x50f862
cmp word [ecx + 0x14], 0
je 0x50f862
mov dword [ebp - 4], 0xfffffffe
jmp 0x50f86b
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
call fcn.00517a45
ret

Function at 0x50f883
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push edi
xor edi, edi
cmp dword [0x5ffe0c], edi
je 0x50f896
mov eax, 0x10dd
jmp 0x50f8f1
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x5ffe0c
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x50f88f
push esi
mov esi, dword [0x5ffe00]
mov dword [0x5ffe08], edi
mov dword [0x5ffe1c], edi
mov dword [0x5ffe18], edi
mov dword [0x5ffe10], edi
mov dword [0x5ffe14], edi
jmp 0x50f8ea
lea eax, [esp + 8]
push eax
push 0x40
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [esi + 4]
cmp esi, edi
jne 0x50f8d4
xor eax, eax
pop esi
pop edi
pop ecx
ret

Function at 0x50f8f4
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x5ffe0c], eax
je 0x50f90a
mov eax, 0x10dd
pop ecx
ret
push ebx
push esi
mov esi, dword [0x5ffe1c]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x50f955
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi + 4], ebx
jne 0x50f946
mov edi, dword [esi + 0x10]
cmp edi, ebx
je 0x50f946
call fcn.0050f7f0
mov dword [esi + 0x10], ebx
mov edi, dword [esi]
push esi
call fcn.00515779
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x50f919
mov dword [0x5ffe1c], ebx
call fcn.0050f608
mov esi, dword [0x5ffe18]
cmp esi, ebx
je 0x50f982
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi]
push esi
call fcn.00515779
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x50f96a
pop edi
pop esi
mov dword [0x5ffe18], ebx
mov dword [0x5ffe0c], ebx
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x50fbd9
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x5ffe10]
test eax, eax
jne 0x50fc49
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 8]
cmp edi, eax
jne 0x50fbf5
xor eax, eax
jmp 0x50fc48
push esi
push 8
call fcn.00515827
mov esi, eax
test esi, esi
pop ecx
jne 0x50fc09
push 8
pop edi
jmp 0x50fc24
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x50fc35
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call fcn.00515779
pop ecx
and dword [0x5ffe14], 0
mov dword [0x5ffe10], edi
mov eax, edi
jmp 0x50fc47
mov eax, dword [0x5ffe18]
mov dword [esi], eax
mov dword [esi + 4], edi
mov dword [0x5ffe18], esi
xor eax, eax
pop esi
pop edi
ret 4
Function at 0x5146df
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5f7350]
jne 0x5146e9
repz ret
jmp fcn.0051b5cb

Function at 0x52db0c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5f7350]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0051c0ee
and dword [ebp - 0x14], 0
cmp dword [0x602304], 0
mov dword [ebp - 0x18], eax
jne 0x52dbbf
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x52dc67
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x52dc67
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x602304], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x602308], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x60230c], eax
call edi
push eax
call esi
mov dword [0x602314], eax
test eax, eax
je 0x52dbbf
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x602310], eax
mov eax, dword [0x602310]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x52dc18
cmp dword [0x602314], ecx
je 0x52dc18
push eax
call esi
push dword [0x602314]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x52dc18
test ebx, ebx
je 0x52dc18
call edi
test eax, eax
je 0x52dc0f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x52dc0f
test byte [ebp - 8], 1
jne 0x52dc18
or dword [ebp + 0x10], 0x200000
jmp 0x52dc4b
mov eax, dword [0x602308]
cmp eax, dword [ebp - 0x18]
je 0x52dc4b
push eax
call esi
test eax, eax
je 0x52dc4b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x52dc4b
mov eax, dword [0x60230c]
cmp eax, dword [ebp - 0x18]
je 0x52dc4b
push eax
call esi
test eax, eax
je 0x52dc4b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x602304]
call esi
test eax, eax
je 0x52dc67
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x52dc69
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005146df
leave
ret

Function at 0x536bb0
Capabilities:
Encode data using xor

Disassembly:
movzx ecx, word [edx]
xor eax, eax
test cx, cx
je 0x536bd6
lea ebx, [ebx]
imul eax, eax, 0xf4243
movzx ecx, cx
add edx, 2
xor eax, ecx
movzx ecx, word [edx]
test cx, cx
jne 0x536bc0
ret
Function at 0x4078d0
Capabilities:
Print debug messages

Disassembly:
push 8
push 0x408190
call fcn.00403c84
push 0x40b2cc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp byte [0x40b24e], bl
jne 0x407957
push 0x40b258
push 0x20119
push ebx
push dword [0x409150]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
cmp esi, ebx
je 0x40794b
mov dword [0x40b258], ebx
push 0x403220
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp esi, ebx
jle 0x407934
movzx esi, si
or esi, 0x80070000
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x40900c
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, esi
jmp 0x407965
call fcn.00407481
mov byte [0x40b24e], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.0040796d
xor eax, eax
call fcn.00403cc9
ret 4

Function at 0x4079b5
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x40900c]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x40b24c], 0
push esi
mov esi, dword [ebp + 8]
je 0x407a39
push edi
mov edi, 0x40b264
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x404]
push 0x200
lea ecx, [ebp - 0x404]
mov dword [ebp - 0x408], eax
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 8]
cmp eax, 0x8007007a
jne 0x407a18
mov eax, dword [esi]
lea ecx, [ebp - 0x408]
push ecx
mov ecx, esi
call dword [eax + 4]
test eax, eax
jl 0x407a31
push dword [ebp - 0x408]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call esi
push 0x4032f8
call esi
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00403f0d
leave
ret 4

Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
pop eax
nop
nop
nop
nop
nop
nop
add eax, 0x40729f
sub eax, 0x407245
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x432030
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43201e
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x406dc0
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.0040a058
test esi, esi
jne 0x406df6
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.0040a1e0
jmp 0x406e14
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00406ca4
mov edi, eax
test esi, esi
je 0x406e14
cmp dword [ebx], 0
je 0x406e14
dec esi
jmp 0x406dfd
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x406e20
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x4eb008], 0x8088405
inc edx
mov dword [ebx + 0x4eb008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x408d34
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.0040917c
mov byte [esp], al
cmp byte [esp], 0
jne 0x408ebe
test edi, edi
je 0x408ebe
mov byte [esp + 1], 0
test ebp, ebp
jle 0x408dfe
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x408dd9
cmp edi, 0xffffffff
je 0x408d99
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408d99
mov byte [esp], 0
jmp 0x408ebe
mov ebx, dword [esi]
cmp ebx, 1
jg 0x408dd9
test ebx, ebx
jne 0x408dcb
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x408dcb
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x408ebe
lea eax, [esp + 0xc]
call fcn.00408a14
dec ebp
test ebp, ebp
jg 0x408d7e
cmp edi, 0xffffffff
je 0x408dfe
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408dfc
mov byte [esp], 0
jmp 0x408ebe
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x408d42
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408dfe
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00408f2c
mov edx, eax
mov ebx, dword [0x4f68f8]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x408e62
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x408e60
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x408e62
xor edi, edi
cmp byte [esp], 0
je 0x408e88
mov ebx, dword [esi]
test bl, 1
jne 0x408e9e
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408e68
mov byte [esp + 1], 1
jmp 0x408e9e
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408e88
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x408e15
cmp byte [esp], 0
je 0x408ebe
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x409ce8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4f6058], 0
je 0x409d4f
cmp word [0x4f6344], 0xd7b2
jne 0x409d11
cmp dword [0x4f634c], 0
jbe 0x409d11
mov eax, 0x4f6340
call dword [0x4f635c]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
mov eax, 0x409d7c
call fcn.0040a8b0
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4eb032], 0
jne 0x409d6b
push 0
push 0x4eb9ca
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x409f18
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
cmp dword [0x4eb034], 0
je 0x409f43
mov edx, edi
mov eax, esi
call dword [0x4eb034]
mov ebx, eax
jmp 0x409f54
mov eax, 8
call fcn.00406a00
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x4f6059], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x409ee0
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateThread
mov esi, eax
test esi, esi
jne 0x409f84
mov eax, ebx
call fcn.00406a1c
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc
Function at 0x40c7ec
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe98
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x160], ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x40c951
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.0040a058
cmp si, word [0x4eba08]
jb 0x40c884
cmp si, word [0x4ebc08]
ja 0x40c884
mov edi, 0x40
xor eax, eax
mov dword [ebp - 8], eax
cmp edi, dword [ebp - 8]
jb 0x40c884
mov ebx, edi
add ebx, dword [ebp - 8]
shr ebx, 1
cmp si, word [ebx*8 + 0x4eba08]
jae 0x40c85e
mov edi, ebx
dec edi
jmp 0x40c87f
cmp si, word [ebx*8 + 0x4eba08]
jbe 0x40c86e
inc ebx
mov dword [ebp - 8], ebx
jmp 0x40c87f
mov edx, dword [ebp - 4]
mov eax, dword [ebx*8 + 0x4eba0c]
call fcn.0040c70c
jmp 0x40c884
cmp edi, dword [ebp - 8]
jae 0x40c848
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x40c933
push 2
movzx eax, si
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x40c933
push 0x55
lea eax, [ebp - 0xb2]
push eax
push 0x59
movzx ebx, si
push ebx
call sub.kernel32.dll_GetLocaleInfoW
push 0x55
lea eax, [ebp - 0x15c]
push eax
push 0x5a
push ebx
call sub.kernel32.dll_GetLocaleInfoW
lea eax, [ebp - 0x160]
lea edx, [ebp - 0xb2]
mov ecx, 0x55
call fcn.0040acb0
push dword [ebp - 0x160]
push 0x40c96c
lea eax, [ebp - 0x164]
lea edx, [ebp - 0x15c]
mov ecx, 0x55
call fcn.0040acb0
push dword [ebp - 0x164]
push 0x40c97c
lea eax, [ebp - 0x168]
lea edx, [ebp - 0xb2]
mov ecx, 0x55
call fcn.0040acb0
push dword [ebp - 0x168]
mov eax, dword [ebp - 4]
mov edx, 5
call fcn.0040aee8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c958
lea eax, [ebp - 0x168]
mov edx, 3
call fcn.0040a0b8
ret
Function at 0x40cb04
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40cc08
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4f8b88
call sub.kernel32.dll_EnterCriticalSection
cmp bx, word [0x4f8ba0]
jne 0x40cb50
mov eax, esi
mov edx, 0x4f8ba2
mov ecx, 0x55
call fcn.0040acb0
push 0x4f8b88
call sub.kernel32.dll_LeaveCriticalSection
jmp 0x40cbf2
push 0x4f8b88
call sub.kernel32.dll_LeaveCriticalSection
mov eax, esi
call fcn.0040a058
push 2
movzx eax, bx
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x40cbbf
cmp byte [0x4f8b84], 0
je 0x40cb84
mov edx, esi
mov eax, ebx
call fcn.0040c9e8
jmp 0x40cbbf
mov edx, esi
mov eax, ebx
call fcn.0040c7ec
call sub.kernel32.dll_GetSystemDefaultUILanguage
cmp bx, ax
je 0x40cbbf
cmp dword [esi], 0
je 0x40cba8
mov eax, esi
mov edx, 0x40cc20
call fcn.0040ae08
call sub.kernel32.dll_GetSystemDefaultUILanguage
lea edx, [ebp - 4]
call fcn.0040c7ec
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.0040ae08
push 0x4f8b88
call sub.kernel32.dll_EnterCriticalSection
mov word [0x4f8ba0], bx
mov eax, dword [esi]
call fcn.0040ac0c
mov ecx, eax
mov eax, 0x4f8ba2
mov edx, 0xaa
call fcn.0040c66c
push 0x4f8b88
call sub.kernel32.dll_LeaveCriticalSection
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40cc0f
lea eax, [ebp - 4]
call fcn.0040a058
ret