joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406820
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x494b96
mov eax, dword fs:[0]
push eax
sub esp, 0x234
mov eax, dword [0x4d7204]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x228], ecx
push 0
lea ecx, [ebp - 0x240]
call fcn.00403f70
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x228]
cmp dword [eax + 0x2c], 0
je 0x40687d
mov dword [ebp - 0x220], reloc.OLEAUT32.dll_SysReAllocString
jmp 0x406887
mov dword [ebp - 0x220], SysStringLen
push 0x2001f
push 0x49bab8
mov ecx, dword [ebp - 0x220]
push ecx
lea ecx, [ebp - 0x240]
call fcn.0040c220
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
jne 0x40698f
lea ecx, [ebp - 0x21c]
call fcn.00403360
mov byte [ebp - 4], 1
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
push 0x49bb14
lea eax, [ebp - 0x21c]
push eax
call fcn.0040ad60
add esp, 0x10
push 0x208
push 0
lea ecx, [ebp - 0x218]
push ecx
call fcn.004696a0
add esp, 0xc
mov dword [ebp - 0x22c], 0x104
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x218]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x240]
call fcn.0040c3c0
mov dword [ebp - 0x224], eax
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x21c]
call fcn.0040a2c0
test eax, eax
je 0x40695c
push 1
lea ecx, [ebp - 0x21c]
call fcn.00405e20
push eax
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x240]
call fcn.0040d070
mov dword [ebp - 0x230], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x21c]
call fcn.004049f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x240]
call fcn.00405010
mov eax, dword [ebp - 0x230]
jmp 0x4069b1
mov dword [ebp - 0x234], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x240]
call fcn.00405010
mov eax, dword [ebp - 0x234]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044ab64
mov esp, ebp
pop ebp
ret 8
Function at 0x40a440
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], ecx
push 0
lea ecx, [ebp - 0x20]
call fcn.00403f70
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
je 0x40a465
mov dword [ebp - 4], reloc.OLEAUT32.dll_SysReAllocString
jmp 0x40a46c
mov dword [ebp - 4], SysStringLen
push 0x2001f
push 0x49bb40
mov ecx, dword [ebp - 4]
push ecx
lea ecx, [ebp - 0x20]
call fcn.0040c220
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40a4ab
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x20]
call fcn.0040aa70
mov dword [ebp - 0x10], 1
lea ecx, [ebp - 0x20]
call fcn.00405010
mov eax, dword [ebp - 0x10]
jmp 0x40a4bd
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x20]
call fcn.00405010
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret 4

Function at 0x40af80
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], 0
mov eax, 2
imul ecx, eax, 0
movzx edx, word [ecx + 0x4fe858]
test edx, edx
jne 0x40afba
mov dword [ebp - 8], 0x100
lea eax, [ebp - 8]
push eax
push 0x4fe858
push 2
call sub.Secur32.dll_GetUserNameExW
push 0x4fe858
mov ecx, dword [ebp + 8]
call fcn.004032e0
mov ecx, dword [ebp - 4]
or ecx, 1
mov dword [ebp - 4], ecx
mov eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret 4

Function at 0x40b2f0
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], 0
mov eax, 2
imul ecx, eax, 0
movzx edx, word [ecx + 0x4fe658]
test edx, edx
jne 0x40b329
mov dword [ebp - 8], 0x100
lea eax, [ebp - 8]
push eax
push 0x4fe658
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
push 0x4fe658
mov ecx, dword [ebp + 8]
call fcn.004032e0
mov ecx, dword [ebp - 4]
or ecx, 1
mov dword [ebp - 4], ecx
mov eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret 4
Function at 0x40b630
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x4d7204]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x218], ecx
push 0
lea ecx, [ebp - 0x230]
call fcn.00403f70
mov eax, dword [ebp - 0x218]
cmp dword [eax + 0x2c], 0
je 0x40b66e
mov dword [ebp - 0x214], reloc.OLEAUT32.dll_SysReAllocString
jmp 0x40b678
mov dword [ebp - 0x214], SysStringLen
push 0x2001f
push str.SoftwareMicrosoftWindowsCurrentVersionRun
mov ecx, dword [ebp - 0x214]
push ecx
lea ecx, [ebp - 0x230]
call fcn.0040c220
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
jne 0x40b720
push 0x208
push 0
lea edx, [ebp - 0x20c]
push edx
call fcn.004696a0
add esp, 0xc
mov dword [ebp - 0x21c], 0x104
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x20c]
push ecx
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x230]
call fcn.0040c3c0
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
jne 0x40b720
mov eax, 2
imul ecx, eax, 0
movzx edx, word [ebp + ecx - 0x20c]
test edx, edx
je 0x40b720
mov dword [ebp - 0x220], 1
lea ecx, [ebp - 0x230]
call fcn.00405010
mov eax, dword [ebp - 0x220]
jmp 0x40b73b
mov dword [ebp - 0x224], 0
lea ecx, [ebp - 0x230]
call fcn.00405010
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044ab64
mov esp, ebp
pop ebp
ret 4
Function at 0x40c3c0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
xor eax, eax
jne 0x40c3c9
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
shl edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40c40c
mov eax, dword [ebp - 8]
jmp 0x40c472
cmp dword [ebp - 0xc], 1
je 0x40c41f
cmp dword [ebp - 0xc], 2
je 0x40c41f
mov eax, 0xd
jmp 0x40c472
cmp dword [ebp + 0xc], 0
je 0x40c466
cmp dword [ebp - 4], 0
je 0x40c455
mov eax, dword [ebp - 4]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x40c44c
mov edx, dword [ebp - 4]
shr edx, 1
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax + edx*2 - 2]
test ecx, ecx
je 0x40c453
mov eax, 0xd
jmp 0x40c472
jmp 0x40c466
mov edx, 2
imul eax, edx, 0
xor ecx, ecx
mov edx, dword [ebp + 0xc]
mov word [edx + eax], cx
mov eax, dword [ebp - 4]
shr eax, 1
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40d070
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x1c], ecx
xor eax, eax
jne 0x40d079
cmp dword [ebp + 0xc], 0
je 0x40d08c
mov dword [ebp - 0xc], 1
jmp 0x40d093
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
jne 0x40d0a6
mov eax, 0xd
jmp 0x40d0fb
xor edx, edx
jne 0x40d07d
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
add ecx, 2
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 8]
mov ax, word [edx]
mov word [ebp - 2], ax
add dword [ebp - 8], 2
cmp word [ebp - 2], 0
jne 0x40d0b9
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x14]
sar ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
lea eax, [edx + edx + 2]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esp, ebp
pop ebp
ret 0xc

Function at 0x40d540
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40d564
xor eax, eax
jmp 0x40d5e4
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40d57b
xor eax, eax
jmp 0x40d5e4
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 0x10]
and eax, 0xf
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jbe 0x40d5c7
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
jae 0x40d5c7
mov edx, dword [ebp - 4]
movzx eax, word [edx]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2 + 2]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
sub eax, 1
mov dword [ebp - 8], eax
jmp 0x40d59e
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
jb 0x40d5d3
xor eax, eax
jmp 0x40d5e4
mov edx, dword [ebp - 4]
movzx eax, word [edx]
test eax, eax
jne 0x40d5e1
xor eax, eax
jmp 0x40d5e4
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x41ada0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x4d7204]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x118], 0x114
push 0x110
push 0
lea eax, [ebp - 0x114]
push eax
call fcn.004696a0
add esp, 0xc
lea ecx, [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x41ae04
cmp dword [ebp - 0x114], 6
jb 0x41ae04
mov dword [ebp - 0x11c], 1
jmp 0x41ae0e
mov dword [ebp - 0x11c], 0
mov al, byte [ebp - 0x11c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044ab64
mov esp, ebp
pop ebp
ret

Function at 0x41b7b0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 4]
call fcn.00418b80
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [ebp - 4]
mov edx, dword [eax + 0x40]
call edx
cmp dword [ebp - 0xc], 1
jne 0x41b94d
mov eax, dword [ebp - 4]
cmp dword [eax + 0x68], 0
je 0x41b94d
lea ecx, [ebp + 8]
push ecx
mov ecx, dword [ebp - 4]
add ecx, 4
call fcn.0041dbc0
mov ecx, dword [ebp - 4]
call fcn.00419940
mov dword [ebp - 0x10], eax
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov ecx, dword [eax + 0xf4]
call ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x41b845
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [eax + 0x84]
call edx
test eax, eax
je 0x41b94d
mov dword [ebp - 0xc], 2
push 1
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
cwde
and eax, 0x8000
je 0x41b865
mov dword [ebp - 0x14], 1
jmp 0x41b86c
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0
je 0x41b8a5
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x58], 0
jne 0x41b8a5
mov edx, dword [ebp - 4]
mov dword [edx + 0x58], 1
mov eax, dword [ebp - 4]
mov dword [eax + 0x5c], 0
push 1
push 0
push 0x3401
mov ecx, dword [ebp - 4]
add ecx, 4
call fcn.0041bcd0
jmp 0x41b8cb
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x58], 0
je 0x41b8cb
mov edx, dword [ebp - 4]
cmp dword [edx + 0x5c], 0
jne 0x41b8cb
mov eax, dword [ebp - 4]
mov dword [eax + 0x58], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x5c], 1
push 2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx edx, ax
and edx, 0x8000
je 0x41b8e7
mov dword [ebp - 0x18], 1
jmp 0x41b8ee
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0
je 0x41b927
mov eax, dword [ebp - 4]
cmp dword [eax + 0x60], 0
jne 0x41b927
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x60], 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x5c], 0
push 1
push 1
push 0x3401
mov ecx, dword [ebp - 4]
add ecx, 4
call fcn.0041bcd0
jmp 0x41b94d
mov eax, dword [ebp - 4]
cmp dword [eax + 0x60], 0
je 0x41b94d
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x5c], 0
jne 0x41b94d
mov edx, dword [ebp - 4]
mov dword [edx + 0x60], 0
mov eax, dword [ebp - 4]
mov dword [eax + 0x5c], 1
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 8
Function at 0x41c260
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x4d7204]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x20c], ecx
push 0
lea ecx, [ebp - 0x21c]
call fcn.00403f70
mov eax, dword [ebp - 0x20c]
mov ecx, dword [eax + 4]
or ecx, 0x2001f
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x20c]
mov ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x21c]
call fcn.0040c220
mov dword [ebp - 0x208], eax
cmp dword [ebp - 0x208], 0
je 0x41c2df
mov edx, dword [ebp - 0x208]
mov dword [ebp - 0x220], edx
lea ecx, [ebp - 0x21c]
call fcn.00405010
mov eax, dword [ebp - 0x220]
jmp 0x41c394
mov dword [ebp - 0x210], 0x100
lea eax, [ebp - 0x230]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 0x204]
push edx
push 0
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x41c363
lea ecx, [ebp - 0x204]
push ecx
lea ecx, [ebp - 0x21c]
call fcn.0041c260
mov dword [ebp - 0x208], eax
cmp dword [ebp - 0x208], 0
je 0x41c357
mov edx, dword [ebp - 0x208]
mov dword [ebp - 0x224], edx
lea ecx, [ebp - 0x21c]
call fcn.00405010
mov eax, dword [ebp - 0x224]
jmp 0x41c394
mov dword [ebp - 0x210], 0x100
jmp 0x41c2e9
lea ecx, [ebp - 0x21c]
call fcn.0040a240
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x20c]
call fcn.00418d80
mov dword [ebp - 0x228], eax
lea ecx, [ebp - 0x21c]
call fcn.00405010
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044ab64
mov esp, ebp
pop ebp
ret 4

Function at 0x41c4a0
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax], 0
je 0x41c4ff
push 0x49d7b4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x41c4cc
mov eax, 1
jmp 0x41c51d
push str.RegDeleteKeyTransactedW
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x41c4fd
push 0
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
push 0
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [ebp - 0xc]
jmp 0x41c51d
jmp 0x41c518
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0
je 0x41c518
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x41c51d
mov eax, 1
mov esp, ebp
pop ebp
ret 8
Function at 0x41dd20
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x28], ecx
xor eax, eax
jne 0x41dd29
cmp dword [ebp + 0xc], 0
je 0x41dd3c
mov dword [ebp - 0x18], 1
jmp 0x41dd43
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0
jne 0x41dd59
mov eax, 0xd
jmp 0x41dddc
xor edx, edx
jne 0x41dd2d
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 8]
mov cx, word [eax]
mov word [ebp - 2], cx
add dword [ebp - 8], 2
cmp word [ebp - 2], 0
jne 0x41dd79
mov edx, dword [ebp - 8]
sub edx, dword [ebp - 0x20]
sar edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
lea eax, [edx + ecx*2]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x10], 1
jne 0x41dd6a
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 7
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esp, ebp
pop ebp
ret 8
Function at 0x422490
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
cmp dword [eax], 0x270
jne 0x4224ae
mov ecx, dword [ebp - 8]
call fcn.00422c70
jmp 0x4224c1
mov ecx, dword [ebp - 8]
cmp dword [ecx], 0x4e0
jb 0x4224c1
mov ecx, dword [ebp - 8]
call fcn.00422af0
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + eax*4 + 4]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 8]
mov dword [edx], ecx
mov eax, dword [ebp - 4]
shr eax, 0xb
mov ecx, dword [ebp - 8]
and eax, dword [ecx + 0x1384]
xor eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
shl edx, 7
and edx, 0x9d2c5680
xor edx, dword [ebp - 4]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
shl eax, 0xf
and eax, 0xefc60000
xor eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
shr ecx, 0x12
xor ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x4228d0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp + 0x14]
and eax, 0x8000000f
jns 0x4228e8
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
je 0x4228f3
xor al, al
jmp 0x422aa8
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x42291f
xor al, al
jmp 0x422aa8
mov dword [ebp - 0x40], 0
xor edx, edx
mov dword [ebp - 0x3c], edx
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x422959
cmp dword [ebp - 0x40], 0
je 0x422959
cmp dword [ebp - 0x3c], 0
jl 0x42296a
jg 0x422959
cmp dword [ebp - 0x40], 0x1000000
jbe 0x42296a
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x422aa8
push 0x1000000
call fcn.0044ae1e
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0
push 0
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4229ae
cmp dword [ebp - 0x14], 0
jne 0x4229d3
mov edx, dword [ebp - 4]
mov dword [ebp - 0x20], edx
push 1
mov eax, dword [ebp - 0x20]
push eax
call fcn.0044a8bc
add esp, 8
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x422aa8
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x28]
call fcn.00422650
mov dword [ebp - 4], eax
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x422a3e
mov edx, dword [ebp - 4]
mov dword [ebp - 0x2c], edx
push 1
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0044a8bc
add esp, 8
xor al, al
jmp 0x422aa8
mov dword [ebp - 0x30], 0
push 0
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x422a88
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x34], eax
push 1
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.0044a8bc
add esp, 8
xor al, al
jmp 0x422aa8
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x38], eax
push 1
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0044a8bc
add esp, 8
mov al, 1
mov esp, ebp
pop ebp
ret 0x10
Function at 0x422af0
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0
jmp 0x422b0b
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xe3
jge 0x422b77
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*4 + 0x9c4]
and eax, 0x80000000
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov ecx, dword [edx + ecx*4 + 0x9c8]
and ecx, 0x7fffffff
or eax, ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
and edx, 1
je 0x422b4f
mov dword [ebp - 0x10], 0x9908b0df
jmp 0x422b56
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0xc]
shr eax, 1
xor eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
xor eax, dword [edx + ecx*4 + 0xff8]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4 + 4], eax
jmp 0x422b02
jmp 0x422b82
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x26f
jge 0x422bee
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*4 + 0x9c4]
and eax, 0x80000000
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov ecx, dword [edx + ecx*4 + 0x9c8]
and ecx, 0x7fffffff
or eax, ecx
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
and edx, 1
je 0x422bc6
mov dword [ebp - 0x18], 0x9908b0df
jmp 0x422bcd
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x14]
shr eax, 1
xor eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
xor eax, dword [edx + ecx*4 - 0x388]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4 + 4], eax
jmp 0x422b79
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + eax*4 + 0x9c4]
and edx, 0x80000000
mov eax, 4
imul ecx, eax, 0
mov eax, dword [ebp - 8]
mov ecx, dword [eax + ecx + 4]
and ecx, 0x7fffffff
or edx, ecx
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x1c]
and edx, 1
je 0x422c2c
mov dword [ebp - 0x20], 0x9908b0df
jmp 0x422c33
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x1c]
shr eax, 1
xor eax, dword [ebp - 0x20]
mov ecx, 4
imul edx, ecx, 0x18c
mov ecx, dword [ebp - 8]
xor eax, dword [ecx + edx + 4]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [ecx + edx*4 + 4], eax
mov edx, dword [ebp - 8]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret