joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4037ea
Capabilities:
Get common file path

Disassembly:
push ebx
mov eax, dword [esp + 0xc]
mov dword [0x40ce00], eax
xor eax, eax
push eax
push eax
mov eax, dword [0x40ce00]
push eax
push eax
push 0x104
call fcn.004057e0
lea ecx, [esp + 8]
pop edx
call fcn.00405000
lea eax, [esp]
push eax
push dword [esp + 0x14]
push 0
call sub.SHELL32.dll_SHGetSpecialFolderLocation
mov ebx, eax
and ebx, ebx
jne 0x4038b0
mov eax, dword [esp + 4]
push eax
push dword [esp + 4]
call sub.SHELL32.dll_SHGetPathFromIDListA
and eax, eax
je 0x4038b0
mov eax, dword [0x40ce00]
push eax
push eax
push 1
push dword [esp + 0x10]
call fcn.00405960
inc dword [0x40ce00]
mov edx, 0x40c047
pop ecx
mov dword [0x40ce00], ecx
add ecx, dword [0x40c0f8]
call fcn.00407fd0
jne 0x403898
mov edx, dword [esp + 4]
push dword [0x40ce00]
call fcn.00407f70
mov edx, 0x40c047
call fcn.00407f70
lea ecx, [esp + 8]
pop edx
call fcn.00405000
mov edx, dword [esp + 4]
push dword [0x40ce00]
call fcn.00407f70
pop eax
add eax, dword [0x40c0f8]
jmp 0x4038be
mov eax, dword [0x40ce00]
add eax, dword [0x40c0f8]
mov byte [eax], 0
push dword [esp + 4]
call fcn.00408000
add esp, 8
pop ebx
ret 4

Function at 0x40566a
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 9
call esi
test al, al
jns 0x4056d8
push 0x11
call esi
test al, al
js 0x4056d8
push 0x10
call esi
test al, al
js 0x4056d8
push 0x12
call esi
test al, al
js 0x4056d8
mov esi, dword [sym.imp.USER32.dll_GetFocus]
push 5
lea eax, [ebp - 8]
push eax
call esi
push eax
call dword [sym.imp.USER32.dll_GetClassNameA]
push 4
lea eax, [ebp - 8]
push str.Rich
push eax
call sub.MSVCRT.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x4056d8
push eax
push eax
push 0x44e
call esi
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
test ax, 0x800
je 0x4056fc
push str.PB_WindowID
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetPropA]
test eax, eax
je 0x4056fc
dec eax
push eax
push dword [0x40ce04]
call fcn.004078ce
mov eax, dword [eax + 0xc]
jmp 0x4056fe
xor eax, eax
pop esi
leave
ret 4

Function at 0x406056
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
je 0x40606e
push dword [esp + 4]
push 0x405fef
call dword [sym.imp.USER32.dll_EnumWindows]
jmp 0x4060ab
push esi
mov esi, dword [0x40cd58]
test esi, esi
je 0x4060aa
push ebx
push edi
mov ebx, dword [esi]
lea edi, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi], eax
jne 0x4060a2
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
push edi
push 0x40cd58
call fcn.00407a8a
pop ecx
pop ecx
test ebx, ebx
mov esi, ebx
jne 0x40607b
pop edi
pop ebx
pop esi
ret 4
Function at 0x406ab2
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x350
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
xor edi, edi
cmp esi, ebx
je 0x406c49
cmp byte [esi], bl
je 0x406c49
push 0x104
lea eax, [ebp - 0x108]
push esi
push eax
call sub.MSVCRT.dll_strncpy
push esi
mov byte [ebp - 4], bl
call sub.MSVCRT.dll_strlen
add esp, 0x10
cmp eax, ebx
je 0x406b11
cmp byte [eax + esi - 1], 0x5c
je 0x406b11
lea eax, [ebp - 0x108]
push 0x40b05c
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x350]
push eax
call sub.MSVCRT.dll_strcpy
mov eax, dword [ebp + 0xc]
cmp eax, ebx
pop ecx
pop ecx
je 0x406b31
cmp byte [eax], bl
jne 0x406b38
mov dword [ebp + 0xc], 0x40b058
push dword [ebp + 0xc]
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x406c49
mov ebx, dword [ebp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, pe_nt_image_headers32
lea eax, [ebp - 0x350]
push eax
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
test byte [ebp - 0x248], 0x10
je 0x406bee
test bl, 1
je 0x406c0a
lea eax, [ebp - 0x21c]
push 0x40b054
push eax
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
je 0x406c0a
lea eax, [ebp - 0x21c]
push 0x40b050
push eax
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
je 0x406c0a
push ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x108]
push eax
call fcn.00406ab2
jmp 0x406c0a
test bl, 2
je 0x406bfd
push edi
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x248]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x406b77
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
test bl, 2
je 0x406c3a
push edi
lea eax, [ebp - 0x350]
push eax
call esi
lea eax, [ebp - 0x350]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x406c52
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x248
push esi
or esi, 0xffffffff
test eax, eax
push edi
mov edi, esi
je 0x406d63
cmp byte [eax], 0
je 0x406d63
push 0x104
push eax
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strncpy
lea eax, [ebp - 0x108]
push eax
mov byte [ebp - 4], 0
call sub.MSVCRT.dll_strlen
add esp, 0x10
cmp eax, 2
lea ecx, [ebp + eax - 0x109]
je 0x406cac
cmp eax, 3
jne 0x406ce9
cmp byte [ebp - 0x107], 0x3a
jne 0x406ce9
cmp eax, 2
jne 0x406ccd
lea eax, [ebp - 0x108]
push 0x40b05c
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 1
jbe 0x406d63
jmp 0x406d5d
mov byte [ecx], 0
dec ecx
cmp byte [ecx], 0x5c
je 0x406ce5
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x406d35
test byte [ebp - 0x248], 0x10
je 0x406d18
push 0xfffffffffffffffe
pop edi
or esi, 0xffffffff
jmp 0x406d2c
mov ecx, dword [ebp - 0x228]
mov esi, dword [ebp - 0x22c]
xor edi, edi
xor edx, edx
or edi, ecx
or esi, edx
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x406d63
cmp byte [ebp - 0x108], 0x5c
jne 0x406d63
cmp byte [ebp - 0x107], 0x5c
jne 0x406d63
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406d63
test al, 0x10
je 0x406d63
push 0xfffffffffffffffe
or esi, 0xffffffff
pop edi
mov eax, edi
pop edi
mov edx, esi
pop esi
leave
ret 4

Function at 0x406d6d
Capabilities:
Copy file

Disassembly:
xor eax, eax
cmp dword [esp + 4], eax
je 0x406d8c
cmp dword [esp + 8], eax
je 0x406d8c
push eax
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
jmp 0x406d8e
xor eax, eax
ret 8

Function at 0x406d91
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
cmp dword [ebp + 8], 0
je 0x406e04
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strncpy
lea eax, [ebp - 0x108]
push eax
mov byte [ebp - 4], 0
call sub.MSVCRT.dll_strlen
add esp, 0x10
lea eax, [ebp + eax - 0x108]
jmp 0x406de6
lea ecx, [eax - 1]
mov dl, byte [ecx]
cmp dl, 0x20
je 0x406de4
cmp dl, 0x5c
je 0x406de4
cmp dl, 0x2f
jne 0x406df0
mov eax, ecx
lea ecx, [ebp - 0x108]
cmp eax, ecx
ja 0x406dd0
mov byte [eax], 0
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x406e06
xor eax, eax
leave
ret 4
Function at 0x406e83
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
cmp dword [0x40cdfc], ebx
jne 0x406eb1
push 0x406e56
push 0x10
push 0x148
call fcn.0040792f
mov dword [0x40cdfc], eax
mov esi, dword [ebp + 0xc]
cmp esi, ebx
jne 0x406ebd
mov esi, 0x40b04f
push 0x104
lea eax, [ebp - 0x108]
push esi
push eax
call sub.MSVCRT.dll_strncpy
push esi
mov byte [ebp - 4], bl
call sub.MSVCRT.dll_strlen
add esp, 0x10
cmp eax, ebx
je 0x406ef9
cmp byte [eax + esi - 1], 0x5c
je 0x406ef9
lea eax, [ebp - 0x108]
push 0x40b05c
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x406f04
cmp byte [eax], bl
jne 0x406f09
mov eax, 0x40b058
push eax
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
push dword [ebp + 8]
push dword [0x40cdfc]
call fcn.0040786a
mov esi, eax
lea eax, [esi + 8]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x406f45
mov dword [esi + 4], ebx
jmp 0x406f57
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x406f5b
mov dword [esi + 4], 1
mov edi, esi
jmp 0x406f6f
cmp dword [ebp + 8], 0xffffffff
jne 0x406f6d
push esi
push dword [0x40cdfc]
call fcn.004078f9
mov dword [esi], ebx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x406fc0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
xor eax, eax
cmp dword [esi + 0x14], eax
mov dword [esp + 4], eax
jne 0x406ff5
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 8]
mov eax, dword [esp + 4]
mov dword [esi + 0xc], ecx
pop esi
pop ecx
ret 4
Function at 0x407280
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x14]
push ebx
push ebp
push edi
push eax
push 0x1000
mov dword [esp + 0x1c], 0x1000
call fcn.004081b0
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x40ce5c]
push ecx
mov edi, eax
push edx
mov ebp, edi
call fcn.004078ce
mov ebx, eax
test ebx, ebx
je 0x40739e
push esi
lea ecx, [ecx]
mov byte [esp + 0x13], 0
cmp dword [ebx + 4], 0
je 0x4072de
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00407650
mov dword [esp + 0x14], eax
jmp 0x4072f5
mov eax, dword [ebx]
push 0
lea ecx, [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x1f]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov al, byte [esp + 0x13]
test al, al
je 0x407307
mov byte [ebp], al
mov al, byte [esp + 0x13]
add ebp, 1
mov ecx, dword [esp + 0x18]
mov esi, ebp
sub esi, edi
cmp esi, ecx
jl 0x407331
mov edx, dword [esp + 0x24]
add ecx, 0x1000
push edx
push ecx
mov dword [esp + 0x20], ecx
call fcn.004081b0
mov edi, eax
mov al, byte [esp + 0x13]
lea ebp, [esi + edi]
test al, al
je 0x40739d
cmp dword [esp + 0x14], 0
je 0x407348
cmp al, 0xd
je 0x407348
cmp al, 0xa
jne 0x4072c0
sub ebp, 1
cmp al, 0xd
jne 0x40739d
cmp dword [ebx + 4], 0
je 0x407364
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00407650
jmp 0x40737b
mov eax, dword [ebx]
push 0
lea ecx, [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x1f]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x40739d
cmp dword [ebx + 4], 0
je 0x40738e
add dword [ebx + 0xc], 1
jmp 0x40739d
mov ecx, dword [ebx]
push 1
push 0
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop esi
sub edi, ebp
add edi, dword [esp + 0x14]
mov byte [ebp], 0
push edi
call fcn.004082e0
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 8

Function at 0x4073c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
mov ecx, dword [0x40ce5c]
push esi
push eax
push ecx
mov dword [esp + 0xc], 0
call fcn.004078ce
mov esi, eax
test esi, esi
je 0x407444
cmp dword [esi + 4], 0
je 0x407413
push 1
lea edx, [esp + 8]
push edx
push esi
call fcn.00407650
test eax, eax
je 0x407407
add dword [esi + 0xc], 1
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
mov edx, dword [esi]
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40744f
cmp dword [esp + 8], 0
je 0x40744f
mov eax, dword [esi]
push 1
push 0
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4
Function at 0x407460
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x40ce5c]
push eax
push ecx
mov dword [esp + 8], 0
call fcn.004078ce
test eax, eax
je 0x4074b2
cmp dword [eax + 4], 0
je 0x407498
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push edx
push ecx
push eax
call fcn.00407650
pop ecx
ret 0xc
mov ecx, dword [esp + 0x10]
mov eax, dword [eax]
push 0
lea edx, [esp + 4]
push edx
mov edx, dword [esp + 0x14]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp]
pop ecx
ret 0xc

Function at 0x4074c0
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0x10]
xor eax, eax
test edi, edi
mov dword [esp + 4], eax
je 0x407519
push esi
mov esi, dword [esp + 0x18]
test esi, esi
je 0x407518
mov eax, dword [esp + 0x10]
mov ecx, dword [0x40ce5c]
push eax
push ecx
call fcn.004078ce
test eax, eax
je 0x407514
cmp dword [eax + 4], 0
je 0x407502
push esi
push edi
push eax
call fcn.00407780
pop esi
pop edi
pop ecx
ret 0xc
mov eax, dword [eax]
push 0
lea edx, [esp + 0xc]
push edx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop esi
pop edi
pop ecx
ret 0xc

Function at 0x4075c0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x40ce5c]
push eax
push ecx
mov dword [esp + 8], 0
call fcn.004078ce
test eax, eax
je 0x40760a
cmp dword [eax + 4], 0
lea edx, [esp]
je 0x4075f7
push 4
push edx
push eax
call fcn.00407650
mov eax, dword [esp]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp]
pop ecx
ret 4
Function at 0x407650
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 0
push edi
jne 0x407671
push esi
call fcn.00406fc0
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ebx, edi
jl 0x4076ea
mov eax, dword [esi + 0x10]
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
sub ecx, 1
je 0x4076d7
sub ecx, 1
je 0x4076c2
sub ecx, 2
je 0x4076af
push edi
push eax
mov eax, dword [esp + 0x1c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov edx, dword [esp + 0x14]
mov dword [edx], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ax, word [eax]
mov ecx, dword [esp + 0x14]
mov word [ecx], ax
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov dl, byte [eax]
mov eax, dword [esp + 0x14]
mov byte [eax], dl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esi + 0x10]
push ebp
mov ebp, dword [esp + 0x18]
sub ecx, ebx
add ecx, dword [esi + 4]
push ebx
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
cmp edi, eax
push 0
jl 0x407733
mov eax, dword [esi]
lea edx, [esp + 0x18]
push edx
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
pop esi
add eax, ebx
pop ebx
ret 0xc
mov edx, dword [esi + 4]
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp edi, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jle 0x407756
mov edi, eax
mov ecx, dword [esi + 4]
push edi
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
add esp, 0xc
pop ebp
lea eax, [ebx + edi]
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x407780
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 1
push edi
mov dword [esp + 8], 0
jne 0x4077a2
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ecx, edi
jle 0x40781b
mov eax, dword [esi + 8]
add eax, dword [esi + 4]
sub eax, ecx
mov ecx, edi
sub ecx, 1
je 0x407808
sub ecx, 1
je 0x4077f3
sub ecx, 2
je 0x4077e0
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov dword [eax], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cx, word [edx]
mov word [eax], cx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [edx]
mov byte [eax], cl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
push esi
call fcn.00406fc0
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x407848
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push 0
lea edx, [esp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x14]
push edi
push edx
add ecx, eax
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
Function at 0x402d78
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x4031d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x475024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403268
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403248
xor eax, eax
push ebp
push 0x403241
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 0x403284
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 0x403248
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x475024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x475024], ax
mov esp, ebp
pop ebp
ret

Function at 0x403f34
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x47704c], 0
je 0x403f95
cmp word [0x477220], 0xd7b2
jne 0x403f5d
cmp dword [0x477228], 0
jbe 0x403f5d
mov eax, 0x47721c
call dword [0x477238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x475070
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 0x403fbc
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x475034], 0
jne 0x403fb1
push 0
push 0x475068
push 0x475070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4040e8
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.0040277c
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x47704d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x4040b0
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x405f88
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x405fee
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.004043a4
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402d94
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x405fd8
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405ff5
lea eax, [ebp - 0x10]
call fcn.00404134
ret

Function at 0x40b38c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40b3c5
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404224
jmp 0x40b3ce
mov eax, ebx
mov edx, esi
call fcn.00404188
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40b3d8
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40b3f9
mov al, byte [esp]
jmp 0x40b3fb
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40ba80
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40b8f8
mov eax, dword [0x476ac8]
cmp byte [eax], 0
je 0x40bafc
mov eax, dword [0x4767b4]
call fcn.00402be4
call fcn.004028e4
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.00408ac4
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40bb44
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40bb32
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x476740]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x477668]
call fcn.00405480
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret