joyce8/EMBER2024-capa huggingface dataset:
Function at 0x516a60
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x5b8810
push 0x553d69
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x5c04b4]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, ecx
mov esi, 4
call fcn.0051e410
test eax, eax
mov eax, 0x593718
jne 0x516ab3
mov eax, 0x574c4c
push dword [ebp + 8]
push dword [ebp + 0xc]
push eax
push str._sNODCOMM_08XTo_08XBroadcastMutex
push 0xffffffffffffffff
push 0x40
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.MSVCR120.dll__snwprintf_s]
add esp, 0x1c
lea eax, [ebp - 0x9c]
push eax
push 0
push 0x100001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [edi], eax
test eax, eax
je 0x516b85
call fcn.0051e410
test eax, eax
mov eax, 0x593718
jne 0x516b04
mov eax, 0x574c4c
push dword [ebp + 8]
push dword [ebp + 0xc]
push eax
push str._sNODCOMM_08XTo_08XBroadcast
push 0xffffffffffffffff
push 0x40
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.MSVCR120.dll__snwprintf_s]
add esp, 0x1c
lea eax, [ebp - 0x9c]
push eax
push 0
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [edi + 4], eax
test eax, eax
je 0x516b85
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 8], eax
test eax, eax
je 0x516b85
mov dword [ebp - 4], 0
cmp dword [eax], 0x20
jne 0x516b7e
cmp dword [eax + 8], 0x43646f4e
jne 0x516b7e
cmp dword [eax + 0xc], 0x206d6d6f
jne 0x516b7e
cmp dword [eax + 0x10], 2
jne 0x516b7e
xor esi, esi
mov dword [ebp - 0xa0], esi
mov dword [ebp - 4], 0xfffffffe
test esi, esi
je 0x516b90
mov ecx, edi
call fcn.00516460
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00553510
mov esp, ebp
pop ebp
ret 0x10
Function at 0x517700
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
imul esi, edx, 0x20c
push edi
mov dword [ebp - 4], ecx
cmp byte [esi + 0x5c0528], 0
jne 0x517745
push 0x100
lea edi, [esi + 0x5c052a]
push edi
push dword [esi + 0x5c0520]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x5177a8
cmp eax, 0x100
ja 0x5177a8
mov ecx, dword [ebp - 4]
mov byte [esi + 0x5c0528], 1
cmp word [esi + 0x5c052a], 0
push ebx
lea ebx, [esi + 0x5c052a]
je 0x51779f
mov esi, dword [esi + 0x5c0524]
inc esi
lea esi, [ecx + esi*2]
mov ecx, ebx
mov dword [ebp - 4], esi
lea edx, [ecx + 2]
jmp 0x517770
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x517770
sub ecx, edx
mov edx, esi
sar ecx, 1
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x517784
mov edi, dword [ebp + 0xc]
lea eax, [ecx + 1]
sub edx, esi
sar edx, 1
add eax, edx
cmp eax, edi
jbe 0x5177bc
pop ebx
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
mov word [edi], ax
xor al, al
pop edi
mov byte [esi + 0x5c0528], 1
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov edx, edi
push ebx
call fcn.0052fa00
push dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, edi
call fcn.0052fae0
add esp, 8
mov al, 1
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x518d70
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
mov eax, dword [0x5c04b4]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [esp + 8]
push edi
push eax
mov eax, esi
mov edi, edx
or eax, 0x2001f
mov dword [esp + 0x18], edi
push eax
push 0
mov ebx, ecx
push edi
push ebx
call dword [0x5c0060]
test eax, eax
jne 0x518e2e
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x101
push eax
lea eax, [esp + 0x34]
push eax
push 0
push dword [esp + 0x28]
call edi
test eax, eax
jne 0x518e20
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x20]
push esi
call fcn.00518d70
add esp, 4
test al, al
je 0x518e20
lea eax, [esp + 0x18]
mov dword [esp + 0x10], 0x101
push eax
push 0
push 0
push 0
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x34]
push eax
push 0
push dword [esp + 0x28]
call edi
test eax, eax
je 0x518de2
push dword [esp + 0xc]
call dword [0x5c00ac]
mov edi, dword [esp + 0x14]
cmp dword [0x5c6dc4], 0
je 0x518e44
push 0
push esi
push edi
push ebx
call dword [0x5c03a0]
jmp 0x518e4c
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x22c]
xor eax, eax
test esi, esi
pop edi
pop esi
sete al
pop ebx
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret
Function at 0x518e80
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
mov eax, dword [0x5c04b4]
xor eax, esp
mov dword [esp + 0x438], eax
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea eax, [esp + 0x18]
push esi
push edi
mov edi, dword [0x5c6dc4]
mov esi, ecx
push eax
push 0
push 0
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x2c], esi
push eax
lea eax, [esp + 0x44]
mov dword [esp + 0x28], 0x101
push eax
push 0
push esi
call ebx
test eax, eax
jne 0x518fdb
mov eax, edi
or eax, 0x2001f
mov dword [esp + 0x18], eax
lea ecx, [esp + 0xc]
push ecx
push eax
push 0
lea eax, [esp + 0x3c]
push eax
push esi
call dword [0x5c0060]
test eax, eax
jne 0x518f7e
lea eax, [esp + 0x28]
mov dword [esp + 0x10], 0x101
push eax
push 0
push 0
push 0
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x24c]
push eax
push 0
push dword [esp + 0x28]
call ebx
test eax, eax
jne 0x518f74
lea esp, [esp]
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x238]
push edi
call fcn.00518d70
add esp, 4
test al, al
je 0x518f74
lea eax, [esp + 0x28]
mov dword [esp + 0x10], 0x101
push eax
push 0
push 0
push 0
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x24c]
push eax
push 0
push dword [esp + 0x28]
call ebx
test eax, eax
je 0x518f30
push dword [esp + 0xc]
call dword [0x5c00ac]
cmp dword [0x5c6dc4], 0
lea eax, [esp + 0x30]
je 0x518f98
push 0
push edi
push eax
push esi
call dword [0x5c03a0]
jmp 0x518fa0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jne 0x518ffa
lea eax, [esp + 0x20]
mov dword [esp + 0x14], 0x101
push eax
push esi
push esi
push esi
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x44]
push eax
push esi
mov esi, dword [esp + 0x38]
push esi
call ebx
test eax, eax
mov eax, dword [esp + 0x18]
je 0x518ee4
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x438]
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x444]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret

Function at 0x519020
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 8]
mov edi, edx
mov esi, ecx
mov eax, edi
shr eax, 4
inc eax
movzx eax, ax
push eax
push 6
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
je 0x519085
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x51907e
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x519070
and edi, 0xf
jbe 0x519070
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec edi
jne 0x519064
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop ebx
pop edi
mov eax, esi
pop esi
pop ebp
ret
pop ebx
pop edi
xor eax, eax
pop esi
pop ebp
ret
pop edi
xor eax, eax
pop esi
pop ebp
ret
Function at 0x51acc0
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x568618
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5c04b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
test ecx, ecx
je 0x51ae94
cmp eax, 1
jb 0x51ae94
rdtsc
push 0x40
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
call fcn.005534d1
mov ebx, eax
add esp, 4
mov esi, ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
lea eax, [ebp - 0x18]
mov edi, dword [ebp + 8]
cmp edi, eax
mov eax, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
je 0x51ad64
xor esi, esi
mov dword [ebp - 0x18], esi
mov ecx, dword [edi]
test ecx, ecx
je 0x51ad62
push ecx
call eax
mov eax, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [edi], ebx
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x51ad75
push esi
call eax
add esp, 4
push dword [ebp - 0x24]
mov esi, dword [edi]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str._X__016llX_NodSSL
push 0x20
push esi
call fcn.0052fc70
add esp, 0x18
cmp eax, 0xffffffff
jne 0x51adb0
mov eax, 0x80090304
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea eax, [ebp - 0x10]
push 0x20
push 1
push str.Microsoft_Strong_Cryptographic_Provider
push dword [edi]
push eax
call ebx
test eax, eax
jne 0x51ade0
push 0x28
push 1
push str.Microsoft_Strong_Cryptographic_Provider
push dword [edi]
lea eax, [ebp - 0x10]
push eax
call ebx
test eax, eax
je 0x51ad99
lea eax, [ebp - 0x1c]
mov esi, 0x80090327
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0x8000
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push 0x2b
push 1
call dword [0x5c03a8]
test eax, eax
je 0x51ae27
lea eax, [ebp - 0x20]
push eax
push 1
push 0
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
neg eax
sbb eax, eax
not eax
and esi, eax
mov eax, dword [edi]
test eax, eax
je 0x51ae54
test esi, esi
je 0x51ae54
push 0x30
push 1
push 0
push eax
lea eax, [ebp - 0x30]
push eax
call ebx
mov eax, dword [edi]
test eax, eax
je 0x51ae4e
push eax
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [edi], 0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x51ae62
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x51ae70
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x51ae80
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x57
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x51bab0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
push ebx
mov bl, byte [ebp + 0x20]
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, ecx
and al, 0xe4
mov byte [ebp - 0xc], bl
movzx eax, al
neg eax
push esi
push edi
mov edi, dword [0x5c6dd0]
sbb eax, eax
and eax, dword [ebp + 0x14]
and ecx, 0xe7
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], edi
lea eax, [edi + 0x1c]
mov dword [ebp - 0x24], ecx
push eax
mov dword [ebp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi]
lea ecx, [ebp + 0xf]
push ecx
lea ecx, [ebp - 0x30]
push ecx
mov ecx, edi
call dword [eax + 8]
cmp byte [ebp + 0xf], 0
je 0x51bc28
cmp eax, 0xffffffff
je 0x51bc28
lea esi, [eax + eax*4]
mov eax, dword [edi + 4]
shl esi, 3
add eax, esi
mov dword [ebp + 0x10], eax
cmp dword [eax + 0x1c], 0
jne 0x51bbfa
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 0x20], eax
ja 0x51bbf7
call ebx
mov ebx, dword [edi + 8]
mov edx, eax
dec ebx
mov dword [ebp + 0xc], edx
js 0x51bc28
lea ecx, [ebx + ebx*4]
shl ecx, 3
mov dword [ebp + 0x20], ecx
mov esi, dword [edi + 4]
add esi, ecx
cmp dword [esi + 0x1c], 0
jne 0x51bbec
cmp dword [esi + 0x20], edx
ja 0x51bbec
mov ecx, 0xa
lea edi, [ebp - 0x58]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x50]
mov edi, dword [sym.imp.MSVCR120.dll_free]
test eax, eax
je 0x51bba3
push eax
call edi
add esp, 4
lea eax, [ebp - 0x44]
push eax
call dword [0x5c017c]
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x51bbc1
cmp byte [ebp - 0x34], 0
je 0x51bbc1
push eax
call dword [0x5c02c4]
mov esi, dword [ebp - 0x54]
test esi, esi
je 0x51bbda
mov ecx, dword [esi + 0x14]
call fcn.00500b10
push dword [esi]
call edi
push esi
call edi
add esp, 8
mov edi, dword [ebp - 8]
push ecx
push ebx
mov ecx, edi
call fcn.0051c110
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0xc]
sub ecx, 0x28
dec ebx
mov dword [ebp + 0x20], ecx
jns 0x51bb76
jmp 0x51bc28
mov bl, byte [ebp + 0x20]
mov eax, dword [edi + 4]
mov edx, dword [ebp + 8]
inc dword [eax + esi + 0x1c]
mov ecx, dword [edi + 4]
mov eax, dword [ecx + esi + 0x14]
mov dword [edx], eax
mov eax, dword [ecx + esi + 0x18]
mov dword [edx + 4], eax
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x51bc28
test bl, bl
je 0x51bc28
mov ecx, dword [edi + 4]
mov ecx, dword [ecx + esi + 0x10]
mov dword [edx], ecx
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
Function at 0x51e2d0
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x5c04b4]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x40
lea eax, [ebp - 0x48]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov dword [ebp - 0x48], 0x40
lea eax, [ebp - 0x48]
push eax
call dword [0x5c03d8]
test eax, eax
je 0x51e30d
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
jmp 0x51e31c
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
mov ecx, dword [ebp - 0x60]
xor eax, eax
add ecx, 0x100000
adc eax, 0
shrd ecx, eax, 0x14
shr eax, 0x14
mov eax, ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00553510
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 0xc], edx
cmp edi, 0xffffd8ef
jbe 0x51e873
cmp edi, 0xffffffff
je 0x51e873
mov edi, 0xffffd8ef
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [ebp - 8], eax
xor ecx, ecx
xor eax, eax
mov dword [ebp + 8], ecx
mov dword [ebp - 4], eax
test ebx, ebx
je 0x51e916
mov ecx, edi
cmp edi, 0xffffffff
je 0x51e8ab
test edi, edi
je 0x51e8ab
call esi
mov ecx, dword [ebp - 8]
add ecx, edi
sub ecx, eax
cmp ecx, edi
ja 0x51e90a
mov eax, dword [ebp - 4]
mov esi, 0x40
cmp ebx, 0x40
ja 0x51e8b7
mov esi, ebx
push ecx
mov ecx, dword [ebp - 0xc]
push 1
lea eax, [ecx + eax*4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x51e916
cmp ecx, 0x102
je 0x51e916
cmp ecx, 0x80
jb 0x51e8f3
lea eax, [esi + 0x80]
cmp ecx, eax
jae 0x51e8f3
mov ecx, 0x80
mov dword [ebp + 8], ecx
jmp 0x51e8f6
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
add eax, esi
mov dword [ebp - 4], eax
sub ebx, esi
je 0x51e916
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
jmp 0x51e890
pop edi
pop esi
mov eax, 0x102
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x51e920
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x14], edx
push edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], 1
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x24], 0
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [edi + 0x1c], 1
jbe 0x51ea2a
mov eax, dword [edi + 0x24]
xor ebx, ebx
shl eax, 2
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
mov esi, dword [edi + 0x50]
add esp, 4
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ebx
cmp dword [edi + 0x24], ebx
jbe 0x51e9d4
mov ecx, eax
mov dword [ebp - 8], ecx
jmp 0x51e980
test eax, eax
je 0x51e9ab
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x51e9ab
inc ebx
add dword [ebp - 8], 4
cmp dword [esi], 5
je 0x51e9d4
push dword [esi + 8]
mov dword [esi], 6
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp - 0xc]
mov esi, dword [esi + 0x24]
inc edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
cmp edx, dword [edi + 0x24]
jb 0x51e980
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 4]
test eax, eax
je 0x51ea1d
push dword [ebp - 0x14]
mov edx, eax
mov ecx, ebx
call fcn.0051e850
add esp, 4
xor esi, esi
test ebx, ebx
je 0x51ea11
mov edi, dword [ebp - 4]
lea ebx, [ebx]
push dword [edi + esi*4]
call dword [0x5c001c]
inc esi
cmp esi, ebx
jb 0x51ea00
mov edi, dword [ebp - 0x18]
push dword [ebp - 4]
call dword [sym.imp.MSVCR120.dll_free]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [edi + 0x50]
cmp dword [esi], 5
je 0x51eabb
mov dword [ebp - 0x10], 0
lea ecx, [ecx]
push 0
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi], 1
jne 0x51ea66
push dword [esi + 0x10]
mov dword [esi], 2
call ebx
jmp 0x51eab3
push dword [esi + 8]
call dword [0x5c001c]
push dword [esi + 0xc]
call dword [0x5c001c]
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 0x28]
mov eax, dword [esi + 0x10]
dec ecx
mov dword [eax + 0x28], ecx
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 0x24]
mov eax, dword [esi + 0x10]
dec ecx
mov dword [eax + 0x24], ecx
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
mov dword [ecx + 0x24], eax
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov dword [ecx + 0x20], eax
push dword [esi + 0x10]
call ebx
push esi
call dword [sym.imp.MSVCR120.dll_free]
add esp, 4
mov esi, dword [edi + 0x50]
cmp dword [esi], 5
jne 0x51ea40
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push dword [edi + 0x18]
call dword [0x5c001c]
push edi
call dword [sym.imp.MSVCR120.dll_free]
mov eax, dword [ebp - 0x10]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x51ed80
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
mov ecx, 0x64
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
mov dword [ebp - 4], eax
push 0x4ff
push ecx
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
test eax, eax
jne 0x51ee0c
mov esi, 0x64
mov edi, edi
cmp esi, 0xffffffff
je 0x51edcc
mov eax, esi
dec esi
test eax, eax
je 0x51edf0
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x20]
push eax
call edi
test eax, eax
je 0x51edf0
lea eax, [ebp - 0x20]
push eax
call ebx
lea eax, [ebp - 0x20]
push eax
call dword [0x5c032c]
jmp 0x51edc0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 4]
cmp eax, 0x64
jbe 0x51ee03
mov eax, 0x64
mov ecx, 0x64
sub ecx, eax
jne 0x51eda3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x51eeb0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
cmp dword [0x5c6dd4], 0
mov eax, edx
mov edx, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
jne 0x51ef42
push ebx
push esi
push edi
push 0x700
push 0
push 0x5c7060
call sub.MSVCR120.dll_memset
mov ebx, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
add esp, 0xc
xor edi, edi
mov esi, 0x5c7060
lea ecx, [ecx]
push 0x3f
push esi
lea eax, [edi + 0x2a]
push eax
push 0x400
call ebx
sub esi, 0xffffff80
lea edi, [edi + 1]
cmp esi, 0x5c73e0
jl 0x51eef0
xor edi, edi
mov esi, 0x5c73e0
push 0x3f
push esi
lea eax, [edi + 0x31]
push eax
push 0x400
call ebx
sub esi, 0xffffff80
lea edi, [edi + 1]
cmp esi, 0x5c7760
jl 0x51ef13
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
pop edi
pop esi
mov dword [0x5c6dd4], 1
pop ebx
cmp edx, 6
jbe 0x51ef50
mov eax, 0x574c4c
mov esp, ebp
pop ebp
ret
xor ecx, ecx
test eax, eax
setne cl
lea eax, [ecx*8]
sub eax, ecx
add eax, edx
shl eax, 7
add eax, 0x5c7060
mov esp, ebp
pop ebp
ret
Function at 0x522f40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x522f59
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x522f94
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x522f90
lea ebx, [ebx]
cmp esi, edx
jae 0x522f94
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec ecx
jne 0x522f80
cmp esi, edx
jb 0x522f9b
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret