joyce8/EMBER2024-capa huggingface dataset:
Function at 0x101534a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [0x1017157c], 0
mov dword [0x10171580], 0
mov dword [0x1017158c], 0
mov edi, dword [0x10171578]
mov ebx, edi
add ebx, 0xffffe149
mov dword [0x10171574], ebx
add edi, 0xffffd49d
mov dword [0x10171578], edi
cmp eax, 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], esi
jne 0x10153518
mov dword [0x10171574], 0x584
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
mov ecx, eax
mov edx, eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], eax
jmp 0x10153529
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov esi, 0x100
add edx, 1
mov edi, eax
add edi, 1
mov dword [ebp - 0x2c], eax
mov eax, edx
cdq
idiv esi
mov dword [0x1017157c], edx
mov dword [0x10171574], 0x13cb
mov ebx, dword [ebp - 0x1c]
movzx ebx, byte [ebx + edx]
add ebx, ecx
mov eax, ebx
mov dword [ebp - 0x30], edx
cdq
idiv esi
mov dword [0x10171580], edx
mov dword [0x10171578], 0x7fe
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x30]
mov cl, byte [ecx + esi]
mov byte [0x10171584], cl
mov dword [0x10171574], 0xfae
mov ebx, dword [ebp - 0x1c]
mov cl, byte [ebx + edx]
mov byte [ebx + esi], cl
mov edx, dword [0x10171578]
add edx, 0xffffe149
mov dword [0x10171574], edx
mov cl, byte [0x10171584]
mov edx, dword [0x10171580]
mov byte [ebx + edx], cl
mov edx, dword [0x10171574]
add edx, 0xffffddc4
mov dword [0x10171574], edx
mov edx, dword [0x1017157c]
movzx edx, byte [ebx + edx]
mov ecx, dword [0x10171580]
movzx ecx, byte [ebx + ecx]
add ecx, edx
mov edx, dword [0x10171578]
mov esi, edx
add esi, 0xffffe149
and ecx, 0xff
mov dword [0x1017158c], ecx
mov dword [0x10171574], esi
mov cl, byte [ebx + ecx]
mov esi, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x2c]
xor cl, byte [esi + ebx]
add edx, 0xffffa56d
mov dword [0x10171574], edx
mov edx, dword [ebp - 0x18]
mov byte [edx + ebx], cl
mov dword [0x10171578], 0x87a
mov ecx, dword [ebp - 0x10]
cmp edi, ecx
mov dword [ebp - 0x34], edi
je 0x10153657
mov eax, dword [0x10171580]
mov ecx, dword [0x1017157c]
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], edx
jmp 0x10153529
jmp 0x10153506
Function at 0x10153660
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x98
lea eax, [esp + 0x28]
lea ecx, [esp + 0x38]
mov dword [0x10171574], 0x16de
mov dword [0x10171578], 0x1d5d
mov dword [esp], eax
mov dword [esp + 0x24], ecx
call fcn.10152ce0
lea ecx, [0x10151900]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x74], edx
mov dword [esp + 0x90], 0x147e00
mov edx, dword [0x10171560]
mov dword [esp + 0x4c], edx
mov edx, dword [0x10171564]
mov dword [esp + 0x40], edx
mov edx, dword [0x10171568]
mov dword [esp + 0x44], edx
mov edx, dword [0x1017156c]
mov dword [esp + 0x70], edx
mov dword [0x10171574], 0x2af1
mov edx, dword [0x10171570]
mov dword [esp + 0x58], edx
mov dword [0x10171578], 0xb9a
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ecx
jmp 0x10153727
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x3c]
cmp dword [eax + ecx], 0x4550
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
je 0x10153738
mov eax, dword [esp + 0x18]
add eax, 0xfffff000
and eax, 0xfffff000
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
cmp word [eax], 0x5a4d
mov dword [esp + 0x18], eax
je 0x101536fd
jmp 0x10153715
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x94], eax
mov dword [0x10171574], 0xffffece3
mov eax, dword [eax + ecx + 0x50]
mov dword [esp + 0x88], eax
call fcn.10151780
xor ecx, ecx
cmp eax, 0
mov dword [esp + 0xc], ecx
jne 0x101537aa
lea eax, [esp + 0x38]
mov ecx, dword [0x10171574]
add ecx, 0xfffff7cd
mov dword [0x10171574], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.101523d0
mov ecx, esp
lea edx, [esp + 0x38]
mov dword [ecx], edx
call eax
sub esp, 4
mov eax, 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x10005071
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push esi
push 0x50
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x10005161
xor ecx, ecx
mov dword [esi + 8], 0x100151b0
mov dword [esi + 0xc], ecx
xor eax, eax
mov dword [esi + 0x10], ecx
inc eax
mov dword [esi + 0x14], ecx
mov dword [esi + 0x18], ecx
mov dword [esi + 4], eax
mov dword [esi], 0x400
mov dword [esi + 0x1c], eax
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], ecx
mov dword [esi + 0x38], ecx
mov dword [esi + 0x24], 7
mov dword [esi + 0x28], 0x100151b8
mov dword [esi + 0x20], 0x2000
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], ecx
mov ecx, 0x10003324
call 0x10020c67
test eax, eax
jne 0x1000514d
mov ecx, 0x1000333c
call 0x10020c67
test eax, eax
jne 0x1000514d
mov ecx, 0x10003354
call 0x10020c67
test eax, eax
jne 0x1000514d
mov ecx, 0x1000336c
call 0x10020c67
test eax, eax
jne 0x1000514d
mov ecx, 0x1000337c
call 0x10020c67
test eax, eax
jne 0x1000514d
mov ecx, 0x10003394
call 0x10020c67
test eax, eax
je 0x10005136
or dword [esi + 0x44], 0x1000000
jmp 0x10005154
mov ecx, 0x100033b0
call 0x10020c67
test eax, eax
je 0x10005154
or dword [esi + 0x44], 0x10000
jmp 0x10005154
or dword [esi + 0x44], 0x100000
push esi
push dword [0x100151dc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
neg esi
sbb esi, esi
and esi, 0x7ff8fff2
lea eax, [esi - 0x7ff8fff2]
pop esi
ret

Function at 0x10005310
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x100151d4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0x10]
push edi
push dword [0x100151dc]
mov dword [ebp - 0x18], esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x10005352
mov eax, dword [ebp + 0xc]
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
jmp 0x100053e2
push ebx
push dword [0x100151dc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [eax + 0x40]
mov eax, dword [ebp + 0xc]
sub eax, edi
je 0x1000538b
sub eax, 1
je 0x1000537f
sub eax, 1
jne 0x100053df
push dword [ebp + 8]
mov ecx, ebx
call fcn.100063c3
jmp 0x10005387
push dword [ebp + 8]
call fcn.10006348
mov edi, eax
jmp 0x100053df
push 1
push 0x10
push esi
mov esi, dword [0x100156d0]
mov ecx, esi
call dword [0x10016308]
call esi
mov esi, eax
lea edi, [ebp - 0x14]
lea eax, [ebp - 0x1c]
mov ecx, ebx
push eax
lea eax, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
push eax
push dword [ebp + 8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.100061d5
push eax
call sym.OLETHK32.dll_TransformHRESULT_3216
mov esi, dword [0x100156d0]
mov edi, eax
push 1
push 0x10
push dword [ebp - 0x18]
mov ecx, esi
call dword [0x10016308]
call esi
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
mov eax, edi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.100132f0
leave
ret 0xc
Function at 0x10013500
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x1001353e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x10013536
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x10013540
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x10013526
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x10013610
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x10013641
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x10013641
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x10013641
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x404578
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.00406c04
test esi, esi
jne 0x4045b0
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.00406d40
jmp 0x4045ce
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004044bc
mov edi, eax
test esi, esi
je 0x4045ce
cmp dword [ebx], 0
je 0x4045ce
dec esi
jmp 0x4045b7
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x40616c
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4c0050], 0
je 0x4061cd
cmp word [0x4c032c], 0xd7b2
jne 0x406195
cmp dword [0x4c0334], 0
jbe 0x406195
mov eax, 0x4c0328
call dword [0x4c0344]
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
push 0x4061f8
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4bd030], 0
jne 0x4061e9
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x406358
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x4bd038], 0
je 0x40637e
mov edx, esi
mov eax, ebx
call dword [0x4bd038]
jmp 0x40638d
mov eax, 8
call fcn.00404204
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x4c0051], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x406320
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc
Function at 0x4089d4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe94
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x16c], ecx
mov dword [ebp - 8], edx
mov esi, eax
xor eax, eax
push ebp
push 0x408b3b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
xor edx, edx
call fcn.00406c04
cmp si, word [0x4bd7e0]
jb 0x408a6e
cmp si, word [0x4bd9e0]
ja 0x408a6e
mov edi, 0x40
xor eax, eax
mov dword [ebp - 0xc], eax
cmp edi, dword [ebp - 0xc]
jb 0x408a6e
mov ebx, dword [ebp - 0xc]
add ebx, edi
shr ebx, 1
cmp si, word [ebx*8 + 0x4bd7e0]
jae 0x408a48
mov edi, ebx
dec edi
jmp 0x408a69
cmp si, word [ebx*8 + 0x4bd7e0]
jbe 0x408a58
inc ebx
mov dword [ebp - 0xc], ebx
jmp 0x408a69
mov edx, dword [ebp - 8]
mov eax, dword [ebx*8 + 0x4bd7e4]
call fcn.004088e4
jmp 0x408a6e
cmp edi, dword [ebp - 0xc]
jae 0x408a32
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x408b1d
push 2
movzx eax, si
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408b1d
push 0x55
lea eax, [ebp - 0xb6]
push eax
push 0x59
movzx ebx, si
push ebx
call sub.kernel32.dll_GetLocaleInfoW
push 0x55
lea eax, [ebp - 0x160]
push eax
push 0x5a
push ebx
call sub.kernel32.dll_GetLocaleInfoW
lea eax, [ebp - 0x164]
lea edx, [ebp - 0xb6]
mov ecx, 0x55
call fcn.00406dec
push dword [ebp - 0x164]
push 0x408b58
lea eax, [ebp - 0x168]
lea edx, [ebp - 0x160]
mov ecx, 0x55
call fcn.00406dec
push dword [ebp - 0x168]
push 0x408b68
lea eax, [ebp - 0x16c]
lea edx, [ebp - 0xb6]
mov ecx, 0x55
call fcn.00406dec
push dword [ebp - 0x16c]
mov eax, dword [ebp - 8]
mov edx, 5
call fcn.004071a4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408b42
lea eax, [ebp - 0x16c]
mov edx, 3
call fcn.00406bfc
ret
Function at 0x408cf4
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 0x408df9
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4c2b58
call sub.kernel32.dll_EnterCriticalSection
cmp bx, word [0x4c2b70]
jne 0x408d40
mov eax, esi
mov edx, 0x4c2b74
mov ecx, 0x55
call fcn.00406dec
push 0x4c2b58
call sub.kernel32.dll_LeaveCriticalSection
jmp 0x408de3
push 0x4c2b58
call sub.kernel32.dll_LeaveCriticalSection
mov eax, esi
xor edx, edx
call fcn.00406c04
push 2
movzx eax, bx
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408db1
cmp byte [0x4c2b54], 0
je 0x408d76
mov edx, esi
mov eax, ebx
call fcn.00408bd4
jmp 0x408db1
mov edx, esi
mov eax, ebx
call fcn.004089d4
call sub.kernel32.dll_GetSystemDefaultUILanguage
cmp bx, ax
je 0x408db1
cmp dword [esi], 0
je 0x408d9a
mov eax, esi
mov edx, 0x408e14
call fcn.00407000
call sub.kernel32.dll_GetSystemDefaultUILanguage
lea edx, [ebp - 4]
call fcn.004089d4
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.00407000
push 0x4c2b58
call sub.kernel32.dll_EnterCriticalSection
mov word [0x4c2b70], bx
push 0xaa
mov eax, dword [esi]
call fcn.00406c90
push eax
push 0x4c2b74
call sub.kernel32.dll_lstrcpynW
push 0x4c2b58
call sub.kernel32.dll_LeaveCriticalSection
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408e00
lea eax, [ebp - 4]
call fcn.00406bf4
ret
Function at 0x409038
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffde4
push ebx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00406bec
xor eax, eax
push ebp
push 0x40921d
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 4], 0
jne 0x409078
push 0x105
lea eax, [ebp - 0x21a]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
jmp 0x409092
push 0x105
mov eax, dword [ebp - 4]
call fcn.00406c90
push eax
lea eax, [ebp - 0x21a]
push eax
call sub.kernel32.dll_lstrcpynW
cmp word [ebp - 0x21a], 0
je 0x409207
xor eax, eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0xf0019
push 0
push 0x40922c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x409121
lea eax, [ebp - 0xc]
push eax
push 0xf0019
push 0
push 0x40922c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x409121
lea eax, [ebp - 0xc]
push eax
push 0xf0019
push 0
push 0x409260
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x409121
lea eax, [ebp - 0xc]
push eax
push 0xf0019
push 0
push 0x409294
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x409207
xor eax, eax
push ebp
push 0x409200
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x21a]
mov edx, 0x105
call fcn.00408e3c
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x21a]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x409190
mov eax, dword [ebp - 0x10]
call fcn.00404204
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
lea eax, [ebp - 0x21a]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
mov eax, ebx
mov edx, dword [ebp - 8]
call fcn.00406db0
jmp 0x4091db
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
push 0x4092d4
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x4091db
mov eax, dword [ebp - 0x10]
call fcn.00404204
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push 0x4092d4
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
mov eax, ebx
mov edx, dword [ebp - 8]
call fcn.00406db0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409207
cmp dword [ebp - 8], 0
je 0x4091f6
mov eax, dword [ebp - 8]
call fcn.00404220
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409224
lea eax, [ebp - 4]
call fcn.00406bf4
ret
Function at 0x4094e8
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x220], ebx
mov esi, ecx
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x218]
call fcn.00406bec
mov eax, dword [ebp - 0x21c]
call fcn.00406bec
lea edi, [ebp - 0x210]
xor eax, eax
push ebp
push 0x409687
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
xor edx, edx
call fcn.00406c04
xor ebx, ebx
push 0x105
mov eax, dword [ebp - 0x21c]
call fcn.00406c90
push eax
lea eax, [ebp - 0x20a]
push eax
call sub.kernel32.dll_lstrcpynW
lea eax, [ebp - 0x20a]
push eax
call sub.kernel32.dll_lstrlenW
add eax, eax
lea edx, [ebp - 0x20a]
add eax, edx
sub eax, 2
mov dword [edi], eax
jmp 0x409588
sub dword [edi], 2
mov eax, dword [edi]
cmp word [eax], 0x2e
je 0x40959a
lea eax, [ebp - 0x20a]
cmp eax, dword [edi]
jne 0x409585
lea eax, [ebp - 0x20a]
cmp eax, dword [edi]
je 0x409653
add dword [edi], 2
mov eax, dword [edi]
mov word [eax], 0
lea eax, [ebp - 0x20a]
mov edx, dword [edi]
sub edx, eax
sar edx, 1
jns 0x4095c3
adc edx, 0
mov eax, 0x105
sub eax, edx
mov dword [ebp - 0x214], eax
lea edx, [ebp - 0x220]
mov eax, dword [ebp - 0x218]
call fcn.00409038
cmp dword [ebp - 0x220], 0
je 0x4095fb
push ebp
mov eax, dword [ebp - 0x220]
call fcn.004093dc
pop ecx
mov ebx, eax
jmp 0x409653
push ebp
call sub.kernel32.dll_GetUserDefaultUILanguage
lea edx, [ebp - 0x224]
call fcn.00408cf4
mov eax, dword [ebp - 0x224]
call fcn.004093dc
pop ecx
mov ebx, eax
test bl, bl
jne 0x409646
cmp byte [0x4c2b54], 0
jne 0x409646
push ebp
call sub.kernel32.dll_GetSystemDefaultUILanguage
lea edx, [ebp - 0x228]
call fcn.00408cf4
mov eax, dword [ebp - 0x228]
call fcn.004093dc
pop ecx
mov ebx, eax
test bl, bl
jne 0x409653
push ebp
call fcn.0040948c
pop ecx
mov ebx, eax
test bl, bl
je 0x409669
mov eax, esi
lea edx, [ebp - 0x20a]
mov ecx, 0x105
call fcn.00406dec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40968e
lea eax, [ebp - 0x228]
mov edx, 5
call fcn.00406bfc
ret

Function at 0x409e18
Capabilities:
Get system information on windows

Disassembly:
add esp, 0xffffffdc
push esp
call sub.kernel32.dll_GetSystemInfo
mov eax, dword [esp + 0x14]
add esp, 0x24
ret
Function at 0x40d180
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
mov esi, 0x4c2c58
push 0xa
push 0x40d214
mov eax, dword [0x4c2c3c]
push eax
call sub.kernel32.dll_FindResourceW
mov ebx, eax
test ebx, ebx
jne 0x40d1a4
call fcn.0041972c
push ebx
mov eax, dword [0x4c2c3c]
push eax
call sub.kernel32.dll_LoadResource
mov ebx, eax
test ebx, ebx
jne 0x40d1bb
call fcn.0041972c
push ebx
call sub.kernel32.dll_LockResource
mov dword [esi], eax
cmp dword [esi], 0
jne 0x40d1cd
call fcn.0041972c
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, edx
add ecx, dword [eax]
mov dword [0x4c2c5c], ecx
mov ecx, edx
add ecx, dword [eax + 4]
mov dword [0x4c2c60], ecx
mov ecx, edx
add ecx, dword [eax + 8]
mov dword [0x4c2c64], ecx
mov ecx, edx
add ecx, dword [eax + 0xc]
mov dword [0x4c2c68], ecx
mov ecx, edx
add ecx, dword [eax + 0x10]
mov dword [0x4c2c6c], ecx
add edx, dword [eax + 0x14]
mov dword [0x4c2c70], edx
pop esi
pop ebx
ret

Function at 0x411fac
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x412055
test eax, edx
je 0x412058
push 0
push 0
cmp word [eax - 0xa], 2
je 0x411fd5
push edx
mov edx, eax
mov eax, esp
call fcn.00406e08
pop edx
mov eax, dword [esp]
cmp word [edx - 0xa], 2
je 0x411feb
push eax
lea eax, [esp + 8]
call fcn.00406e08
pop eax
mov edx, dword [esp + 4]
movzx ecx, word [edx]
cmp cx, word [eax]
je 0x411ffa
movzx eax, word [eax]
sub eax, ecx
jmp 0x412021
push ebx
mov ebx, dword [eax - 4]
xor ecx, ecx
sub ebx, dword [edx - 4]
push ebx
adc ecx, 0xffffffff
and ecx, ebx
sub ecx, dword [eax - 4]
shl ecx, 1
sub eax, ecx
sub edx, ecx
mov ebx, dword [ecx + eax]
xor ebx, dword [ecx + edx]
jne 0x41203b
add ecx, 4
js 0x412012
pop eax
pop ebx
mov ecx, esp
mov edx, dword [ecx]
or edx, dword [ecx + 4]
je 0x412038
push eax
mov eax, ecx
mov edx, 2
call fcn.004063f8
pop eax
pop edx
pop edx
ret
bsf ebx, ebx
shr ebx, 4
add ebx, ebx
add ecx, ebx
jns 0x41201f
movzx eax, word [ecx + eax]
movzx edx, word [ecx + edx]
sub eax, edx
pop ebx
pop ebx
jmp 0x412021
xor eax, eax
ret
test eax, eax
je 0x412068
test edx, edx
jne 0x411fbc
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret

Function at 0x413280
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, esi
call fcn.00406c90
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x41329e
test al, 0x10
sete al
pop esi
pop ebx
ret
call sub.kernel32.dll_GetLastError
mov ebx, eax
cmp ebx, 2
je 0x4132bf
cmp ebx, 3
je 0x4132bf
cmp ebx, 0x7b
je 0x4132bf
mov eax, esi
call fcn.00413240
test al, al
jne 0x4132c3
xor eax, eax
jmp 0x4132c5
mov al, 1
pop esi
pop ebx
ret

Function at 0x4132c8
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00406c90
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x4132e1
test al, 0x10
jne 0x4132e5
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret
Function at 0x416920
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x200]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoW
test eax, eax
jle 0x416959
mov ecx, eax
dec ecx
lea edx, [ebp - 0x200]
mov eax, ebx
call fcn.00406d40
jmp 0x416962
mov eax, ebx
mov edx, esi
call fcn.00406c04
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x41696c
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov edi, ecx
mov esi, edx
mov ebx, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push ebx
call sub.kernel32.dll_GetLocaleInfoW
test eax, eax
jle 0x41698e
movzx eax, word [esp]
jmp 0x416990
mov eax, edi
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x417120
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff778
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 4], ecx
xor ecx, ecx
push ebp
push 0x417245
push dword fs:[ecx]
mov dword fs:[ecx], esp
push 0x400
lea ecx, [ebp - 0x888]
call fcn.00416f30
mov esi, eax
mov eax, dword [0x4bf444]
cmp byte [eax], 0
je 0x4171ed
mov eax, dword [0x4bf1c4]
call fcn.00404a08
call fcn.0040436c
push 0
push 0
push 0
push 0
push esi
lea eax, [ebp - 0x888]
push eax
push 0
push 1
call sub.kernel32.dll_WideCharToMultiByte
mov ebx, eax
push ebx
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4170f8]
call fcn.004083d0
add esp, 4
push 0
push 0
push ebx
mov eax, dword [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x888]
push eax
push 0
push 1
call sub.kernel32.dll_WideCharToMultiByte
push 0
lea eax, [ebp - 8]
push eax
push ebx
mov eax, dword [ebp - 4]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [ebp - 8]
push eax
push 2
push 0x417260
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
jmp 0x417229
push 0x40
lea eax, [ebp - 0x88]
push eax
mov eax, dword [0x4bf15c]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x4c2c3c]
call fcn.004084c4
push eax
call sub.user32.dll_LoadStringW
push 0x2010
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x888]
push eax
push 0
call sub.user32.dll_MessageBoxW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41724c
lea eax, [ebp - 4]
mov edx, dword [0x4170f8]
call fcn.004083dc
ret