joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402dc8
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffc4
mov edi, edx
mov ebx, eax
push 0x67
push dword [0x40cc94]
call sub.USER32.DLL_GetDlgItem
mov esi, eax
cmp byte [0x40c019], 0
jne 0x402e24
mov eax, dword [0x40e174]
call fcn.00404074
push 5
push esi
call sub.USER32.DLL_ShowWindow
push 0xffffffffffffffff
push 0
push 0xb1
push esi
call sub.USER32.DLL_SendMessageA
push 0x40c099
push 0
push 0xc2
push esi
call sub.USER32.DLL_SendMessageA
mov byte [0x40c019], 1
push 0x5f5e100
push 0x5f5e100
push 0xb1
push esi
call sub.USER32.DLL_SendMessageA
mov dword [esp], 0x3c
mov edx, esp
push edx
push 0
push 0x43a
push esi
call sub.USER32.DLL_SendMessageA
mov byte [esp + 0x19], 0
mov dword [esp + 4], 1
test bl, bl
je 0x402e7e
and dword [esp + 8], 0xbfffffff
or dword [esp + 8], 1
mov dword [esp + 0x14], 0xa0
or dword [esp + 4], 0x40000000
mov ecx, esp
push ecx
push 1
push 0x444
push esi
call sub.USER32.DLL_SendMessageA
push edi
push 0
push 0xc2
push esi
call sub.USER32.DLL_SendMessageA
push 0x5f5e100
push 0x5f5e100
push 0xb1
push esi
call sub.USER32.DLL_SendMessageA
test bl, bl
je 0x402ed2
or dword [esp + 8], 0x40000000
and dword [esp + 8], 0xfffffffe
mov eax, esp
push eax
push 1
push 0x444
push esi
call sub.USER32.DLL_SendMessageA
push 0x40c0c0
push 0
push 0xc2
push esi
call sub.USER32.DLL_SendMessageA
add esp, 0x3c
pop edi
pop esi
pop ebx
ret
Function at 0x4035ac
Capabilities:
Accept command line arguments
Set environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
mov eax, 0x40e988
push ebx
mov ebx, 0x40d96c
push esi
call fcn.004068e4
call sub.KERNEL32.DLL_GetCommandLineA
mov esi, eax
test esi, esi
je 0x4035e6
xor eax, eax
mov al, byte [esi]
cmp eax, 0x22
jne 0x4035e6
lea eax, [esi + 1]
mov edx, 0x22
call fcn.00406c00
mov esi, eax
test esi, esi
je 0x403696
mov edx, 0x40c0f9
mov eax, esi
call fcn.00406c44
mov esi, eax
test eax, eax
je 0x403609
mov eax, ebx
mov edx, esi
call fcn.00406c70
mov byte [ebp - 1], 0
xor eax, eax
xor esi, esi
jmp 0x403686
xor ecx, ecx
mov cl, dl
cmp ecx, 0x20
je 0x403620
mov byte [ebp - 1], 1
cmp ecx, 0x22
jne 0x403626
inc esi
test esi, 1
jne 0x403685
xor edx, edx
mov dl, byte [ebx + eax]
cmp edx, 0x2d
jne 0x403647
test eax, eax
je 0x403651
xor edx, edx
mov dl, byte [ebx + eax - 1]
cmp edx, 0x20
je 0x403651
xor ecx, ecx
mov cl, byte [ebx + eax]
cmp ecx, 0x2f
jne 0x403685
xor edx, edx
mov dl, byte [ebx + eax + 1]
cmp edx, 0x73
je 0x403661
cmp edx, 0x53
jne 0x403685
mov dl, byte [ebx + eax + 2]
test dl, dl
je 0x403672
xor ecx, ecx
mov cl, dl
cmp ecx, 0x20
jne 0x403685
mov dword [0x40c058], 1
mov byte [0x40c05c], 1
jmp 0x40368d
inc eax
mov dl, byte [ebx + eax]
test dl, dl
jne 0x403613
cmp byte [ebp - 1], 0
jne 0x403696
mov byte [ebx], 0
push 0x400
push 0x40d56c
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x40d56c
push str.sfxname
call sub.KERNEL32.DLL_SetEnvironmentVariableA
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov ebx, eax
mov dword [0x40ccc4], eax
push 0x64
push ebx
call sub.USER32.DLL_LoadIconA
mov dword [0x40dd6c], eax
push 0x65
push dword [0x40ccc4]
call sub.USER32.DLL_LoadBitmapA
mov dword [0x40dd70], eax
lea eax, [ebp - 0xc]
call fcn.00405218
mov edx, 0x40d56c
mov eax, 0x40cccc
call fcn.0040497c
lea eax, [ebp - 0x24]
call fcn.00403ee4
lea eax, [ebp - 0x3c]
call fcn.00403ee4
push 0
push 0x4010a3
lea edx, [ebp - 0x24]
push 0
mov dword [0x40e174], edx
lea ecx, [ebp - 0x3c]
push str.STARTDLG
push ebx
mov dword [0x40e178], ecx
call sub.USER32.DLL_DialogBoxParamA
xor eax, eax
mov dword [0x40cc94], eax
xor edx, edx
mov dword [0x40e178], edx
mov dword [0x40e174], edx
cmp dword [0x40cc9c], 0
jne 0x403769
cmp dword [0x40cca8], 0
jne 0x403769
mov ecx, 4
mov edx, dword [0x40c048]
xor eax, eax
call fcn.004017c8
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.00403f08
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00403f08
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.0040528c
cmp byte [0x40c044], 0
je 0x40379e
call fcn.00402698
mov eax, 0x40d4e0
mov ecx, 0x80
xor edx, edx
call fcn.00406b94
cmp dword [0x40c054], 0
jle 0x4037c2
mov eax, dword [0x40c048]
call fcn.004069ac
push dword [0x40dd6c]
call sub.GDI32.DLL_DeleteObject
mov eax, dword [0x40dd70]
test eax, eax
je 0x4037dc
push eax
call sub.GDI32.DLL_DeleteObject
cmp dword [0x40ccb8], 0
jne 0x4037fd
cmp dword [0x40cc9c], 0
je 0x4037fd
mov eax, 0x40ccb8
mov edx, 0xff
call fcn.0040678c
mov dword [0x40cc9c], 2
push dword [0x40ccb8]
call sub.KERNEL32.DLL_ExitProcess
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40381c
Capabilities:
Hide graphical window

Disassembly:
push ebx
mov dword [0x40ccac], 1
mov ebx, dword [0x40cc94]
test ebx, ebx
je 0x403844
mov eax, 0x7d
call fcn.00402934
push eax
push 1
push ebx
call sub.USER32.DLL_SetDlgItemTextA
xor edx, edx
mov dword [0x40ccb0], edx
mov dword [0x40ccb4], 1
mov eax, dword [0x40cc94]
test eax, eax
je 0x40389d
push 1
push eax
call sub.USER32.DLL_ShowWindow
cmp dword [0x40c054], 0
jne 0x403894
cmp byte [0x40c019], 0
jne 0x403894
push 0
push 1
push 0x111
push dword [0x40cc94]
call sub.USER32.DLL_SendMessageA
jmp 0x403894
call fcn.004029b0
cmp dword [0x40cc9c], 2
jne 0x40388f
cmp byte [0x40c044], 0
je 0x4038ab
call fcn.00402698
pop ebx
ret

Function at 0x403f30
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
mov ebx, eax
push esi
push edi
cmp byte [ebx + 0x14], 0
mov edi, edx
mov esi, ecx
jne 0x403f55
push 0
call sub.OLE32.DLL_OleInitialize
call sub.COMCTL32.DLL_InitCommonControls
mov byte [ebx + 0x14], 1
mov byte [ebx + 0x15], 0
push 0
push esi
call sub.USER32.DLL_ShowWindow
mov edx, edi
mov eax, ebx
call fcn.0040408c
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
mov dword [ebx + 0x10], ecx
push eax
push esi
call sub.USER32.DLL_GetWindowRect
push 2
lea edx, [ebp - 0x10]
push edx
push esi
call sub.USER32.DLL_GetParent
push eax
push 0
call sub.USER32.DLL_MapWindowPoints
mov eax, dword [ebx + 4]
test eax, eax
je 0x403f9b
push eax
call sub.USER32.DLL_DestroyWindow
push ebx
push dword [ebx]
push 0
push esi
call sub.USER32.DLL_GetParent
push eax
mov edx, dword [ebp - 4]
sub edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x10]
add ecx, 0xfffffffe
push ecx
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
inc eax
push eax
push 0x40000000
push 0
push str.RarHtmlClassName
push 0
call sub.USER32.DLL_CreateWindowExA
mov edi, eax
mov dword [ebx + 4], edi
test edi, edi
je 0x403fec
push 5
push edi
call sub.USER32.DLL_ShowWindow
push dword [ebx + 4]
call sub.USER32.DLL_UpdateWindow
cmp byte [ebx + 0x15], 0
jne 0x404069
mov eax, dword [ebx + 4]
test eax, eax
je 0x404004
push eax
call sub.USER32.DLL_DestroyWindow
xor edx, edx
mov dword [ebx + 4], edx
push 5
push esi
call sub.USER32.DLL_ShowWindow
mov eax, dword [ebp + 8]
call fcn.00406bf0
add eax, eax
lea eax, [eax + eax*2]
add eax, 0x100
call fcn.00406998
mov edi, eax
mov edx, dword [ebp + 8]
mov eax, edi
call fcn.00406c70
mov edx, edi
mov eax, ebx
call fcn.004046c8
test al, al
jne 0x404045
mov edx, edi
mov eax, ebx
call fcn.00404700
mov edx, edi
mov eax, ebx
call fcn.00404540
mov ebx, eax
mov eax, edi
call fcn.004069ac
test ebx, ebx
je 0x404069
push ebx
push esi
call sub.USER32.DLL_SetWindowTextA
mov eax, ebx
call fcn.004069ac
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x404280
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffdc
mov edi, edx
mov esi, eax
xor eax, eax
mov dword [esp], eax
xor edx, edx
mov dword [esp + 4], edx
call sub.KERNEL32.DLL_GetTickCount
mov ebx, eax
jmp 0x4042e6
call sub.KERNEL32.DLL_GetTickCount
sub eax, ebx
cmp eax, 0x2710
ja 0x4042f7
push 0
push 0
push 0
push 0
lea eax, [esp + 0x18]
push eax
call sub.USER32.DLL_PeekMessageA
test eax, eax
je 0x4042e6
push 0
push 0
push 0
lea edx, [esp + 0x14]
push edx
call sub.USER32.DLL_GetMessageA
lea ecx, [esp + 8]
push ecx
call sub.USER32.DLL_TranslateMessage
lea eax, [esp + 8]
push eax
call sub.USER32.DLL_DispatchMessageA
push esp
push esi
mov edx, dword [esi]
call dword [edx + 0x48]
test eax, eax
jl 0x40429e
cmp dword [esp], 0
je 0x40429e
xor ebx, ebx
cmp dword [esp], 0
je 0x404341
lea eax, [esp + 4]
push eax
push 0x40cc24
mov edx, dword [esp + 8]
push edx
mov ecx, dword [edx]
call dword [ecx]
test eax, eax
jl 0x404341
mov eax, dword [esp + 4]
push eax
mov edx, dword [eax]
call dword [edx + 0x20]
test eax, eax
jl 0x404337
push edi
mov ecx, dword [esp + 8]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
setge bl
and ebx, 1
mov eax, dword [esp + 4]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, ebx
add esp, 0x24
pop edi
pop esi
pop ebx
ret
Function at 0x404e4c
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff7ac
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
mov esi, edx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0xc]
call fcn.00405048
mov ebx, eax
lea eax, [ebp - 0x34]
push eax
push esi
call sub.USER32.DLL_GetWindowRect
lea edx, [ebp - 0x44]
push edx
push esi
call sub.USER32.DLL_GetClientRect
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x34]
inc ecx
sub ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x30]
inc eax
sub eax, dword [ebp - 0x38]
test bl, bl
mov dword [ebp - 0x18], eax
je 0x404ee3
cmp byte [ebp + 8], 0
jne 0x404ee3
mov eax, dword [ebp - 0x3c]
mov ecx, 0x64
imul dword [ebp - 0xc]
cdq
idiv ecx
mov ecx, eax
mov eax, dword [ebp - 0x38]
imul dword [ebp - 0x10]
cdq
mov edi, 0x64
idiv edi
add ecx, dword [ebp - 0x14]
add eax, dword [ebp - 0x18]
push 0x206
push eax
push ecx
push 0
push 0
push 0
push esi
call sub.USER32.DLL_SetWindowPos
cmp byte [ebp + 8], 0
jne 0x404f21
push 0x400
lea eax, [ebp - 0x444]
push eax
push esi
call sub.USER32.DLL_GetWindowTextA
push 1
push dword [ebp - 8]
lea ecx, [ebp - 0x444]
lea edx, [ebp - 0x444]
mov eax, dword [ebp - 4]
call fcn.00404cd0
lea edx, [ebp - 0x444]
push edx
push esi
call sub.USER32.DLL_SetWindowTextA
push 8
call sub.USER32.DLL_GetSystemMetrics
sub dword [ebp - 0x18], eax
push 5
push esi
call sub.USER32.DLL_GetWindow
mov edi, eax
mov dword [ebp - 0x1c], edi
xor esi, esi
jmp 0x40502f
push 0x400
lea eax, [ebp - 0x844]
push eax
push edi
call sub.USER32.DLL_GetWindowTextA
cmp byte [ebp - 0x844], 0
je 0x404f80
push 1
push dword [ebp - 8]
lea ecx, [ebp - 0x844]
lea edx, [ebp - 0x844]
mov eax, dword [ebp - 4]
call fcn.00404cd0
lea edx, [ebp - 0x844]
push edx
push edi
call sub.USER32.DLL_SetWindowTextA
test bl, bl
je 0x40501f
lea ecx, [ebp - 0x854]
push ecx
push edi
call sub.USER32.DLL_GetWindowRect
mov eax, dword [ebp - 0x854]
sub eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x14]
sar edx, 1
jns 0x404fa8
adc edx, 0
sub eax, edx
mov ecx, 0x64
imul dword [ebp - 0xc]
cdq
idiv ecx
mov ecx, eax
mov eax, dword [ebp - 0x850]
sub eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0x18]
imul dword [ebp - 0x10]
cdq
push ecx
mov ecx, 0x64
idiv ecx
pop ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x84c]
sub eax, dword [ebp - 0x854]
inc eax
imul dword [ebp - 0xc]
cdq
push ecx
mov ecx, 0x64
idiv ecx
pop ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x848]
sub eax, dword [ebp - 0x850]
inc eax
imul dword [ebp - 0x10]
cdq
push ecx
mov ecx, 0x64
idiv ecx
pop ecx
push 0x204
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x20]
push ecx
push 0
push edi
call sub.USER32.DLL_SetWindowPos
push 2
push edi
call sub.USER32.DLL_GetWindow
mov edi, eax
cmp edi, dword [ebp - 0x1c]
je 0x40503f
inc esi
test edi, edi
je 0x40503f
cmp esi, 0x200
jl 0x404f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x405c14
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
mov esi, eax
call fcn.004050ec
test eax, eax
je 0x405c3a
test ebx, ebx
je 0x405c3a
cmp word [ebx], 0
je 0x405c3a
push 0
push ebx
call sub.KERNEL32.DLL_CreateDirectoryW
jmp 0x405c42
push 0
push esi
call sub.KERNEL32.DLL_CreateDirectoryA
test eax, eax
je 0x405c55
mov ecx, edi
mov edx, ebx
mov eax, esi
call fcn.00405e50
xor eax, eax
jmp 0x405c70
call sub.KERNEL32.DLL_GetLastError
cmp eax, 2
je 0x405c64
cmp eax, 3
jne 0x405c6b
mov eax, 2
jmp 0x405c70
mov eax, 1
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebx
push esi
mov ebx, edx
mov esi, eax
call fcn.004050ec
test eax, eax
je 0x405e27
test ebx, ebx
je 0x405e27
cmp word [ebx], 0
je 0x405e27
push ebx
call sub.KERNEL32.DLL_GetFileAttributesW
cmp eax, 0xffffffff
setne al
and eax, 1
pop esi
pop ebx
ret
push esi
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
setne al
and eax, 1
pop esi
pop ebx
ret

Function at 0x405e50
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
mov ebx, edx
mov edi, eax
call fcn.004050ec
test eax, eax
je 0x405e7d
test ebx, ebx
je 0x405e7d
cmp word [ebx], 0
je 0x405e7d
push esi
push ebx
call sub.KERNEL32.DLL_SetFileAttributesW
test eax, eax
setne al
and eax, 1
jmp 0x405e8c
push esi
push edi
call sub.KERNEL32.DLL_SetFileAttributesA
test eax, eax
setne al
and eax, 1
pop edi
pop esi
pop ebx
ret

Function at 0x405f8c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov edi, 0x40e184
push ebp
mov ebp, edx
cmp dword [edi + 4], 0
mov esi, ecx
mov ebx, eax
jne 0x405fa6
call fcn.00405f54
mov eax, ebp
jmp 0x405fbe
mov edx, ebx
xor ecx, ecx
xor dl, byte [eax]
dec esi
mov cl, dl
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
inc eax
mov ebx, edx
test esi, esi
jbe 0x405fc6
test al, 7
jne 0x405faa
cmp esi, 8
jb 0x40604f
xor ebx, dword [eax]
xor ecx, ecx
mov cl, bl
sub esi, 8
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
xor ecx, ecx
mov ebx, edx
mov cl, bl
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
xor ecx, ecx
mov ebx, edx
mov cl, bl
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
xor ecx, ecx
mov ebx, edx
mov cl, bl
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
xor ecx, ecx
mov ebx, edx
xor ebx, dword [eax + 4]
add eax, 8
mov cl, bl
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
xor ecx, ecx
mov ebx, edx
mov cl, bl
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
xor ecx, ecx
mov ebx, edx
mov cl, bl
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
xor ecx, ecx
mov ebx, edx
mov cl, bl
shr ebx, 8
mov edx, dword [edi + ecx*4]
xor edx, ebx
cmp esi, 8
mov ebx, edx
jae 0x405fcf
xor edx, edx
jmp 0x406069
mov ecx, ebx
xor cl, byte [eax + edx]
and ecx, 0xff
shr ebx, 8
mov ecx, dword [edi + ecx*4]
xor ecx, ebx
mov ebx, ecx
inc edx
cmp esi, edx
ja 0x406053
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x406108
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
mov ebx, eax
push edi
mov dword [ebp - 4], edx
xor edx, edx
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc18], edx
cmp byte [ebx + 0x16], 0
mov esi, ecx
je 0x40612b
mov al, 1
cmp byte [ebp + 8], 0
mov edi, 0x80000000
je 0x40613c
or edi, 0x40000000
mov dword [ebp - 8], 1
test al, al
je 0x40614b
or dword [ebp - 8], 2
xor eax, eax
cmp byte [ebx + 0x15], 0
jne 0x406158
add eax, 0x8000000
mov dword [ebp - 0xc], eax
call fcn.004050ec
test eax, eax
je 0x406185
test esi, esi
je 0x406185
cmp word [esi], 0
je 0x406185
push 0
push dword [ebp - 0xc]
push 3
push 0
push dword [ebp - 8]
push edi
push esi
call sub.KERNEL32.DLL_CreateFileW
mov edi, eax
jmp 0x40619c
push 0
push dword [ebp - 0xc]
push 3
push 0
push dword [ebp - 8]
push edi
push dword [ebp - 4]
call sub.KERNEL32.DLL_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
jne 0x4061b5
call sub.KERNEL32.DLL_GetLastError
cmp eax, 2
jne 0x4061b5
mov dword [ebx + 0xc18], 1
xor edx, edx
cmp edi, 0xffffffff
mov byte [ebx + 0x12], 0
setne cl
mov dword [ebx + 0xc], edx
and ecx, 1
mov byte [ebx + 0x10], 0
mov byte [ebp - 0xd], cl
cmp byte [ebp - 0xd], 0
je 0x40621f
mov dword [ebx + 4], edi
test esi, esi
je 0x4061ea
lea eax, [ebx + 0x418]
mov edx, esi
call fcn.0040685c
jmp 0x4061f3
mov word [ebx + 0x418], 0
cmp dword [ebp - 4], 0
je 0x406206
lea eax, [ebx + 0x17]
mov edx, dword [ebp - 4]
call fcn.00406c70
jmp 0x406215
lea edx, [ebx + 0x17]
mov ecx, 0x10000000
mov eax, esi
call fcn.00406800
mov edx, dword [ebx + 4]
mov eax, ebx
call fcn.0040622c
mov al, byte [ebp - 0xd]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x4063e8
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, eax
push esi
push edi
push ecx
mov edi, edx
cmp dword [ebx + 0xc], 1
mov esi, ecx
jne 0x40640f
cmp esi, 0x4e20
jle 0x406405
mov esi, 0x4e20
push 0xfffffffffffffff6
call sub.KERNEL32.DLL_GetStdHandle
mov dword [ebx + 4], eax
push 0
lea eax, [esp + 4]
push eax
push esi
push edi
push dword [ebx + 4]
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x406460
mov eax, ebx
call fcn.004065c8
test al, al
je 0x406447
cmp esi, 0x4e20
jle 0x406447
mov ecx, 0x4e20
mov edx, edi
mov eax, ebx
call fcn.004063e8
jmp 0x406463
cmp dword [ebx + 0xc], 1
jne 0x40645b
call sub.KERNEL32.DLL_GetLastError
cmp eax, 0x6d
jne 0x40645b
xor eax, eax
jmp 0x406463
or eax, 0xffffffff
jmp 0x406463
mov eax, dword [esp]
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x406ea0
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
add esp, 0xffffffe8
lea ecx, [esp + 0x10]
lea edx, [esp + 8]
mov eax, esp
call fcn.00406e04
mov ebx, eax
mov eax, dword [0x41b224]
call fcn.00406ad8
push 0
push 0x80
push 3
push 0
push 2
push 0x40000000
push 0x41b23c
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
mov eax, dword [0x40f124]
mov eax, dword [eax + 0x10]
test al, 0x5f
je 0x406ef8
and eax, 0x7f
push eax
push 0x41b23c
call sub.KERNEL32.DLL_SetFileAttributesA
cmp esi, 0xffffffff
jne 0x406f17
push 0x41b23c
mov eax, 0x6d
call fcn.00402934
push eax
call fcn.00402eec
add esp, 8
jmp 0x406f4f
test ebx, ebx
je 0x406f49
test bl, 1
je 0x406f24
mov eax, esp
jmp 0x406f26
xor eax, eax
test bl, 2
je 0x406f31
lea edx, [esp + 8]
jmp 0x406f33
xor edx, edx
test bl, 4
je 0x406f3e
lea ecx, [esp + 0x10]
jmp 0x406f40
xor ecx, ecx
push eax
push edx
push ecx
push esi
call sub.KERNEL32.DLL_SetFileTime
push esi
call sub.KERNEL32.DLL_CloseHandle
add esp, 0x18
pop esi
pop ebx
ret
Function at 0x409544
Capabilities:
Set file attributes

Disassembly:
mov edx, 0x40c7a2
mov eax, 0x41b23c
call fcn.00406a7c
mov dword [0x41b224], eax
test eax, eax
jne 0x4095ad
push 0
push 0x41b23c
call sub.KERNEL32.DLL_SetFileAttributesA
mov edx, 0x40c7a2
mov eax, 0x41b23c
call fcn.00406a7c
mov dword [0x41b224], eax
test eax, eax
jne 0x4095ad
mov eax, 0x40ccb8
mov edx, 9
call fcn.0040678c
push 0x41b23c
mov eax, 0x6e
call fcn.00402934
push eax
call fcn.00402eec
add esp, 8
mov eax, 1
ret
xor eax, eax
ret

Function at 0x40973c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push esi
cmp dword [0x40eb00], 0
jg 0x40975a
dec dword [0x40eb00]
xor eax, eax
mov dword [0x41b138], eax
or eax, 0xffffffff
pop esi
pop ebx
ret
cmp dword [0x41b138], 0
jg 0x4097af
push dword [0x41b154]
mov ecx, 0x2000
mov edx, 1
mov eax, dword [0x41b130]
call fcn.00406b24
mov dword [0x41b138], eax
test eax, eax
jne 0x409794
xor edx, edx
or eax, 0xffffffff
mov dword [0x41b138], edx
pop esi
pop ebx
ret
add dword [0x41b15c], 0x2000
mov edx, dword [0x41b130]
mov dword [0x41b134], edx
call fcn.00409600
mov ecx, dword [0x40f124]
test byte [ecx + 0x14], 1
je 0x4097e6
mov esi, dword [0x41b138]
mov ebx, dword [0x41b134]
jmp 0x4097dd
call fcn.0040a9a0
xor byte [ebx], al
mov al, byte [ebx]
and eax, 0xff
call fcn.0040a9c4
inc ebx
mov edx, esi
add esi, 0xffffffff
test edx, edx
jne 0x4097c9
dec dword [0x41b138]
mov ecx, dword [0x41b134]
inc dword [0x41b134]
xor eax, eax
mov al, byte [ecx]
pop esi
pop ebx
ret

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

Disassembly:
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x4098bf
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x40a8e6
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
add esp, 0xfffffff4
mov ebx, eax
mov eax, edx
call fcn.0040aa30
mov eax, esp
mov ecx, 0xc
mov edx, ebx
call fcn.00406ba8
xor ebx, ebx
call fcn.0040a9a0
xor byte [esp + ebx], al
mov al, byte [esp + ebx]
and eax, 0xff
call fcn.0040a9c4
inc ebx
cmp ebx, 0xc
jl 0x40a904
mov edx, dword [0x40f124]
xor eax, eax
mov al, byte [esp + 0xb]
test byte [edx + 0x14], 2
je 0x40a93d
movzx ecx, word [0x41b182]
sar ecx, 8
jmp 0x40a949
mov ecx, dword [0x41b188]
shr ecx, 0x18
movzx ecx, cx
movzx eax, ax
cmp ecx, eax
je 0x40a955
or eax, 0xffffffff
jmp 0x40a998
mov edx, dword [0x41b138]
cmp edx, dword [0x40eb00]
jle 0x40a96b
mov ebx, dword [0x40eb00]
jmp 0x40a971
mov ebx, dword [0x41b138]
mov esi, dword [0x41b134]
jmp 0x40a98d
call fcn.0040a9a0
xor byte [esi], al
mov al, byte [esi]
and eax, 0xff
call fcn.0040a9c4
inc esi
mov edx, ebx
add ebx, 0xffffffff
test edx, edx
jne 0x40a979
xor eax, eax
add esp, 0xc
pop esi
pop ebx
ret
Function at 0x40a9c4
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov edx, dword [0x41b348]
push ebx
mov ecx, edx
mov ebx, dword [0x41b128]
xor ecx, eax
and ecx, 0xff
shr edx, 8
mov ecx, dword [ebx + ecx*4]
xor ecx, edx
mov dword [0x41b348], ecx
and ecx, 0xff
add dword [0x41b34c], ecx
imul edx, dword [0x41b34c], 0x8088405
inc edx
mov dword [0x41b34c], edx
shr edx, 0x18
mov ecx, dword [0x41b350]
xor edx, ecx
mov ebx, dword [0x41b128]
and edx, 0xff
shr ecx, 8
mov edx, dword [ebx + edx*4]
xor edx, ecx
mov dword [0x41b350], edx
pop ebx
ret

Function at 0x40ac0c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
test esi, esi
jne 0x40ac20
xor eax, eax
jmp 0x40ad18
call fcn.0040ac04
xor ebx, 0xffffffff
cmp edi, 8
jb 0x40acf5
xor edx, edx
sub edi, 8
mov dl, byte [esi]
inc esi
xor edx, ebx
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
xor edx, edx
mov dl, byte [esi]
mov ebx, ecx
xor edx, ebx
inc esi
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
xor edx, edx
mov dl, byte [esi]
mov ebx, ecx
xor edx, ebx
inc esi
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
xor edx, edx
mov dl, byte [esi]
mov ebx, ecx
xor edx, ebx
inc esi
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
xor edx, edx
mov dl, byte [esi]
mov ebx, ecx
xor edx, ebx
inc esi
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
xor edx, edx
mov dl, byte [esi]
mov ebx, ecx
xor edx, ebx
inc esi
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
xor edx, edx
mov dl, byte [esi]
mov ebx, ecx
xor edx, ebx
inc esi
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
xor edx, edx
mov dl, byte [esi]
mov ebx, ecx
xor edx, ebx
inc esi
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
cmp edi, 8
mov ebx, ecx
jae 0x40ac31
test edi, edi
je 0x40ad13
xor edx, edx
mov dl, byte [esi]
inc esi
xor edx, ebx
and edx, 0xff
shr ebx, 8
mov ecx, dword [eax + edx*4]
xor ecx, ebx
dec edi
mov ebx, ecx
jne 0x40acf9
mov eax, ebx
xor eax, 0xffffffff
pop edi
pop esi
pop ebx
ret