joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ad07eed
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x4ad33b38]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x20
mov dword [ebp - 4], eax
call fcn.4ad026a9
mov esi, eax
push esi
mov dword [esi], edi
call fcn.4ad07d5d
mov eax, dword [esi + 0x14]
mov ebx, dword [esi]
mov edi, dword [esi + 8]
push 0x208
mov dword [ebp - 0x210], eax
call fcn.4ad026a9
push 0
push eax
mov dword [0x4ad33aa8], eax
call fcn.4ad0234c
push 0x104
push ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.4ad02ec4
test eax, eax
jne 0x4ad0816b
mov ax, word [0x4ad34440]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.4ad026cd
and word [eax + 2], 0
lea eax, [ebp - 0x20c]
push eax
push 0x4ad34460
call dword [sym.imp.msvcrt.dll_wcscpy]
test edi, edi
pop ecx
pop ecx
jne 0x4ad080f6
push esi
call fcn.4ad07d5d
mov eax, dword [ebp - 0x210]
mov dword [esi + 0x14], eax
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.4ad01389
leave
ret 4
mov ax, word [edi]
cmp ax, 0x3a
je 0x4ad07f8a
cmp ax, word [0x4ad34440]
jne 0x4ad08129
cmp edi, ebx
je 0x4ad08167
push edi
push ebx
call fcn.4ad08178
mov ax, word [eax]
cmp ax, 0x3a
je 0x4ad08167
cmp ax, word [0x4ad34440]
je 0x4ad08167
mov ax, word [edi]
and word [edi], 0
push ebx
mov word [ebp - 0x214], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4ad17445
and dword [0x4ad2b9c4], 0
mov ax, word [ebp - 0x214]
mov word [edi], ax
cmp dword [0x4ad2b9c4], 0
je 0x4ad07f8a
jmp 0x4ad0816b
inc edi
inc edi
jmp 0x4ad08129
xor eax, eax
inc eax
jmp 0x4ad07f9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4ad2b9c4], eax
jmp 0x4ad0814e

Function at 0x4ad0872d
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x62c
mov eax, dword [0x4ad33b38]
push esi
lea ecx, [ebp - 0x41c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ecx
xor esi, esi
push eax
mov dword [0x4ad2b9c4], esi
call fcn.4ad087ed
test al, al
je 0x4ad087ce
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
lea eax, [ebp - 0x210]
push 0x4ad0300c
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
add esp, 0x10
push 0x106
lea eax, [ebp - 0x628]
push eax
push esi
lea eax, [ebp - 0x62c]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x4ad18aec
lea eax, [ebp - 0x628]
push 0x4ad087e0
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x4ad18ad8
xor al, al
mov ecx, dword [ebp - 4]
pop esi
call fcn.4ad01389
leave
ret 4
cmp dword [ebp - 0x62c], 0xc
jne 0x4ad087ce
mov al, 1
jmp 0x4ad087d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x90
mov dword [0x4ad2b9c4], eax
jne 0x4ad087ce
mov dword [0x4ad2b9c4], esi
jmp 0x4ad087ce
Function at 0x4ad0ad55
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x66c
mov eax, dword [0x4ad33b38]
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov dword [ebp - 4], eax
call fcn.4ad02f54
lea ecx, [ebp - 0x668]
push ecx
lea ecx, [ebp - 0x414]
push ecx
push 0x208
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov esi, eax
test esi, esi
je 0x4ad0adfc
push 4
lea eax, [ebp - 0x414]
push 0x4ad0ae0c
push eax
call dword [sym.imp.msvcrt.dll_wcsncmp]
add esp, 0xc
test eax, eax
je 0x4ad17c38
mov eax, dword [ebp - 0x668]
test eax, eax
je 0x4ad17cac
cmp word [eax], 0
je 0x4ad17cac
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x664]
push eax
push 0x37
lea eax, [ebp - 0x414]
push eax
call fcn.4ad02774
push dword [ebp - 0x66c]
movzx esi, al
call fcn.4ad03015
test esi, esi
je 0x4ad116b0
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.4ad01389
leave
ret 4
cmp word [ebp - 0x412], 0x5c
je 0x4ad17c8e
cmp word [ebp - 0x412], 0x3a
jne 0x4ad0adfc
cmp word [ebp - 0x410], 0x5c
jne 0x4ad0adfc
cmp word [ebp - 0x40e], si
jne 0x4ad0adfc
jmp 0x4ad17c8e
lea eax, [ebp - 0x40c]
push eax
push edi
mov dword [ebp - 0x668], eax
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x668], eax
je 0x4ad17c77
cmp eax, edi
jbe 0x4ad17c77
mov si, word [eax]
and word [eax], 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
mov eax, dword [ebp - 0x668]
mov word [eax], si
jmp 0x4ad17c80
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
mov eax, ecx
inc eax
neg eax
sbb eax, eax
and eax, ecx
jmp 0x4ad0adfe
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x4ad0adfc
xor esi, esi
inc esi
jmp 0x4ad0adfc
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
jmp 0x4ad0adfc
Function at 0x4ad0daa4
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0x1c]
test eax, eax
mov dword [ebp - 4], 0x1a
je 0x4ad16471
push esi
push edi
push eax
call fcn.4ad0db2d
test eax, eax
mov edi, dword [ebp + 0x14]
mov esi, dword [sym.imp.msvcrt.dll__get_osfhandle]
jne 0x4ad16478
mov eax, dword [ebp + 8]
test eax, eax
je 0x4ad0db16
test byte [eax + 0x18], 0x80
jne 0x4ad0db16
push edi
call fcn.4ad01538
test eax, eax
jne 0x4ad0db16
mov eax, dword [0x4ad33afc]
cmp eax, 3
je 0x4ad0db16
cmp dword [ebp + 0x18], 0
je 0x4ad0db16
cmp eax, 2
je 0x4ad0db16
push dword [ebp + 0x18]
push 0
push 0
push edi
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call fcn.4ad01925
inc dword [0x4ad33b20]
pop edi
pop esi
leave
ret 0x14
mov eax, ecx
jmp 0x4ad0dabf
push edi
call fcn.4ad01538
test eax, eax
jne 0x4ad0dad8
push eax
lea eax, [ebp + 0xc]
push eax
push 1
lea eax, [ebp - 4]
push eax
push edi
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4ad0dad8
Function at 0x4ad0dec6
Capabilities:
Delete file
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
xor edi, edi
push edi
push esi
push dword [ebp + 0x10]
mov dword [ebp - 4], edi
push dword [ebp + 0xc]
mov dword [0x4ad33ad8], edi
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x4ad1656a
mov edx, dword [esi]
cmp edx, edi
je 0x4ad1651d
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx + 0x18]
test ah, 0xc0
jne 0x4ad0df34
cmp edx, 2
jb 0x4ad0df2c
mov edx, dword [ebp + 0xc]
cmp word [edx], 0xfeff
je 0x4ad1653d
or eax, 0x8000
mov dword [ecx + 0x18], eax
mov ecx, dword [ecx + 0x18]
mov eax, 0x8002
xor ebx, ebx
and ecx, eax
inc ebx
cmp ecx, eax
je 0x4ad16547
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 0x1c
call ebx
cmp eax, 0x3e3
je 0x4ad1656a
mov edx, dword [esi]
cmp edx, edi
jne 0x4ad0df0e
mov dword [0x4ad2b9c4], edi
xor eax, eax
jmp 0x4ad0df4b
or eax, 0x4000
jmp 0x4ad0df31
mov edi, dword [esi]
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0xc]
push ebx
call fcn.4ad0edc8
cmp edi, dword [esi]
je 0x4ad0df49
mov dword [0x4ad33ad8], ebx
jmp 0x4ad0df49
call ebx
push dword [ebp + 8]
mov dword [0x4ad2b9c4], eax
call fcn.4ad01925
push dword [ebp + 0x1c]
call fcn.4ad01538
test eax, eax
push dword [ebp + 0x1c]
jne 0x4ad16598
call fcn.4ad01925
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4ad1659d
call fcn.4ad01925
push 1
push dword [0x4ad2b9c4]
call fcn.4ad1d903
int3
Function at 0x4ad11241
Capabilities:
Delete directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x288
mov eax, dword [0x4ad33b38]
push ebx
xor ebx, ebx
push edi
mov dword [ebp - 0x288], ebx
mov dword [ebp - 0x27c], ebx
mov word [ebp - 0x278], bx
mov word [ebp - 0x276], bx
mov dword [ebp - 4], eax
xor eax, eax
lea edi, [ebp - 0x274]
stosd dword es:[edi], eax
mov word [ebp - 0x270], bx
mov word [ebp - 0x26e], bx
mov ecx, dword [ebp + 8]
lea edi, [ebp - 0x26c]
stosd dword es:[edi], eax
mov word [ebp - 0x268], bx
mov word [ebp - 0x266], bx
lea edi, [ebp - 0x264]
stosd dword es:[edi], eax
mov word [ebp - 0x260], bx
mov word [ebp - 0x25e], bx
lea edi, [ebp - 0x25c]
stosd dword es:[edi], eax
mov word [ebp - 0x258], bx
mov word [ebp - 0x256], bx
lea edi, [ebp - 0x254]
stosd dword es:[edi], eax
mov word [ebp - 0x250], bx
mov word [ebp - 0x24e], bx
lea edi, [ebp - 0x24c]
stosd dword es:[edi], eax
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x240], ebx
mov byte [ebp - 0x23c], bl
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x230], ebx
lea edi, [ebp - 0x22c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [0x4ad2b9b0]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x288]
push eax
push ecx
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x284], 6
mov dword [ebp - 0x280], ebx
mov dword [ebp - 0x248], ebx
mov dword [ebp - 0x234], ebx
call fcn.4ad1100e
cmp eax, 1
je 0x4ad11418
push ebx
lea eax, [ebp - 0x210]
push eax
call fcn.4ad0234c
mov edi, dword [ebp - 0x248]
cmp edi, ebx
je 0x4ad182d6
push esi
lea esi, [ebp - 0x244]
mov eax, dword [esi]
cmp eax, ebx
je 0x4ad1141d
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
cmp eax, ebx
je 0x4ad1830f
dec edi
mov esi, dword [esi + 0xc]
jne 0x4ad11373
mov edi, dword [ebp - 0x288]
mov eax, dword [ebp - 0x248]
lea esi, [ebp - 0x244]
and edi, 0x10
mov dword [ebp - 0x218], eax
cmp edi, ebx
je 0x4ad18338
test byte [ebp - 0x287], 0x20
je 0x4ad182e8
lea eax, [ebp - 0x21c]
push eax
push dword [esi]
call fcn.4ad11429
cmp eax, ebx
jne 0x4ad18324
dec dword [ebp - 0x218]
mov esi, dword [esi + 0xc]
jne 0x4ad113ae
lea eax, [ebp - 0x210]
push eax
push 0x4ad34460
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push dword [ebp - 0x220]
call fcn.4ad01fe6
mov eax, dword [ebp - 0x214]
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.4ad01389
leave
ret 4
xor eax, eax
inc eax
jmp 0x4ad1140a
xor eax, eax
jmp 0x4ad11385
push ebx
push 0x232a
call fcn.4ad050c9
pop ecx
pop ecx
jmp 0x4ad11418
push 0x2328
push 0x234e
push dword [esi]
call fcn.4ad11c58
xor ecx, ecx
inc ecx
cmp eax, ecx
je 0x4ad113c3
mov dword [ebp - 0x214], ecx
jmp 0x4ad113d9
push ebx
push 0x232a
call fcn.4ad050c9
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x4ad11409
cmp eax, 0x91
jne 0x4ad1834e
cmp dword [ebp - 0x21c], ebx
jne 0x4ad1834e
jmp 0x4ad113d9
push dword [esi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4ad113d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push eax
mov dword [ebp - 0x214], eax
call fcn.4ad050c9
pop ecx
pop ecx
jmp 0x4ad113d9
Function at 0x40fb70
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xc000]
push edi
or ebp, 0xffffffff
jmp 0x40fb92
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x40fb99
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x40fb88
mov eax, 1
add ebx, ebx
jne 0x40fbab
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x40fba0
jne 0x40fbbc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x40fba0
xor ecx, ecx
sub eax, 3
jb 0x40fbd0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x40fc42
mov ebp, eax
add ebx, ebx
jne 0x40fbdb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x40fbe8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x40fc0c
inc ecx
add ebx, ebx
jne 0x40fbf8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x40fbed
jne 0x40fc09
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x40fbed
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x40fc2c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x40fc1d
jmp 0x40fb8e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x40fc2c
add edi, ecx
jmp 0x40fb8e
pop esi
mov edi, esi
mov ecx, 0x1e8
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x40fc4a
cmp byte [edi], 0
jne 0x40fc4a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x40fc4f
lea edi, [esi + 0xd000]
mov eax, dword [edi]
or eax, eax
je 0x40fcbe
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x104a0]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x10540]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40fc7c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x10544]
or eax, eax
je 0x40fcb8
mov dword [ebx], eax
add ebx, 4
jmp 0x40fc99
call dword [esi + 0x10554]
mov ebp, dword [esi + 0x10548]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x40fcf2
sub esp, 0xffffff80
jmp 0x406074
Function at 0x10001986
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword fs:[0x30]
push ebx
push esi
push edi
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x14], ecx
mov esi, dword [eax + 0xc]
jmp 0x10001a4f
mov edx, dword [esi + 0x18]
xor edi, edi
mov eax, dword [esi + 0x30]
mov ebx, dword [esi + 0x2c]
mov esi, dword [esi]
mov dword [ebp - 4], eax
mov eax, dword [edx + 0x3c]
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], esi
mov eax, dword [eax + edx + 0x78]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x10001a4f
shr ebx, 0x10
xor ecx, ecx
test ebx, ebx
je 0x10001a01
mov esi, dword [ebp - 4]
movsx edx, byte [esi + ecx]
ror edi, 0xd
cmp byte [esi + ecx], 0x61
mov dword [ebp - 4], edx
jl 0x100019f0
mov eax, edx
add eax, 0xffffffe0
add edi, eax
jmp 0x100019f3
add edi, dword [ebp - 4]
inc ecx
cmp ecx, ebx
jb 0x100019d7
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + edx + 0x18]
xor ebx, ebx
mov dword [ebp - 0x18], ecx
mov ecx, dword [eax + edx + 0x20]
add ecx, edx
cmp dword [eax + edx + 0x18], ebx
jbe 0x10001a4f
mov esi, dword [ecx]
xor eax, eax
add esi, edx
add ecx, 4
mov dword [ebp - 0x1c], ecx
mov edx, eax
mov cl, byte [esi]
ror edx, 0xd
movsx eax, cl
add edx, eax
inc esi
test cl, cl
jne 0x10001a24
mov esi, dword [ebp - 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
add eax, edi
cmp eax, dword [ebp - 0x14]
je 0x10001a60
mov ecx, dword [ebp - 0x1c]
inc ebx
cmp ebx, dword [ebp - 0x18]
jb 0x10001a16
cmp dword [esi + 0x18], 0
jne 0x100019a3
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp - 0x10]
mov eax, dword [esi + edx + 0x24]
lea eax, [eax + ebx*2]
movzx ecx, word [eax + edx]
mov eax, dword [esi + edx + 0x1c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + edx]
add eax, edx
jmp 0x10001a5b
Function at 0x10001a7c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x10015004]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x64
pop eax
push 0x73
mov word [ebp - 0x10], ax
pop eax
push 0x63
mov word [ebp - 0xe], ax
pop eax
push 0x69
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
xor eax, eax
mov word [ebp - 8], ax
lea eax, [ebp - 0x10]
push 0x10001be3
push eax
call dword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerW]
mov dword [0x100162ec], eax
test eax, eax
je 0x10001bd7
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov ebx, 0x100162f0
push edi
xor edi, edi
mov dword [0x100162f0], 0x10
push ebx
push eax
mov dword [0x10016308], edi
mov dword [0x100162f8], edi
mov dword [0x100162f4], 2
mov dword [0x100162fc], edi
mov dword [0x10016300], edi
mov dword [0x10016304], edi
call esi
test eax, eax
je 0x10001bd4
push edi
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x10015870], eax
test eax, eax
jne 0x10001b55
mov dword [0x100162f8], edi
inc edi
mov dword [0x100162f4], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push dword [0x100162ec]
mov dword [0x100162fc], eax
mov dword [0x10016304], edi
call esi
jmp 0x10001bd4
push ebx
push dword [0x100162ec]
mov dword [0x100162f8], 0x81
mov dword [0x100162f4], 4
mov dword [0x100162fc], edi
mov dword [0x10016304], edi
call esi
test eax, eax
je 0x10001bd4
push edi
push edi
push edi
push 0x10001c39
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x10001bd4
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [0x10015870]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push dword [0x100162ec]
mov dword [0x100162f8], edi
mov dword [0x100162f4], 1
mov dword [0x100162fc], edi
mov dword [0x10016304], 3
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10002a3a
leave
ret
Function at 0x10005d97
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10005dd6
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10005dd6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10005dd6
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10005dd6
cmp dword [ecx + 0x74], 0xe
jbe 0x10005dd6
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10008a5f
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x10008afc
push ebx
push esi
call fcn.10008a28
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.100089bc
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10008aa9
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10008afb
push edi
push eax
call fcn.10009a1a
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10008ac9
call fcn.10007504
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10008afa
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.100089bc
add esp, 0x20
test eax, eax
jne 0x10008ae8
push edi
call fcn.10007504
jmp 0x10008af0
push ebx
call fcn.10007504
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x10008d69
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10010508
push 0x10010500
push str.FlsAlloc
push 0x1f
call fcn.10008c85
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10008d9d
push dword [ebp + 8]
mov ecx, esi
call dword [0x1000f124]
call esi
jmp 0x10008da3
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10008de7
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10010518
push 0x10010510
push str.FlsGetValue
push 0x21
call fcn.10008c85
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10008e1e
push dword [ebp + 8]
mov ecx, esi
call dword [0x1000f124]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10008e26
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10010520
push 0x10010518
push str.FlsSetValue
push 0x22
call fcn.10008c85
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10008e60
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1000f124]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1000e4e0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1000e50d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1000e50d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x402d48
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 0x402d85
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 0x402da5
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00404ffc
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x402f84
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404d8c
test esi, esi
jne 0x402fbb
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.00404e7c
jmp 0x402fdc
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402e20
mov dword [esp], eax
test esi, esi
je 0x402fdc
cmp dword [ebx], 0
je 0x402fdc
dec esi
jmp 0x402fc3
add esp, 0x10c
pop esi
pop ebx
ret

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

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

Function at 0x403dc8
Capabilities:
Query or enumerate registry value

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

Function at 0x404b64
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4f104c], 0
je 0x404bc5
cmp word [0x4f1220], 0xd7b2
jne 0x404b8d
cmp dword [0x4f1228], 0
jbe 0x404b8d
mov eax, 0x4f121c
call dword [0x4f1238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4ea074
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 0x404bec
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4ea034], 0
jne 0x404be1
push 0
push 0x4ea06c
push 0x4ea074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x404d40
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.00402b48
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x4f104d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404d08
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc