joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4039f1
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, 0x7000
push esi
push 0
push dword [0x410360]
call fcn.00401195
mov eax, dword [0x4104f2]
add esp, 0xc
test eax, eax
jg 0x403a1c
and dword [0x410d94], 0
xor eax, eax
pop esi
ret
cmp eax, esi
ja 0x403a22
mov esi, eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll__lread]
push esi
push dword [0x410360]
push dword [0x410da4]
call edi
cmp dword [0x410dc8], 0
mov dword [0x410d94], eax
je 0x403a89
cmp eax, 0xffffffff
je 0x403a89
cmp eax, esi
je 0x403a95
test eax, eax
jl 0x403a89
mov ecx, dword [0x40f9b0]
mov edx, dword [0x410dcc]
inc ecx
call fcn.00402140
mov eax, dword [0x410d94]
test eax, eax
jne 0x403a82
push esi
push dword [0x410360]
push dword [0x410da4]
call edi
mov dword [0x410d94], eax
cmp eax, 0xffffffff
je 0x403a89
mov esi, eax
cmp eax, esi
je 0x403a95
push 2
pop ecx
jmp fcn.0040325e
mov esi, dword [0x410360]
mov ecx, dword [0x40fa04]
mov dword [0x410d90], esi
test byte [ecx + 0x28], 1
je 0x403ae1
mov byte [0x410e28], 1
test byte [ecx + 0x29], 0x13
jne 0x403aee
test eax, eax
je 0x403ada
mov edi, eax
call fcn.00406aae
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.00406ac5
inc esi
dec edi
pop ecx
jne 0x403ac0
mov eax, dword [0x410d94]
mov byte [0x410e28], 0
mov ecx, eax
dec eax
pop edi
mov dword [0x410d94], eax
mov eax, ecx
pop esi
ret
push 0xf2f
push dword [0x40f9c0]
call fcn.00401dfc
int3
Function at 0x406ac5
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [0x411c60]
mov edx, eax
xor edx, dword [esp + 4]
shr eax, 8
mov ecx, 0xff
and edx, ecx
xor eax, dword [edx*4 + 0x410500]
xor edx, edx
mov dword [0x411c60], eax
and eax, ecx
add eax, dword [0x411c64]
imul eax, eax, 0x8088405
inc eax
mov dword [0x411c64], eax
mov dl, byte [0x411c67]
mov eax, dword [0x411c68]
xor edx, eax
shr eax, 8
and edx, ecx
xor eax, dword [edx*4 + 0x410500]
mov dword [0x411c68], eax
mov eax, dword [esp + 4]
ret

Function at 0x406b57
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x40fc70]
push esi
push dword [0x410dc4]
mov dword [ebp - 4], eax
call fcn.00406b1f
push 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00401148
add esp, 0x10
xor esi, esi
lea edx, [ebp + esi - 0x10]
call fcn.00406aae
xor byte [edx], al
movzx eax, byte [edx]
push eax
call fcn.00406ac5
inc esi
cmp esi, 0xc
pop ecx
jl 0x406b84
cmp dword [0x410dc0], 0
movzx ax, byte [ebp - 5]
movzx cx, byte [0x4104eb]
pop esi
jne 0x406bbe
movzx cx, byte [0x4104f1]
cmp ax, cx
je 0x406bc8
or eax, 0xffffffff
jmp 0x406bca
xor eax, eax
mov ecx, dword [ebp - 4]
call fcn.00406c7b
leave
ret

Function at 0x406d9f
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x411cbc], esi
push edi
jne 0x406dbf
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x411cb8], esi
mov byte [0x411cb4], al
jne 0x406e25
mov ecx, dword [0x41322c]
test ecx, ecx
je 0x406e06
mov eax, dword [0x413228]
sub eax, 4
cmp eax, ecx
jmp 0x406dff
mov eax, dword [eax]
test eax, eax
je 0x406df1
call eax
mov eax, dword [0x413228]
sub eax, 4
cmp eax, dword [0x41322c]
mov dword [0x413228], eax
jae 0x406de9
mov eax, 0x40f020
mov esi, 0x40f028
cmp eax, esi
mov edi, eax
jae 0x406e25
mov eax, dword [edi]
test eax, eax
je 0x406e1e
call eax
add edi, 4
cmp edi, esi
jb 0x406e16
mov eax, 0x40f02c
mov esi, 0x40f030
cmp eax, esi
mov edi, eax
jae 0x406e44
mov eax, dword [edi]
test eax, eax
je 0x406e3d
call eax
add edi, 4
cmp edi, esi
jb 0x406e35
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x406e5e
push dword [ebp + 8]
mov dword [0x411cbc], 1
call fcn.00406d05
pop ebp
ret
Function at 0x407595
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40c678
call fcn.00407920
mov edi, 0x94
mov eax, edi
call fcn.00407460
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x411c7c], ecx
mov eax, dword [esi + 4]
mov dword [0x411c88], eax
mov edx, dword [esi + 8]
mov dword [0x411c8c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x411c80], esi
cmp ecx, 2
je 0x4075f5
or esi, 0x8000
mov dword [0x411c80], esi
shl eax, 8
add eax, edx
mov dword [0x411c84], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x407630
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407630
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x407648
cmp eax, 0x20b
je 0x407635
mov dword [ebp - 0x1c], esi
jmp 0x40765c
cmp dword [ecx + 0x84], 0xe
jbe 0x407630
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x407656
cmp dword [ecx + 0x74], 0xe
jbe 0x407630
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040876b
pop ecx
test eax, eax
jne 0x407688
cmp dword [0x411cc8], 1
jne 0x407675
call fcn.00407fa8
push 0x1c
call fcn.00407e31
push 0xff
call fcn.00406d05
pop ecx
pop ecx
call fcn.00407c64
mov dword [ebp - 4], esi
call fcn.004085a6
test eax, eax
jge 0x4076a1
push 0x1b
call fcn.00407570
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x413220], eax
call fcn.00408484
mov dword [0x411cc0], eax
call fcn.004083e2
test eax, eax
jge 0x4076c7
push 8
call fcn.00407570
pop ecx
call fcn.004081af
test eax, eax
jge 0x4076d8
push 9
call fcn.00407570
pop ecx
push 1
call fcn.00406d35
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4076ee
push eax
call fcn.00407570
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00408152
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40770f
movzx eax, word [ebp - 0x40]
jmp 0x407712
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004053b7
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x407730
push edi
call fcn.00406e60
call fcn.00406e82
jmp 0x407762
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040795b
ret
Function at 0x407e31
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40fc70]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40fca8]
je 0x407e66
inc eax
cmp eax, 0x13
jb 0x407e57
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40fca8]
jne 0x407f8c
mov eax, dword [0x411cc8]
cmp eax, 1
je 0x407f64
cmp eax, edx
jne 0x407e96
cmp dword [0x40fc84], 1
je 0x407f64
cmp ecx, 0xfc
je 0x407f8c
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x407ecc
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004088c0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00406ea0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x407f00
mov eax, edi
push eax
call fcn.00406ea0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40cbc4
push edi
call fcn.004089c0
add esp, 0x10
push edi
call fcn.00406ea0
push dword [esi + 0x40fcac]
mov ebx, eax
call fcn.00406ea0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00407460
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004088c0
push edi
push ebx
call fcn.004088d0
push 0x40cbc0
push ebx
call fcn.004088d0
push dword [esi + 0x40fcac]
push ebx
call fcn.004088d0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004087bc
add esp, 0x2c
jmp 0x407f8c
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40fcac]
push dword [esi]
call fcn.00406ea0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00406c7b
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4087bc
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x411e08], ebx
push esi
push edi
jne 0x40883c
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x408877
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40d1d0
push edi
call esi
test eax, eax
mov dword [0x411e08], eax
je 0x408877
push str.GetActiveWindow
push edi
call esi
push 0x40d1ac
push edi
mov dword [0x411e0c], eax
call esi
cmp dword [0x411c7c], 2
mov dword [0x411e10], eax
jne 0x40883c
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x411e18], eax
je 0x40883c
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x411e14], eax
mov eax, dword [0x411e14]
test eax, eax
je 0x408881
call eax
test eax, eax
je 0x408868
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x411e18]
test eax, eax
je 0x408868
test byte [ebp - 8], 1
jne 0x408881
cmp dword [0x411c88], 4
jb 0x40887b
or byte [ebp + 0x12], 0x20
jmp 0x4088a0
xor eax, eax
jmp 0x4088b0
or byte [ebp + 0x12], 4
jmp 0x4088a0
mov eax, dword [0x411e0c]
test eax, eax
je 0x4088a0
call eax
mov ebx, eax
test ebx, ebx
je 0x4088a0
mov eax, dword [0x411e10]
test eax, eax
je 0x4088a0
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x411e08]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408ae4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x408b12
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x408b19
cmp ebx, dword [eax + 4]
jae 0x408b19
xor eax, eax
jmp 0x408d09
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x408b2a
xor eax, eax
inc eax
jmp 0x408d08
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x408b40
cmp ecx, edx
jae 0x408c85
cmp dword [eax + 4], 0
je 0x408b49
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x408b31
cmp dword [ebp + 8], 0
je 0x408b6b
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x408c85
cmp eax, esi
jae 0x408c85
mov eax, dword [0x411e20]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x408b90
cmp dword [esi*4 + 0x411e28], edi
je 0x408c89
inc esi
cmp esi, eax
jl 0x408b7e
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x408d05
cmp dword [ebp - 8], 0x1000000
jne 0x408d05
test byte [ebp - 0xc], 0xcc
je 0x408c0e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x408d05
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x408d05
cmp word [eax + 0x18], 0x10b
jne 0x408d05
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x408d05
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x408c0e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x408c0e
test byte [ecx + 0x27], 0x80
jne 0x408c85
push 1
push 0x411e68
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x408b22
mov ecx, dword [0x411e20]
test ecx, ecx
mov edx, ecx
jle 0x408c42
lea eax, [ecx*4 + 0x411e24]
cmp dword [eax], edi
je 0x408c42
dec edx
sub eax, 4
test edx, edx
jg 0x408c36
test edx, edx
jne 0x408c73
push 0xf
pop ebx
cmp ecx, ebx
jg 0x408c4f
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x408c67
lea eax, [edx*4 + 0x411e28]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x408c55
cmp ecx, 0x10
jge 0x408c73
inc ecx
mov dword [0x411e20], ecx
push 0
push 0x411e68
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x408b22
xor eax, eax
jmp 0x408d08
test esi, esi
jle 0x408b22
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x411e68
call ebx
test eax, eax
jne 0x408b22
cmp dword [esi*4 + 0x411e28], edi
je 0x408cdf
mov eax, dword [0x411e20]
lea esi, [eax - 1]
test esi, esi
jl 0x408ccd
cmp dword [esi*4 + 0x411e28], edi
je 0x408cc9
dec esi
jns 0x408cbd
test esi, esi
jge 0x408cdd
cmp eax, 0x10
jge 0x408cd8
inc eax
mov dword [0x411e20], eax
lea esi, [eax - 1]
jmp 0x408cdf
je 0x408cf7
xor ecx, ecx
test esi, esi
jl 0x408cf7
lea eax, [ecx*4 + 0x411e28]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x408ce5
push 0
push 0x411e68
call ebx
jmp 0x408b22
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a367
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00407460
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a402
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x411c7c]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40a402
cmp eax, 1
je 0x40a423
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a402
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40a3cf
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40a3fe
xor eax, eax
inc eax
jmp 0x40a442
cmp edi, eax
jae 0x40a406
xor eax, eax
jmp 0x40a442
cmp eax, esi
jae 0x40a40d
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x411c7c]
jmp 0x40a426
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b580
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x413108]
mov eax, dword [0x40fc70]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40b746
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x413120]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x40b746
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40b5ea
xor eax, eax
jmp 0x40b75a
test al, 0x20
je 0x40b5fb
push 2
push edi
push edi
push ecx
call fcn.0040baaa
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40b6d0
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40b717
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40b65d
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40b64e
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40b630
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b69d
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40b6a9
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40b624
jmp 0x40b6ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40b741
cmp dword [ebp + 0x3a4], edi
je 0x40b717
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40b709
mov dword [0x411c74], eax
jmp 0x40b74d
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b6fb
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x40b6ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x40b6ab
push dword [ebp + 0x3a4]
call fcn.0040b995
pop ecx
jmp 0x40b757
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40b72f
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40b5e3
mov dword [0x411c70], 0x1c
mov dword [0x411c74], edi
jmp 0x40b757
sub eax, dword [ebp - 0x7c]
jmp 0x40b75a
and dword [0x411c74], 0
mov dword [0x411c70], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00406c7b
add ebp, 0x39c
leave
ret
Function at 0x431000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
je 0x431072
nop
nop
mov ebx, 0x40915c
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x28832bb6
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
nop
loop 0x431060
nop
mov eax, section..data
cmp eax, 0
nop
nop
nop
nop
je 0x4310d2
nop
nop
nop
mov ebx, 0x42f3f8
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
div edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x76ff56cf
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x4310c0
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x404d94
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffbe4
mov esi, edx
mov ebx, eax
test bl, bl
je 0x404dd6
movzx eax, bl
add ax, 0x41
dec eax
mov word [esp], ax
mov word [esp + 2], 0x3a
mov word [esp + 4], 0
lea eax, [esp + 0x212]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
push esp
call sub.kernel32.dll_SetCurrentDirectoryW
lea eax, [esp + 8]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
test bl, bl
je 0x404df6
lea eax, [esp + 0x212]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
mov eax, esi
lea edx, [esp + 8]
mov ecx, 0x105
call fcn.00408dc0
add esp, 0x41c
pop esi
pop ebx
ret

Function at 0x404fec
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.00407c58
test esi, esi
jne 0x405022
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.00407de0
jmp 0x405040
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00404f30
mov edi, eax
test esi, esi
je 0x405040
cmp dword [ebx], 0
je 0x405040
dec esi
jmp 0x405029
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x656008], 0x8088405
inc edx
mov dword [ebx + 0x656008], edx
mul edx
mov eax, edx
pop ebx
ret
Function at 0x4069c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00406d98
mov byte [esp], al
cmp byte [esp], 0
jne 0x406b40
test edi, edi
je 0x406b40
mov byte [esp + 1], 0
test ebp, ebp
jle 0x406a80
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
test ebp, ebp
jle 0x406a5b
cmp edi, 0xffffffff
je 0x406a1f
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x406a1f
mov byte [esp], 0
jmp 0x406b40
mov ebx, dword [esi]
cmp ebx, 1
jg 0x406a5b
test ebx, ebx
jne 0x406a51
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x406a51
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x406b40
call 0x406eb8
dec ebp
test ebp, ebp
jg 0x406a04
cmp edi, 0xffffffff
je 0x406a80
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x406a7e
mov byte [esp], 0
jmp 0x406b40
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x4069ce
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x406a80
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00406bac
mov edx, eax
mov ebx, dword [0x65c8f8]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x406ae4
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x406ae2
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x406ae4
xor edi, edi
cmp byte [esp], 0
je 0x406b0a
mov ebx, dword [esi]
test bl, 1
jne 0x406b20
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x406aea
mov byte [esp + 1], 1
jmp 0x406b20
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x406b0a
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x406a97
cmp byte [esp], 0
je 0x406b40
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x4078f4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x65c058], 0
je 0x40795b
cmp word [0x65c344], 0xd7b2
jne 0x40791d
cmp dword [0x65c34c], 0
jbe 0x40791d
mov eax, 0x65c340
call dword [0x65c35c]
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, 0x407988
call fcn.0040870c
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x656032], 0
jne 0x407977
push 0
push 0x6569ca
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret