joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401110
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x414e70
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
mov eax, dword [0x41b050]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
lea eax, [esp + 0x10]
push eax
xor edx, edx
mov ecx, edi
mov dword [esp + 0x14], 0x2e
call fcn.00401430
mov esi, eax
cmp esi, 0xffffffff
jne 0x401168
xor al, al
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
push esi
lea ecx, [esp + 0x18]
push ecx
push edi
xor ecx, ecx
call fcn.004013c0
xor ebp, ebp
mov dword [esp + 0x38], ebp
mov ebx, 8
cmp dword [eax + 0x18], ebx
jb 0x40118b
mov eax, dword [eax + 4]
jmp 0x40118e
add eax, 4
push eax
call fcn.0040a3b7
mov edx, dword [esp + 0x44]
add esp, 4
mov dword [edx], eax
mov dword [esp + 0x38], 0xffffffff
cmp dword [esp + 0x2c], ebx
jb 0x4011b8
mov eax, dword [esp + 0x18]
push eax
call fcn.0040a31e
add esp, 4
lea ecx, [esp + 0x10]
add esi, 1
push ecx
mov edx, esi
mov ecx, edi
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], ebp
mov word [esp + 0x1c], bp
mov ebx, esi
mov dword [esp + 0x14], 0x2e
call fcn.00401430
mov esi, eax
cmp esi, 0xffffffff
je 0x401153
mov edx, esi
sub edx, ebx
push edx
lea eax, [esp + 0x18]
push eax
push edi
mov ecx, ebx
call fcn.004013c0
mov dword [esp + 0x38], 1
mov ebx, 8
cmp dword [eax + 0x18], ebx
jb 0x401218
mov eax, dword [eax + 4]
jmp 0x40121b
add eax, 4
push eax
call fcn.0040a3b7
mov ecx, dword [esp + 0x44]
add esp, 4
mov dword [ecx + 4], eax
mov dword [esp + 0x38], 0xffffffff
cmp dword [esp + 0x2c], ebx
jb 0x401246
mov edx, dword [esp + 0x18]
push edx
call fcn.0040a31e
add esp, 4
add esi, 1
lea eax, [esp + 0x10]
push eax
mov edx, esi
mov ecx, edi
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], ebp
mov word [esp + 0x1c], bp
mov ebx, esi
mov dword [esp + 0x14], 0x2e
call fcn.00401430
mov esi, eax
cmp esi, 0xffffffff
je 0x401153
mov ecx, esi
sub ecx, ebx
push ecx
lea edx, [esp + 0x18]
push edx
push edi
mov ecx, ebx
call fcn.004013c0
mov dword [esp + 0x38], 2
mov ebx, 8
cmp dword [eax + 0x18], ebx
jb 0x4012a6
mov eax, dword [eax + 4]
jmp 0x4012a9
add eax, 4
push eax
call fcn.0040a3b7
mov ecx, dword [esp + 0x44]
add esp, 4
mov dword [ecx + 8], eax
mov dword [esp + 0x38], 0xffffffff
cmp dword [esp + 0x2c], ebx
jb 0x4012d4
mov edx, dword [esp + 0x18]
push edx
call fcn.0040a31e
add esp, 4
mov eax, dword [edi + 0x14]
add esi, 1
cmp esi, eax
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], ebp
mov word [esp + 0x18], bp
jae 0x401153
sub eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push edi
mov ecx, esi
call fcn.004013c0
mov dword [esp + 0x38], 3
cmp dword [eax + 0x18], ebx
jb 0x401315
mov eax, dword [eax + 4]
jmp 0x401318
add eax, 4
push eax
call fcn.0040a3b7
mov ecx, dword [esp + 0x44]
add esp, 4
mov dword [ecx + 0xc], eax
mov dword [esp + 0x38], 0xffffffff
lea esi, [esp + 0x14]
call fcn.00401390
mov al, 1
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
Function at 0x402b00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41547b
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x41b050]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x41b050]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
lea esi, [esp + 0x54]
mov dword [esp + 0x28], ecx
call fcn.00402a60
xor ebx, ebx
mov dword [esp + 0x98], ebx
cmp dword [esp + 0x64], ebx
jne 0x402b7d
mov dword [esp + 0x98], 0xffffffff
cmp dword [esp + 0x68], 8
jb 0x402cdc
mov edx, dword [esp + 0x54]
push edx
jmp 0x402cd4
mov eax, dword [esp + 0x54]
mov edi, 8
cmp dword [esp + 0x68], edi
jae 0x402b90
lea eax, [esp + 0x54]
lea ecx, [esp + 0x2c]
push ecx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x402cbe
mov eax, dword [esp + 0x4c]
cmp eax, ebx
mov esi, eax
je 0x402cbe
cmp eax, 0x2800
ja 0x402cbe
cmp dword [esp + 0x68], edi
mov eax, dword [esp + 0x54]
jae 0x402bcc
lea eax, [esp + 0x54]
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, ebx
je 0x402ca8
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x98], 1
lea eax, [esi + 8]
lea ecx, [esp + 0x10]
call fcn.004033d0
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov dword [esp + 0x20], ebx
je 0x402c21
mov edx, dword [esp + 0x18]
sub edx, eax
jne 0x402c2a
call fcn.0040a917
mov eax, dword [esp + 0x14]
push ebx
lea ecx, [esp + 0x24]
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402c91
mov edx, dword [esp + 0x14]
cmp edx, ebx
je 0x402c4d
mov eax, dword [esp + 0x18]
sub eax, edx
jne 0x402c56
call fcn.0040a917
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x6c]
call fcn.00401350
mov byte [esp + 0x98], 2
lea ecx, [esp + 0x6c]
push ecx
call fcn.00402890
mov edx, dword [esp + 0x24]
push edx
lea eax, [esp + 0x70]
push eax
call fcn.004026c0
mov byte [esp + 0x98], 1
lea esi, [esp + 0x6c]
call fcn.00401390
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x98], bl
lea esi, [esp + 0x10]
call fcn.004033a0
mov dword [esp + 0x98], 0xffffffff
lea esi, [esp + 0x50]
call fcn.00401390
jmp 0x402ced
mov dword [esp + 0x98], 0xffffffff
cmp dword [esp + 0x68], edi
jb 0x402cdc
mov ecx, dword [esp + 0x54]
push ecx
call fcn.0040a31e
add esp, 4
mov word [esp + 0x54], bx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], 7
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00409fae
mov esp, ebp
pop ebp
ret 4
Function at 0x404320
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x415161
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
mov eax, dword [0x41b050]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
xor ebx, ebx
mov dword [esp + 0xc], ebx
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], ebx
mov word [esp + 0x1c], bx
call fcn.00401500
mov dword [esp + 0x34], 1
mov eax, str.CoralApp.dll
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404380
sub eax, edx
sar eax, 1
push eax
push str.CoralApp.dll
lea ecx, [esp + 0x18]
call fcn.00402110
push 0xffffffffffffffff
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
push ebx
mov ecx, esi
mov word [esi + 4], bx
call fcn.00401500
mov dword [esp + 0xc], 1
mov byte [esp + 0x34], bl
cmp dword [esp + 0x28], 8
jb 0x4043d6
mov eax, dword [esp + 0x14]
push eax
call fcn.0040a31e
add esp, 4
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], ebx
mov word [esp + 0x14], bx
mov eax, esi
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x2c
ret

Function at 0x404ad0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x41c
mov eax, dword [0x41b050]
xor eax, esp
mov dword [esp + 0x418], eax
push ebx
push esi
xor ebx, ebx
push 0x410
lea eax, [esp + 0x12]
push ebx
push eax
mov esi, ecx
mov word [esp + 0x18], bx
call fcn.0040c450
add esp, 0xc
lea ecx, [esp + 8]
push ecx
push 0x1a
push ebx
mov dword [esp + 0x14], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x404b31
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.00409fae
add esp, 0x41c
ret
mov eax, dword [esp + 8]
cmp eax, ebx
je 0x404b18
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x404b6c
lea eax, [esp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404b50
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x10]
push eax
call fcn.004015f0
mov bl, 1
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov ecx, dword [esp + 0x420]
pop esi
mov al, bl
pop ebx
xor ecx, esp
call fcn.00409fae
add esp, 0x41c
ret
Function at 0x4051d0
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x415011
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x41b050]
xor eax, esp
mov dword [esp + 0x118], eax
push ebx
push edi
mov eax, dword [0x41b050]
xor eax, esp
push eax
lea eax, [esp + 0x128]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
mov dword [esp + 0xc], edi
mov dword [edi + 0x104c], ebx
mov dword [edi + 0x1050], ebx
mov dword [edi + 0x1054], ebx
mov dword [esp + 0x130], ebx
push 0x410
push ebx
push edi
mov dword [edi + 0x103c], ebx
mov dword [edi + 0x1040], ebx
mov dword [edi + 0x1044], ebx
call fcn.0040c450
push 0x410
lea eax, [edi + 0x410]
push ebx
push eax
call fcn.0040c450
push 0x400
lea ecx, [edi + 0x820]
push ebx
push ecx
call fcn.0040c450
push 0x410
lea edx, [edi + 0xc20]
push ebx
push edx
call fcn.0040c450
push 0x110
lea eax, [esp + 0x48]
push ebx
push eax
mov byte [edi + 0x1030], bl
mov byte [edi + 0x1031], bl
mov dword [edi + 0x1034], ebx
mov byte [edi + 0x1032], bl
mov byte [edi + 0x1038], 1
mov byte [edi + 0x1058], bl
mov dword [esp + 0x4c], 0x114
call fcn.0040c450
add esp, 0x3c
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp eax, ebx
je 0x4052db
cmp dword [esp + 0x14], 6
jb 0x4052db
mov byte [edi + 0x1032], 1
call fcn.00406410
mov dword [esp + 0x130], 0xffffffff
mov eax, edi
mov ecx, dword [esp + 0x128]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.00409fae
add esp, 0x128
ret
Function at 0x406410
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x430
mov eax, dword [0x41b050]
xor eax, esp
mov dword [esp + 0x42c], eax
lea edx, [edi + 0xc20]
push ebx
mov eax, edx
push esi
mov byte [edi + 0x1058], 0
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406440
sub eax, esi
sar eax, 1
je 0x4065f4
lea esi, [edi + 0x1048]
push esi
push edx
call fcn.00406610
push 0x208
lea eax, [esp + 0x226]
push 0
push eax
mov word [esp + 0x22c], 0
call fcn.0040c450
add esp, 0xc
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x224]
mov ebx, 0x104
push edx
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
xor eax, eax
push 0x208
push eax
mov word [esp + 0x42e], ax
mov word [esp + 0x18], ax
lea eax, [esp + 0x1a]
push eax
call fcn.0040c450
add esp, 0xc
cmp dword [edi + 0x1044], 0
mov dword [esp + 8], ebx
jne 0x4064df
push str.AdvApi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi + 0x1044], eax
mov ecx, dword [edi + 0x1044]
push str.GetUserNameW
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x406501
lea edx, [esp + 8]
push edx
lea ecx, [esp + 0x14]
push ecx
call eax
mov eax, dword [esi + 4]
test eax, eax
mov word [esp + 0x216], 0
je 0x40659b
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x9ad70599
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40659b
mov eax, dword [esi + 4]
test eax, eax
je 0x406551
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x9ad70599
imul ecx
add edx, ecx
sar edx, 0xa
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x406556
call fcn.0040a917
mov ebx, dword [esi + 4]
cmp byte [ebx + 0x69c], 1
jne 0x40658f
lea edx, [esp + 0x220]
push edx
push ebx
call fcn.0040aca9
add esp, 8
test eax, eax
jne 0x40658f
lea eax, [esp + 0x10]
push eax
add ebx, 0x280
push ebx
call fcn.0040aca9
add esp, 8
test eax, eax
je 0x40659b
call fcn.00407850
mov byte [edi + 0x1058], 1
mov eax, dword [esi + 4]
test eax, eax
je 0x4065bc
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x9ad70599
imul ecx
add edx, ecx
sar edx, 0xa
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4065f4
lea eax, [esp + 0x10]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4065c3
sub eax, edx
sar eax, 1
push 1
add eax, 1
push eax
lea edx, [esp + 0x228]
push edx
push 0
mov edx, esi
lea ecx, [esp + 0x20]
call fcn.004061a0
mov byte [edi + 0x1058], 1
mov ecx, dword [esp + 0x434]
pop esi
pop ebx
xor ecx, esp
call fcn.00409fae
mov esp, ebp
pop ebp
ret
Function at 0x407400
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
sub esp, 0x850
mov eax, dword [0x41b050]
xor eax, esp
mov dword [esp + 0x84c], eax
mov eax, dword [esp + 0x854]
mov eax, dword [eax]
push ebx
xor ebx, ebx
cmp eax, ebx
je 0x407446
cmp byte [eax + 0x1038], bl
jne 0x407446
xor al, al
pop ebx
mov ecx, dword [esp + 0x84c]
xor ecx, esp
call fcn.00409fae
add esp, 0x850
ret 4
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push esi
push str.COMCTL32.DLL
mov dword [esp + 0x18], 8
mov dword [esp + 0x1c], 0xff
call ebp
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.InitCommonControlsEx
push eax
mov dword [esp + 0x18], eax
call esi
cmp eax, ebx
je 0x407482
lea ecx, [esp + 0x14]
push ecx
call eax
push str.User32.dll
call ebp
push str.MessageBoxW
push eax
mov dword [esp + 0x14], eax
call esi
cmp eax, ebx
je 0x4074a7
push ebx
push 0x417fcc
push 0x417fe0
push ebx
call eax
push edi
push 0x7fe
lea edx, [esp + 0x62]
push ebx
push edx
mov word [esp + 0x68], bx
call fcn.0040c450
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
add esp, 0xc
push 0x3fe
lea eax, [esp + 0x60]
push eax
push str._programfiles_Internet_Exploreriexplore.exe
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add eax, 0xffffffff
cmp eax, 0x3fd
ja 0x4074f7
lea ecx, [esp + 0x5c]
push ecx
call edi
cmp eax, 0xffffffff
je 0x4074f7
test al, 0x10
je 0x407545
push 0x3fe
lea edx, [esp + 0x60]
push edx
push str._programfiles_x86__Internet_Exploreriexplore.exe
call esi
add eax, 0xffffffff
cmp eax, 0x3fd
ja 0x407522
lea eax, [esp + 0x5c]
push eax
call edi
cmp eax, 0xffffffff
je 0x407522
test al, 0x10
je 0x407545
mov eax, dword [esp + 0x10]
cmp eax, ebx
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
je 0x407533
push eax
call esi
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40753e
push eax
call esi
xor al, al
jmp 0x4075ce
push 0x38
lea ecx, [esp + 0x28]
push ebx
push ecx
call fcn.0040c450
add esp, 0xc
lea edx, [esp + 0x5c]
push str.Shell32.dll
mov dword [esp + 0x24], 0x3c
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], str.http:__ie.2345.com
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], 1
mov dword [esp + 0x5c], ebx
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, eax
cmp esi, ebx
je 0x4075b6
push str.ShellExecuteExW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x4075b3
lea ecx, [esp + 0x20]
push ecx
call eax
push esi
call edi
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x4075c1
push eax
call edi
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x4075cc
push eax
call edi
mov al, 1
mov ecx, dword [esp + 0x85c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00409fae
add esp, 0x850
ret 4
Function at 0x409fae
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41b050]
jne 0x409fb8
repz ret
jmp fcn.0040b245

Function at 0x40df5e
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x41b808]
je 0x40df79
inc edi
cmp edi, 0x17
jb 0x40df6a
cmp edi, 0x17
jae 0x40e0f9
push ebp
push 3
call fcn.00412ed5
cmp eax, 1
pop ecx
je 0x40e0c5
push 3
call fcn.00412ed5
test eax, eax
pop ecx
jne 0x40dfad
cmp dword [0x41b04c], 1
je 0x40e0c5
cmp ebx, 0xfc
je 0x40e0f8
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x41c468
push ebp
call fcn.0040b734
add esp, 0xc
test eax, eax
je 0x40dfe3
push esi
push esi
push esi
push esi
push esi
call fcn.0040a7f7
add esp, 0x14
push 0x104
mov esi, 0x41c481
push esi
push 0
mov byte [0x41c585], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40e027
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0040b734
add esp, 0xc
test eax, eax
je 0x40e027
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040a7f7
add esp, 0x14
push esi
call fcn.0040ad40
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40e06c
push esi
call fcn.0040ad40
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x41c77c
push 0x416924
sub ecx, eax
push ecx
push eax
call fcn.00412576
add esp, 0x14
test eax, eax
je 0x40e06c
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0040a7f7
add esp, 0x14
jmp 0x40e06e
xor esi, esi
push 0x416920
push ebx
push ebp
call fcn.004124b5
add esp, 0xc
test eax, eax
je 0x40e08e
push esi
push esi
push esi
push esi
push esi
call fcn.0040a7f7
add esp, 0x14
push dword [edi*8 + 0x41b80c]
push ebx
push ebp
call fcn.004124b5
add esp, 0xc
test eax, eax
je 0x40e0b0
push esi
push esi
push esi
push esi
push esi
call fcn.0040a7f7
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.00412d18
add esp, 0xc
jmp 0x40e0f8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x40e0f8
cmp ebp, 0xffffffff
je 0x40e0f8
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x41b80c]
push dword [esi]
call fcn.0040ad40
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x412d18
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0040d625
xor ebx, ebx
cmp dword [0x41cb74], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x412dee
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x412ece
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x412ece
push eax
call fcn.0040d5b7
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x41cb74], eax
call esi
push eax
call fcn.0040d5b7
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x41cb78], eax
call esi
push eax
call fcn.0040d5b7
mov dword [0x41cb7c], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0040dceb
test eax, eax
pop ecx
pop ecx
je 0x412dbc
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040a7f7
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x412dee
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0040d5b7
cmp eax, ebx
pop ecx
mov dword [0x41cb84], eax
je 0x412dee
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040d5b7
pop ecx
mov dword [0x41cb80], eax
mov eax, dword [0x41cb80]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x412e73
cmp dword [0x41cb84], ecx
je 0x412e73
push eax
call fcn.0040d62e
push dword [0x41cb84]
mov esi, eax
call fcn.0040d62e
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x412e73
cmp edi, ebx
je 0x412e73
call esi
cmp eax, ebx
je 0x412e40
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x412e40
test byte [ebp - 0x18], 1
jne 0x412e73
lea eax, [ebp - 0x10]
push eax
call fcn.0040dd22
test eax, eax
pop ecx
je 0x412e5b
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040a7f7
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x412e6a
or dword [ebp + 0x10], 0x200000
jmp 0x412eae
or dword [ebp + 0x10], 0x40000
jmp 0x412eae
mov eax, dword [0x41cb78]
cmp eax, dword [ebp - 8]
je 0x412eae
push eax
call fcn.0040d62e
cmp eax, ebx
pop ecx
je 0x412eae
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x412eae
mov eax, dword [0x41cb7c]
cmp eax, dword [ebp - 8]
je 0x412eae
push eax
call fcn.0040d62e
cmp eax, ebx
pop ecx
je 0x412eae
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x41cb74]
call fcn.0040d62e
cmp eax, ebx
pop ecx
je 0x412ece
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x412ed0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402d40
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402d7d
xor eax, eax
mov al, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402d9d
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00405350
add esp, 0x210
pop esi
pop ebx
ret

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

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

Function at 0x4036cc
Capabilities:
Read file on windows

Disassembly:
push ebx
xor ecx, ecx
mov ebx, eax
mov cx, word [eax + 4]
sub ecx, 0xd7b1
je 0x4036e2
sub ecx, 2
jne 0x403704
push 0
mov eax, esp
push 0
push eax
push dword [ebx + 8]
push edx
push dword [ebx]
call sub.kernel32.dll_ReadFile
pop edx
dec eax
jne 0x40370b
cmp edx, dword [ebx + 8]
je 0x403715
mov eax, 0x64
jmp 0x403710
mov eax, 0x67
jmp 0x403710
call sub.kernel32.dll_GetLastError
call fcn.00402cb4
pop ebx
ret

Function at 0x403b8c
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, eax
movzx eax, word [eax + 4]
sub eax, 0xd7b2
cmp eax, 1
ja 0x403bbf
push 0
mov eax, esp
push 0
push eax
push dword [ebx + 8]
push edx
push dword [ebx]
call sub.kernel32.dll_WriteFile
pop edx
dec eax
jne 0x403bc6
cmp edx, dword [ebx + 8]
je 0x403bd0
mov eax, 0x65
jmp 0x403bcb
mov eax, 5
jmp 0x403bcb
call sub.kernel32.dll_GetLastError
call fcn.00402cb4
mov eax, ebx
pop ebx
ret

Function at 0x4041a0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x481024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x404238
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x404218
xor eax, eax
push ebp
push 0x404211
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 0x404254
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 0x404218
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x481024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x481024], ax
mov esp, ebp
pop ebp
ret
Function at 0x404f3c
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x48404c], 0
je 0x404f9d
cmp word [0x484220], 0xd7b2
jne 0x404f65
cmp dword [0x484228], 0
jbe 0x404f65
mov eax, 0x48421c
call dword [0x484238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x481094
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 0x404fc4
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x481034], 0
jne 0x404fb9
push 0
push 0x48108c
push 0x481094
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret