joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100eae9
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [0x1034a9c]
push esi
xor esi, esi
cmp eax, esi
je 0x100eb6a
push eax
call fcn.0100ea1b
test eax, eax
je 0x100eb1d
push esi
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [0x1034a9c]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x100eb6a
mov eax, dword [ebp + 0xc]
push edi
add eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, esi
je 0x100eb69
mov eax, dword [ebp + 0xc]
push esi
push esi
lea ecx, [eax + eax]
push ecx
push edi
push eax
push dword [ebp + 8]
push esi
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp + 0xc], eax
cmp eax, esi
je 0x100eb62
push esi
lea ecx, [ebp + 0xc]
push ecx
push eax
push edi
push dword [0x1034a9c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
xor eax, eax
pop esi
pop ebp
ret 8

Function at 0x100fbb7
Capabilities:
Accept command line arguments

Disassembly:
push 0x10
mov eax, 0x1020e68
call fcn.0101b028
mov esi, ecx
mov dword [ebp - 0x18], esi
mov eax, dword [esi + 0x44]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
cmp dword [esi + 0x18], ebx
jne 0x100fc84
cmp dword [esi + 0x7c], 1
jle 0x100fc84
cmp eax, ebx
jne 0x100fc27
mov eax, dword [esi + 0x48]
cmp eax, ebx
jne 0x100fc02
cmp dword [esi + 0x24], ebx
jne 0x100fbfe
mov eax, dword [ebp + 8]
mov dword [eax], 0xc1500039
jmp 0x100fc1b
cmp eax, ebx
je 0x100fc0d
mov eax, dword [ebp + 8]
mov dword [eax], 0xc1500035
jmp 0x100fc1b
cmp dword [esi + 0x24], ebx
je 0x100fc1b
mov eax, dword [ebp + 8]
mov dword [eax], 0xc150000e
mov dword [ebp - 0x14], 0x80070667
jmp 0x100fcfc
mov ecx, dword [esi + 0x30]
cmp ecx, ebx
je 0x100fc48
cmp dword [esi + 0x24], ebx
jne 0x100fc48
mov eax, dword [ebp + 8]
mov dword [eax], 0xc1500012
mov dword [ebp - 0x14], 0x80070057
jmp 0x100fcfc
mov eax, dword [esi + 0x48]
cmp eax, ebx
je 0x100fc67
cmp ecx, ebx
je 0x100fc5e
mov eax, dword [ebp + 8]
mov dword [eax], 0xc1500019
jmp 0x100fc3c
cmp eax, ebx
je 0x100fc67
cmp dword [esi + 0x24], ebx
jne 0x100fc53
cmp dword [esi + 0x38], ebx
je 0x100fd2b
cmp dword [esi + 0x70], ebx
jne 0x100fd2b
mov eax, dword [ebp + 8]
mov dword [eax], 0xc1500032
jmp 0x100fc3c
lea edi, [esi + 0x14]
mov eax, dword [edi]
mov dword [esi + 0x18], 1
mov dword [ebp - 0x14], ebx
cmp dword [eax - 0xc], ebx
jne 0x100fd2b
push 0x3e8
lea eax, [ebp + 8]
push eax
push dword [0x10309f0]
call fcn.0101e17d
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x14], eax
jl 0x100fcfc
push dword [ebp + 8]
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.0100d601
push dword [ebp + 8]
mov ecx, dword [0x10309f0]
or dword [ebp - 4], 0xffffffff
call fcn.0101dc8f
cmp eax, ebx
mov dword [ebp - 0x14], eax
jge 0x100fd2b
jmp 0x100fcf7
cmp dword [ebp - 0x14], ebx
jge 0x100fd2b
cmp dword [esi + 0x6c], ebx
je 0x100fd2b
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push 0x10016a0
push 0x2022
mov edi, 0x1034aa0
push edi
call fcn.0101b56c
mov ecx, dword [esi + 0x6c]
add esp, 0x10
push edi
push 1
call fcn.01019121
mov eax, dword [ebp - 0x14]
call fcn.0101b0dc
ret 4
Function at 0x101182a
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1011841
xor eax, eax
jmp 0x1011855
test al, 0x10
jne 0x1011852
push 0x10b
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x101183d
xor eax, eax
inc eax
pop ebp
ret 4
Function at 0x1019270
Capabilities:
Get system information on windows

Disassembly:
push 0x148
mov eax, 0x1021c3e
call fcn.0101b063
mov dword [ebp - 0x128], ecx
push 0x1044e10
lea ecx, [ebp - 0x12c]
call fcn.0100c75d
push 9
pop ecx
xor eax, eax
mov esi, 0x114
xor ebx, ebx
lea edi, [ebp - 0x154]
push esi
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x124]
push ebx
push eax
mov dword [ebp - 4], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x154]
push eax
mov dword [ebp - 0x124], esi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
lea eax, [ebp - 0x12c]
push eax
movzx eax, word [ebp - 0x154]
push eax
call fcn.0101d3d3
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x1019342
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov edi, 0xffff
mov esi, 0x80070000
test eax, eax
jle 0x1019317
and eax, edi
or eax, esi
test eax, eax
jge 0x1019325
call ebx
test eax, eax
jle 0x101932a
and eax, edi
or eax, esi
jmp 0x101932a
mov eax, 0x80004005
mov esi, eax
mov ecx, dword [ebp - 0x12c]
add ecx, 0xfffffff0
call fcn.0100c3dc
mov eax, esi
call fcn.0101b0f5
ret
cmp dword [ebp - 0x128], ebx
je 0x10193e7
mov ebx, 0x100167c
push ebx
mov edi, 0x2022
push edi
mov esi, 0x1040d58
push esi
call fcn.0101b56c
mov ecx, dword [ebp - 0x128]
add esp, 0xc
push esi
push 3
call fcn.01019121
push 0x1005fd8
push edi
push esi
call fcn.0101b56c
mov ecx, dword [ebp - 0x128]
add esp, 0xc
push esi
push 3
call fcn.01019121
push ebx
push edi
push esi
call fcn.0101b56c
mov ecx, dword [ebp - 0x128]
add esp, 0xc
push esi
push 3
call fcn.01019121
push dword [ebp - 0x140]
push dword [ebp - 0x12c]
push dword [ebp - 0x118]
push dword [ebp - 0x11c]
push dword [ebp - 0x120]
push 0x1005f18
push edi
push esi
call fcn.0101b56c
mov ecx, dword [ebp - 0x128]
add esp, 0x20
push esi
push 3
call fcn.01019121
mov esi, dword [ebp - 0x130]
jmp 0x101932c

Function at 0x101a5bc
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x1028534]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
call fcn.0101a4fd
mov eax, 0x1000000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x98]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x88], 2
jne 0x101a62f
cmp dword [ebp - 0x94], 5
jb 0x101a650
jmp 0x101a64c
cmp dword [ebp - 0x88], 1
jne 0x101a650
cmp dword [ebp - 0x94], 4
ja 0x101a64c
jne 0x101a650
cmp dword [ebp - 0x90], 0
jbe 0x101a650
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x1006118
call fcn.0100c1b5
test eax, eax
jge 0x101a671
mov byte [0x10309d4], 1
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0101afdb
leave
ret
Function at 0x101ce02
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x1028534]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
xor eax, eax
push 0x206
xor edi, edi
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push edi
push 0x100629c
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x101ce6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x101ce68
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x101ce94
push edi
push 0x4000000
push 2
push edi
push edi
push 0xc0000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x101ce54
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.0101afdb
leave
ret 4
Function at 0x101d1bb
Capabilities:
Parse pe header
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x1028534]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
xor esi, esi
push esi
push 0x80
push 3
push esi
xor ebx, ebx
inc ebx
push ebx
push SysReAllocString
push eax
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x54], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4c], eax
cmp eax, 0xffffffff
jne 0x101d222
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jg 0x101d216
mov dword [ebp - 0x48], eax
jmp 0x101d366
and eax, 0xffff
or eax, 0x80070000
jmp 0x101d20e
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
lea ecx, [ebp - 0x54]
push ecx
push 0x40
lea ecx, [ebp - 0x44]
push ecx
push eax
call edi
test eax, eax
jne 0x101d247
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jg 0x101d297
jmp 0x101d2a1
mov eax, 0x5a4d
cmp word [ebp - 0x44], ax
jne 0x101d33f
push esi
push esi
push dword [ebp - 8]
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x101d276
call esi
test eax, eax
jmp 0x101d243
push 0
lea eax, [ebp - 0x54]
push eax
push 0xf8
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 0x4c]
call edi
test eax, eax
jne 0x101d2a9
call esi
test eax, eax
jle 0x101d2a1
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x48], eax
jmp 0x101d35c
cmp dword [ebp - 0x14c], 0x4550
push 6
pop edx
push 9
pop esi
jne 0x101d333
movzx eax, word [ebp - 0xf0]
sub eax, 5
je 0x101d330
dec eax
dec eax
je 0x101d32c
movzx ecx, word [ebp - 0x148]
mov eax, 0x1f0
cmp ecx, eax
jg 0x101d304
je 0x101d300
sub ecx, 0x14c
je 0x101d2fc
sub ecx, 0x16
je 0x101d2f8
sub ecx, 4
je 0x101d2f8
sub ecx, 0x1e
jne 0x101d31c
push 8
jmp 0x101d332
push 7
jmp 0x101d332
mov ebx, edx
jmp 0x101d333
mov ebx, esi
jmp 0x101d333
cmp ecx, 0x200
je 0x101d328
cmp ecx, 0x284
je 0x101d324
cmp ecx, 0x8664
je 0x101d320
xor ebx, ebx
jmp 0x101d333
push 0xc
jmp 0x101d332
push 0xa
jmp 0x101d332
push 0xb
jmp 0x101d332
push 4
jmp 0x101d332
push 5
pop ebx
sub ebx, edx
je 0x101d356
sub ebx, 5
je 0x101d34f
dec ebx
je 0x101d348
mov dword [ebp - 0x48], 0x80070057
jmp 0x101d35c
mov eax, dword [ebp - 0x50]
mov dword [eax], esi
jmp 0x101d35c
mov eax, dword [ebp - 0x50]
mov dword [eax], edx
jmp 0x101d35c
mov eax, dword [ebp - 0x50]
and dword [eax], 0
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x48]
pop esi
xor ecx, ebp
pop ebx
call fcn.0101afdb
leave
ret 8
Function at 0x101d601
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x1028534]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push 0x114
xor edi, edi
lea eax, [ebp - 0x118]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x101d664
cmp dword [ebp - 0x108], 2
jne 0x101d664
cmp dword [ebp - 0x114], 6
jne 0x101d664
cmp dword [ebp - 0x110], edi
jne 0x101d664
inc edi
mov ecx, dword [ebp - 4]
mov eax, edi
xor ecx, ebp
pop edi
call fcn.0101afdb
leave
ret

Function at 0x101d678
Capabilities:
Get system information on windows

Disassembly:
push 0x2c
mov eax, 0x1021f53
call fcn.0101aff0
push 0x1044e10
lea ecx, [ebp - 0x10]
call fcn.0100c75d
and dword [ebp - 4], 0
lea eax, [ebp - 0x38]
mov esi, 0xffff
push eax
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
push 0x1006308
push edi
call fcn.0101cfac
test eax, eax
jl 0x101d737
push dword [ebp - 0x10]
call fcn.01020236
test eax, eax
jne 0x101d6d0
mov esi, 0x8007007e
jmp 0x101d739
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
call fcn.0101d1bb
mov ebx, eax
test ebx, ebx
jge 0x101d6e6
mov esi, ebx
jmp 0x101d739
mov eax, dword [ebp - 0x14]
cmp eax, esi
jne 0x101d6f4
mov esi, 0x80004005
jmp 0x101d739
cmp word [ebp - 0x38], 9
je 0x101d729
cmp word [ebp - 0x38], 6
je 0x101d729
test eax, eax
je 0x101d729
cmp eax, 6
je 0x101d71f
cmp eax, 9
je 0x101d71f
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0100c3dc
mov eax, ebx
jmp 0x101d746
push dword [ebp + 0xc]
push 0x10062f4
jmp 0x101d731
push dword [ebp + 0xc]
push 0x10062e0
push edi
call fcn.0101cfac
mov esi, eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0100c3dc
mov eax, esi
call fcn.0101b0dc
ret 8
Function at 0x101d891
Capabilities:
Query environment variable

Disassembly:
push 0x10
mov eax, 0x1021f93
call fcn.0101b028
mov edi, dword [ebp + 8]
mov eax, dword [edi]
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], ecx
cmp dword [eax - 0xc], ecx
je 0x101d908
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ecx
push ecx
push eax
call esi
mov ebx, eax
test ebx, ebx
jne 0x101d8dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x101d8d7
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
jmp 0x101d917
push 0x1044eac
xor ecx, ecx
push 2
pop edx
lea eax, [ebx + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0101b20c
pop ecx
pop ecx
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x101d922
mov dword [ebp - 0x14], 0x8007000e
cmp dword [ebp - 0x18], 0
je 0x101d917
push dword [ebp - 0x18]
call fcn.0101a9b0
pop ecx
mov eax, dword [ebp - 0x14]
call fcn.0101b0dc
ret 4
mov eax, dword [edi]
push ebx
push dword [ebp - 0x18]
push eax
call esi
test eax, eax
jne 0x101d948
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x101d943
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
jmp 0x101d908
push dword [ebp - 0x18]
mov ecx, edi
call fcn.0100d601
jmp 0x101d908
Function at 0x101d965
Capabilities:
Get file version info

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov dword [ebp - 8], eax
mov edi, 0xffff
mov esi, 0x80070000
test eax, eax
jne 0x101d9c4
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
jle 0x101d9a7
and eax, edi
or eax, esi
test eax, eax
jge 0x101d9b7
call ebx
test eax, eax
jle 0x101d9b3
and eax, edi
or eax, esi
mov ebx, eax
jmp 0x101d9bc
mov ebx, 0x80004005
test ebx, ebx
jl 0x101daac
push dword [ebp - 8]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
test eax, eax
jne 0x101d9e7
mov ebx, 0x8007000e
jmp 0x101da94
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
jne 0x101da25
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
jle 0x101da0c
and eax, edi
or eax, esi
test eax, eax
jge 0x101da1c
call ebx
test eax, eax
jle 0x101da18
and eax, edi
or eax, esi
mov ebx, eax
jmp 0x101da21
mov ebx, 0x80004005
test ebx, ebx
jl 0x101da94
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x1006104
push dword [ebp - 4]
call sub.VERSION.dll_VerQueryValueW
test eax, eax
jne 0x101da69
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
jle 0x101da50
and eax, edi
or eax, esi
test eax, eax
jge 0x101da60
call ebx
test eax, eax
jle 0x101da5c
and eax, edi
or eax, esi
mov ebx, eax
jmp 0x101da65
mov ebx, 0x80004005
test ebx, ebx
jl 0x101da94
mov eax, dword [ebp - 0xc]
mov cx, word [eax + 0xa]
mov edx, dword [ebp + 0xc]
mov word [edx], cx
mov cx, word [eax + 8]
mov edx, dword [ebp + 0x10]
mov word [edx], cx
mov cx, word [eax + 0xe]
mov edx, dword [ebp + 0x14]
mov word [edx], cx
mov ax, word [eax + 0xc]
mov ecx, dword [ebp + 0x18]
mov word [ecx], ax
cmp dword [ebp - 4], 0
je 0x101daac
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x14
Function at 0x101de21
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
mov ecx, eax
and ecx, 0xf
mov dword [ebp + 0xc], ecx
mov ecx, dword [esi]
push edi
test ecx, ecx
jne 0x101de3f
mov ecx, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceExW]
shr eax, 4
inc eax
movzx ebx, ax
movzx eax, word [esi + 0xc]
push eax
push ebx
push 6
push ecx
call edi
test eax, eax
jne 0x101de73
mov eax, dword [esi]
test eax, eax
jne 0x101de64
mov eax, dword [esi + 4]
push 0x409
push ebx
push 6
push eax
call edi
test eax, eax
je 0x101de88
mov ecx, dword [esi]
test ecx, ecx
jne 0x101de7c
mov ecx, dword [esi + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x101deb4
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov edi, 0xffff
mov esi, 0x80070000
test eax, eax
jle 0x101dea4
and eax, edi
or eax, esi
test eax, eax
jge 0x101df00
call ebx
test eax, eax
jle 0x101deb0
and eax, edi
or eax, esi
mov esi, eax
jmp 0x101df2a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x101de88
mov eax, dword [ebp + 0xc]
test eax, eax
jbe 0x101ded2
dec eax
movzx ecx, word [esi]
lea esi, [esi + ecx*2 + 2]
jne 0x101dec8
movzx edi, word [esi]
push 0x1044eac
inc edi
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0101b20c
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x101df07
mov esi, 0x8007000e
jmp 0x101df2a
mov esi, 0x80004005
jmp 0x101df2a
movzx eax, word [esi]
push eax
add esi, 2
push esi
push edi
push ebx
call fcn.0101dd9e
mov esi, eax
test esi, esi
jge 0x101df25
push ebx
call fcn.0101a9b0
pop ecx
jmp 0x101df2a
mov eax, dword [ebp + 8]
mov dword [eax], ebx
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x101e932
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x1028534]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
xor edi, edi
cmp dword [0x1055338], edi
jne 0x101ea4e
push esi
mov esi, 0x11c
push esi
lea eax, [ebp - 0x120]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push eax
call esi
test eax, eax
jne 0x101e999
lea eax, [ebp - 0x120]
push eax
mov dword [ebp - 0x120], 0x114
call esi
mov eax, dword [ebp - 0x110]
dec eax
mov dword [0x1055338], edi
pop esi
je 0x101ea21
dec eax
jne 0x101ea4e
cmp dword [ebp - 0x11c], 5
jne 0x101ea0e
mov eax, dword [ebp - 0x118]
sub eax, edi
je 0x101ea02
dec eax
je 0x101e9ef
dec eax
je 0x101e9d5
mov dword [0x1055338], 0x14
jmp 0x101ea4e
cmp word [ebp - 0xc], 1
jb 0x101e9e6
mov dword [0x1055338], 0x10
or dword [0x1055338], 4
jmp 0x101ea4e
cmp word [ebp - 0xc], 2
jb 0x101e9e6
mov dword [0x1055338], 8
jmp 0x101e9e6
mov dword [0x1055338], 4
jmp 0x101ea4e
cmp dword [ebp - 0x11c], 4
ja 0x101ea60
mov dword [0x1055338], 2
cmp dword [ebp - 0x11c], 4
jne 0x101ea4e
cmp dword [ebp - 0x118], edi
je 0x101ea44
cmp dword [ebp - 0x118], 0xa
je 0x101ea44
cmp dword [ebp - 0x118], 0x5a
jne 0x101ea4e
mov dword [0x1055338], 1
mov ecx, dword [ebp - 4]
mov eax, dword [0x1055338]
xor ecx, ebp
pop edi
call fcn.0101afdb
leave
ret
mov dword [0x1055338], 0x20
jmp 0x101ea4e

Function at 0x101ea71
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x1028534]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x20
lea eax, [ebp - 0x44]
push eax
push 8
push 0x404
mov esi, 0xc04
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x101eac5
push 3
lea eax, [ebp - 0x44]
push 0x1006930
push eax
call sub.msvcrt.dll_wcsncmp
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
and esi, 0xfffff800
add esi, 0xc04
mov ecx, dword [ebp - 4]
mov ax, si
xor ecx, ebp
pop esi
call fcn.0101afdb
leave
ret
Function at 0x101eada
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x1028534]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
cmp ax, word [0x105533c]
jne 0x101eb75
push esi
lea eax, [ebp - 0x10]
push eax
push 1
xor esi, esi
push esi
push 0x1006860
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x14], 6
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x101eb74
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
push esi
push 0x1006918
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x10]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, esi
pop edi
jne 0x101eb74
push 3
push dword [esi*8 + 0x10066b0]
lea eax, [ebp - 0xc]
push eax
call sub.msvcrt.dll__wcsnicmp
add esp, 0xc
test eax, eax
je 0x101eb66
inc esi
cmp esi, 0x1c
jb 0x101eb45
jmp 0x101eb74
mov ax, word [esi*8 + 0x10066b4]
mov word [0x105533c], ax
pop esi
mov ecx, dword [ebp - 4]
mov ax, word [0x105533c]
xor ecx, ebp
call fcn.0101afdb
leave
ret
Function at 0x1020236
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push edi
xor edi, edi
xor ebx, ebx
cmp eax, edi
je 0x10202a5
xor ecx, ecx
cmp cx, word [eax]
je 0x10202a5
push esi
push edi
push eax
call fcn.01020034
mov esi, eax
test esi, esi
je 0x1020291
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1020277
test al, 0x10
je 0x1020272
push 2
pop edi
jmp 0x102027f
xor ebx, ebx
inc ebx
jmp 0x102027f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1020299
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
pop esi
jmp 0x10202af
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop ebx
pop ebp
ret 4

Function at 0x10202ba
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 4], edi
cmp eax, edi
jne 0x10202dc
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
leave
ret 0xc
push esi
cmp dword [ebp + 0xc], edi
je 0x102030d
lea ecx, [ebp - 4]
push ecx
push 0x20019
push edi
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10202ff
cmp dword [ebp - 4], edi
jne 0x1020310
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop esi
jmp 0x10202d7
mov dword [ebp - 4], eax
cmp dword [ebp + 0x10], edi
je 0x102032e
push edi
push edi
push edi
push edi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
neg esi
sbb esi, esi
inc esi
jmp 0x1020331
xor esi, esi
inc esi
cmp dword [ebp + 0xc], edi
je 0x1020301
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1020301
Function at 0x4027d4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov esi, edx
mov ebx, eax
test ebx, ebx
jne 0x402803
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA_1
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.00403698
jmp 0x402821
call sub.KERNEL32.DLL_GetCommandLineA
mov edi, eax
mov edx, esi
mov eax, edi
call fcn.00402708
mov edi, eax
test ebx, ebx
je 0x402821
cmp dword [esi], 0
je 0x402821
dec ebx
jmp 0x40280a
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

Disassembly:
imul edx, dword [0x44903c], 0x8088405
inc edx
mov dword [0x44903c], edx
mul edx
mov eax, edx
ret

Function at 0x402b28
Capabilities:
Query or enumerate registry value

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