joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4048a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x42ed48
mov edi, eax
push 0x89
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x404908
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov eax, dword [esp + 0x10]
push esi
mov dword [eax], esi
call fcn.0040a4f1
push esi
mov edi, eax
push 0
push edi
call fcn.00416d10
push esi
push ebx
push edi
call fcn.0041b7d0
add esp, 0x1c
mov eax, edi
pop edi
pop esi
pop ebx
ret
pop edi
mov eax, esi
pop esi
pop ebx
ret

Function at 0x404910
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
push edi
push ebx
mov edi, eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404941
mov eax, ebx
call fcn.00404a20
cmp eax, edi
jne 0x404941
lea eax, [esi + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 0x200000
call fcn.0041583c
mov ebp, eax
mov eax, dword [esp + 0x28]
add esp, 4
push ebp
push eax
lea edx, [esp + 0x1c]
mov ecx, edi
mov dword [esp + 0x1c], 0x200000
call fcn.00404a80
add esp, 8
test eax, eax
je 0x404a0c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00414a26
add esp, 4
call fcn.00414a38
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fmul qword [0x42ef60]
fmul qword [0x42ef88]
fadd qword [0x42ef80]
call fcn.00418a30
mov esi, dword [esp + 0x14]
lea ebx, [esi + ebp]
mov edi, eax
call fcn.00402920
add edi, esi
mov esi, dword [esp + 0x20]
xor ebx, ebx
call fcn.00404c00
mov esi, eax
cmp esi, 0xffffffff
je 0x404a0a
push ebx
lea ecx, [esp + 0x1c]
push ecx
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [esp + 0x18]
cmp eax, edi
jne 0x4049e9
mov ebx, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 1
jne 0x404a0a
push ebp
mov esi, ebx
call fcn.00415d97
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
xor esi, esi
push ebp
call fcn.00415d97
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x404a20
Capabilities:
Get file size

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
push 0
push 0
push 3
push 0
push 3
push closesocket
or edi, 0xffffffff
push eax
or ebx, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, edi
jne 0x404a52
or eax, edi
or edx, edi
pop edi
pop esi
pop ebx
add esp, 0x10
ret
lea ecx, [esp + 0x10]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, 1
jne 0x404a6b
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
mov edx, ebx
pop ebx
add esp, 0x10
ret
Function at 0x404c00
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
je 0x404c53
push esi
call edi
cmp eax, 0xffffffff
je 0x404c4e
test al, 1
je 0x404c1e
xor eax, 1
test al, 4
je 0x404c25
xor eax, 4
test al, 2
je 0x404c2c
xor eax, 2
test al, 0x20
je 0x404c33
xor eax, 0x20
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x404c53
or eax, 0xffffffff
pop edi
ret
push 0
push 0
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
pop edi
ret

Function at 0x404cd0
Capabilities:
Check if file exists
Create process on windows
Get file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x210
mov eax, dword [0x433c20]
xor eax, esp
mov dword [esp + 0x20c], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x64
push 0x4381a8
push 0x67
push esi
call edi
push 0x64
push 0x4380e0
push 0x6d
push esi
call edi
mov eax, esi
call fcn.00404eb0
mov eax, dword [ebp + 0x10]
mov edx, 0x438278
sub edx, eax
mov edi, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x404d20
call fcn.00401000
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x7d0
mov dword [0x434fbc], eax
call edi
call fcn.00401100
test eax, eax
je 0x404d5c
call fcn.00402970
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0
push esi
push 0
push 0
push 0
push closesocket
push 0
push closesocket
push 0xcf0000
push 0x4381a8
push 0x4380e0
push 0
mov dword [0x438270], esi
call dword [sym.imp.USER32.dll_CreateWindowExW]
test eax, eax
je 0x404d9b
call fcn.00402b10
test eax, eax
jne 0x404db3
mov ecx, dword [esp + 0x214]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0041492b
mov esp, ebp
pop ebp
ret 0x10
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x12]
push ecx
mov word [esp + 0x14], ax
call fcn.00416d10
mov eax, dword [0x438780]
add esp, 0xc
test eax, eax
jbe 0x404dfc
cmp word [0x438784], 0
jbe 0x404dfc
push eax
mov esi, 0x434fa0
call fcn.004036b0
mov dx, word [0x438784]
add esp, 4
mov word [0x434fb0], dx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov eax, edx
xor edx, edx
shr eax, 6
mov ecx, 0x3e8
div ecx
push edx
push 0x42e988
mov edx, 0x438b38
call fcn.004050a0
call fcn.00403790
lea esi, [esp + 0x10]
call fcn.00403730
push 0x42e9a0
mov edx, esi
push 0x104
push edx
call fcn.0041493a
add esp, 0x14
push 0x438b38
mov eax, esi
push 0x104
push eax
call fcn.0041493a
add esp, 0xc
mov ecx, esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404e8c
push 0x1f4
call edi
push 1
push 0
push 0x42e9a4
mov edx, esi
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x1388
call edi
call fcn.00404610
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x406200
Capabilities:
Hash data using sha1
Read file on windows

Disassembly:
mov eax, 0x1068
call fcn.004191c0
mov eax, dword [0x433c20]
xor eax, esp
mov dword [esp + 0x1064], eax
mov eax, dword [esp + 0x106c]
push ebx
push ebp
push 0x42e980
push eax
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
mov dword [esp + 0x14], ebx
xor ebp, ebp
call fcn.00414e8b
mov eax, dword [esp + 0x14]
add esp, 0xc
cmp eax, ebx
jne 0x40626b
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
pop ebp
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
pop ebx
mov ecx, dword [esp + 0x1064]
xor ecx, esp
call fcn.0041492b
add esp, 0x1068
ret
push esi
push 2
push ebx
push eax
call fcn.0041555d
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0041577f
mov edx, dword [esp + 0x1c]
push ebx
push ebx
push edx
mov dword [esp + 0x2c], eax
call fcn.0041555d
mov eax, dword [esp + 0x28]
push eax
push 0x1000
lea ecx, [esp + 0x94]
push 1
push ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], 0x67452301
mov dword [esp + 0x4c], 0xefcdab89
mov dword [esp + 0x50], 0x98badcfe
mov dword [esp + 0x54], 0x10325476
mov dword [esp + 0x58], 0xc3d2e1f0
call fcn.0041517e
mov esi, eax
add esp, 0x2c
cmp esi, ebx
jbe 0x406316
lea edx, [esp + 0x70]
push esi
push edx
lea ebx, [esp + 0x1c]
call fcn.00406070
mov eax, dword [esp + 0x14]
push eax
push 0x1000
lea ecx, [esp + 0x80]
push 1
push ecx
add ebp, esi
call fcn.0041517e
mov esi, eax
add esp, 0x18
test esi, esi
ja 0x4062e1
xor ebx, ebx
push edi
lea esi, [esp + 0x18]
call fcn.00406110
mov edx, dword [esp + 0x10]
push edx
call fcn.00415212
add esp, 8
pop esi
cmp ebp, dword [esp + 0xc]
jb 0x406244
mov ecx, dword [esp + 0x106c]
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0041492b
add esp, 0x1068
ret
Function at 0x4080d0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x4080d7
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x4081b4
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x42dde0]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x42dde0]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x42dde0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x42dde0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x42dde0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x42dde0]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x42dde0]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x42dde0]
inc ecx
sub edx, 8
sub esi, 1
jne 0x4080f0
pop edi
test edx, edx
je 0x4081db
jmp 0x4081c0
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x42dde0]
inc ecx
sub edx, 1
jne 0x4081c0
not eax
pop esi
ret

Function at 0x4081e0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x42dde0]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x42dde0]
mov dword [edx + 8], ecx
ret

Function at 0x408230
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
push edi
xor al, bl
movsx edi, al
xor edi, edx
shr edx, 8
and edi, 0xff
mov ebx, dword [edi*4 + 0x42dde0]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x42dde0]
pop edi
mov dword [esi + 8], ecx
pop ebx
ret

Function at 0x408940
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ebx
imul esi, dword [esp + 8]
cmp byte [edi], 0
je 0x408972
mov ecx, dword [edi + 2]
push 0
lea eax, [esp + 0xc]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408968
mov byte [edi + 6], 1
mov eax, dword [esp + 8]
xor edx, edx
div ebx
pop esi
ret
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x10]
push ebp
lea ebp, [ecx + esi]
cmp ebp, eax
pop ebp
jbe 0x408985
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0xc]
push esi
add eax, ecx
push eax
push edx
call fcn.0041b7d0
add dword [edi + 0x14], esi
mov eax, esi
add esp, 0xc
xor edx, edx
div ebx
pop esi
ret
Function at 0x4089a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
cmp byte [esi], 0
push edi
mov edi, 1
je 0x4089d3
mov edx, dword [esi + 2]
push 0
lea eax, [esp + 0xc]
push eax
push edi
lea ecx, [esp + 0x13]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4089cd
mov byte [esi + 6], 1
mov edi, dword [esp + 8]
jmp 0x4089ff
mov eax, dword [esi + 0x10]
push ebx
mov ebx, dword [esi + 0x14]
lea ecx, [ebx + 1]
cmp ecx, eax
jbe 0x4089e5
sub eax, ebx
mov edi, eax
mov edx, dword [esi + 0xc]
push edi
add edx, ebx
push edx
lea eax, [esp + 0x13]
push eax
call fcn.0041b7d0
add esp, 0xc
add ebx, edi
mov dword [esi + 0x14], ebx
pop ebx
cmp edi, 1
pop edi
jne 0x408a16
movzx ecx, byte [esp + 3]
mov edx, dword [esp + 0xc]
mov dword [edx], ecx
xor eax, eax
add esp, 8
ret
cmp byte [esi], 0
je 0x408a10
cmp byte [esi + 6], 0
je 0x408a10
or eax, 0xffffffff
add esp, 8
ret
Function at 0x408ab0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
cmp byte [esi], 0
je 0x408af5
cmp byte [esi + 1], 0
je 0x408afd
mov eax, dword [esi + 2]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebp
je 0x408b12
cmp byte [esi + 1], 0
je 0x408b04
mov edx, dword [esi + 2]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
sub ebp, dword [esi + 7]
mov dword [esp + 4], ebp
jmp 0x408b1b
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x14], ecx
jmp 0x408ace
or eax, 0xffffffff
add esp, 0x18
ret
mov dword [esp + 4], 0
mov ebp, dword [esp + 4]
jmp 0x408b1b
mov eax, dword [esi + 0x14]
mov dword [esp + 4], eax
mov ebp, eax
push edi
mov edi, 0xffff
mov dword [esp + 0xc], edi
cmp ebp, edi
jae 0x408b2f
mov dword [esp + 0xc], ebp
mov edi, ebp
push ebx
push 0x404
call fcn.0041583c
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x408b4d
pop ebx
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret
mov eax, 4
mov dword [esp + 0x18], 0xffffffff
cmp edi, eax
jbe 0x408c61
jmp 0x408b70
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0xc]
add eax, 0x400
mov dword [esp + 0x14], edi
cmp eax, edi
ja 0x408b81
mov dword [esp + 0x14], eax
mov eax, ebp
sub eax, dword [esp + 0x14]
sub ebp, eax
mov dword [esp + 0x20], eax
cmp ebp, 0x404
jbe 0x408b9a
mov ebp, 0x404
cmp byte [esi], 0
je 0x408bbf
cmp byte [esi + 1], 0
je 0x408c61
mov ecx, dword [esi + 7]
mov edx, dword [esi + 2]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x408bc2
mov dword [esi + 0x14], eax
cmp byte [esi], 0
mov edi, ebp
je 0x408bea
mov ecx, dword [esi + 2]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408be4
mov byte [esi + 6], 1
mov eax, dword [esp + 0x1c]
jmp 0x408c10
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
lea edx, [eax + ebp]
cmp edx, ecx
jbe 0x408bfb
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0xc]
push edi
add ecx, eax
push ecx
push ebx
call fcn.0041b7d0
add esp, 0xc
add dword [esi + 0x14], edi
mov eax, edi
xor edx, edx
div ebp
cmp eax, 1
jne 0x408c61
lea eax, [ebp - 3]
test eax, eax
jl 0x408c4c
dec eax
cmp byte [eax + ebx], 0x50
jne 0x408c3c
cmp byte [eax + ebx + 1], 0x4b
jne 0x408c3c
cmp byte [eax + ebx + 2], 5
jne 0x408c3c
cmp byte [eax + ebx + 3], 6
je 0x408c42
test eax, eax
jge 0x408c20
jmp 0x408c4c
mov edx, dword [esp + 0x20]
add eax, edx
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
jne 0x408c61
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
jb 0x408b64
push ebx
call fcn.00415d97
mov eax, dword [esp + 0x1c]
add esp, 4
pop ebx
pop edi
pop ebp
add esp, 0x18
ret
Function at 0x409630
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x40964e
pop edi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 0xc
ret
cmp dword [edi + 0x18], ebx
je 0x409642
cmp dword [edi + 0x7c], ebx
je 0x40965d
call fcn.00409a10
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.004093a0
add esp, 0xc
test eax, eax
je 0x409684
pop edi
pop ebp
mov eax, 0xffffff99
pop ebx
add esp, 0xc
ret
push esi
push 0x7e
call fcn.0041583c
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4096c2
push 0x4000
call fcn.0041583c
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
add esp, 4
mov dword [esi], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ebx
cmp eax, ebx
jne 0x4096cf
push esi
call fcn.00415d97
add esp, 4
pop esi
pop edi
pop ebp
mov eax, 0xffffff98
pop ebx
add esp, 0xc
ret
mov dword [esi + 0x40], ebx
mov ecx, dword [edi + 0x3c]
xor eax, eax
cmp dword [edi + 0x34], ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x50], ebx
mov edx, dword [edi + 0x34]
sete al
mov dword [esi + 0x64], edx
mov ecx, dword [edi]
mov dword [esi + 0x60], ecx
mov edx, dword [edi + 0xc]
mov dword [esi + 0x68], edx
mov dword [esi + 0x18], ebx
cmp eax, ebx
jne 0x409717
lea eax, [esi + 4]
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.004084f0
test eax, eax
jne 0x409717
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov dword [esi + 0x58], eax
mov ecx, dword [edi + 0x44]
mov dword [esi + 0x5c], ecx
mov dl, byte [edi + 0x30]
and dl, 1
mov byte [esi + 0x6c], dl
mov eax, dword [edi + 0x30]
shr eax, 3
test al, 1
je 0x40973e
mov cl, byte [edi + 0x39]
mov byte [esi + 0x7d], cl
jmp 0x409744
mov dl, byte [edi + 0x3f]
mov byte [esi + 0x7d], dl
movzx eax, byte [esi + 0x6c]
neg eax
sbb eax, eax
and eax, 0xc
lea edx, [esi + 0x6d]
mov dword [esi + 0x79], eax
mov dword [edx], 0x12345678
mov dword [esi + 0x71], 0x23456789
mov dword [esi + 0x75], 0x34567890
cmp ebp, ebx
je 0x409781
lea ecx, [ecx]
mov cl, byte [ebp]
cmp cl, bl
je 0x409781
call fcn.004081e0
add ebp, 1
jne 0x409770
mov ecx, dword [edi + 0x78]
mov edx, dword [esp + 0x18]
lea eax, [ecx + edx + 0x1e]
mov dword [esi + 0x3c], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x7c], esi
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
Function at 0x409b70
Capabilities:
Get common file path

Disassembly:
cmp dword [esi], 0
push edi
jne 0x409c23
cmp dword [esi + 4], 0xffffffff
jne 0x409c23
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, edi
lea edx, [eax + 2]
jmp 0x409ba0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409ba0
sub eax, edx
sar eax, 1
movzx eax, word [esi + eax*2 + 0x242]
cmp ax, 0x5c
je 0x409bd9
cmp ax, 0x2f
je 0x409bd9
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x409bc6
mov eax, dword [0x42e278]
mov dword [edi], eax
push 0x18
call fcn.0040a4c2
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
add esp, 4
mov byte [eax], 0
mov byte [eax + 1], 1
mov byte [eax + 0xb], 0
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], edx
mov dword [eax + 0x14], 0
mov dword [eax + 7], 0
call fcn.00408c80
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x200
pop edi
ret 8
mov eax, 0x1000000
pop edi
ret 8

Function at 0x41492b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x433c20]
jne 0x414935
repz ret
jmp fcn.004191eb

Function at 0x423cff
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004194c0
and dword [ebp - 4], 0
cmp dword [0x437abc], 0
mov ebx, eax
jne 0x423db0
push 0x42b6bc
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x423e61
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x42b6b0
push edi
call esi
test eax, eax
je 0x423e61
push eax
call fcn.0041944e
mov dword [esp], 0x42b6a0
push edi
mov dword [0x437abc], eax
call esi
push eax
call fcn.0041944e
mov dword [esp], 0x42b68c
push edi
mov dword [0x437ac0], eax
call esi
push eax
call fcn.0041944e
mov dword [esp], 0x42b670
push edi
mov dword [0x437ac4], eax
call esi
push eax
call fcn.0041944e
pop ecx
mov dword [0x437acc], eax
test eax, eax
je 0x423db0
push 0x42b658
push edi
call esi
push eax
call fcn.0041944e
pop ecx
mov dword [0x437ac8], eax
mov eax, dword [0x437ac8]
cmp eax, ebx
je 0x423e08
cmp dword [0x437acc], ebx
je 0x423e08
push eax
call fcn.004194c9
push dword [0x437acc]
mov esi, eax
call fcn.004194c9
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x423e08
test edi, edi
je 0x423e08
call esi
test eax, eax
je 0x423dff
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x423dff
test byte [ebp - 0xc], 1
jne 0x423e08
or dword [ebp + 0x10], 0x200000
jmp 0x423e41
mov eax, dword [0x437ac0]
cmp eax, ebx
je 0x423e41
push eax
call fcn.004194c9
pop ecx
test eax, eax
je 0x423e41
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x423e41
mov eax, dword [0x437ac4]
cmp eax, ebx
je 0x423e41
push eax
call fcn.004194c9
pop ecx
test eax, eax
je 0x423e41
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x437abc]
call fcn.004194c9
pop ecx
test eax, eax
je 0x423e61
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x423e63
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402e74
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004044bc
test esi, esi
jne 0x402eab
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.004045ac
jmp 0x402ecc
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402d10
mov dword [esp], eax
test esi, esi
je 0x402ecc
cmp dword [ebx], 0
je 0x402ecc
dec esi
jmp 0x402eb3
add esp, 0x10c
pop esi
pop ebx
ret

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

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

Function at 0x40357c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x46a024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403614
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4035f4
xor eax, eax
push ebp
push 0x4035ed
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403630
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4035f4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x46a024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x46a024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404318
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x46c04c], 0
je 0x404379
cmp word [0x46c220], 0xd7b2
jne 0x404341
cmp dword [0x46c228], 0
jbe 0x404341
mov eax, 0x46c21c
call dword [0x46c238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x46a070
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 0x4043a0
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x46a034], 0
jne 0x404395
push 0
push 0x46a068
push 0x46a070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret