joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1094e058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1094e1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x1094e07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1094e06a
add dl, dl
jne 0x1094e089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1094e0dc
xor eax, eax
add dl, dl
jne 0x1094e096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1094e17d
add dl, dl
jne 0x1094e0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1094e0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1094e0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1094e0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x1094e0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x1094e075
mov eax, 1
add dl, dl
jne 0x1094e0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1094e0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1094e0e1
sub eax, ebx
mov ebx, 1
jne 0x1094e128
mov ecx, 1
add dl, dl
jne 0x1094e10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1094e119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1094e105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1094e075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1094e13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1094e14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1094e136
cmp eax, 0x7d00
jae 0x1094e16d
cmp eax, 0x500
jb 0x1094e168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1094e075
cmp eax, 0x7f
ja 0x1094e170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1094e075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x1094e19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x1094e075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x402e8d
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ecx + 0x10]
push edi
cmp esi, 0x40
jb 0x402eeb
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x402eeb
mov edx, dword [ecx + 0x3c]
lea eax, [edx + 0xf8]
cmp esi, eax
jb 0x402eeb
cmp dword [edx + ecx], 0x4550
jne 0x402eeb
movzx eax, word [edx + ecx + 4]
mov edi, 0x14c
cmp ax, di
je 0x402ed6
mov edi, 0x8664
cmp ax, di
je 0x402eeb
lea eax, [ecx + 0x98]
add eax, edx
mov ecx, dword [eax]
test ecx, ecx
je 0x402eeb
add ecx, 0xc
cmp esi, ecx
jae 0x402eed
xor eax, eax
pop edi
pop esi
pop ebp
ret 4

Function at 0x40e1af
Capabilities:
Encode data using xor

Disassembly:
fchs
scasb al, byte es:[edi]
invalid
sub ah, byte [ebp - 0x7b4943c3]
mov ah, 0x5c
cld
sbb dword [esi + 0x18], edi
cld
xchg ebx, eax
in al, dx
mov ecx, 0xb8fe2e3f
aam 0x9f
xchg cl, dl
lahf
jo 0x40e186
jns 0x40e1eb
xchg edx, eax
mov edx, 0xd892e715
and al, bl
ret
fsub dword [edx]
ret
xchg edi, eax
push edx
sub edx, ecx
sub eax, 0xc5f927c5
pop edx
outsb dx, byte [esi]
pop edi
dec eax
jle 0x40e1d1
mov ah, 0x92
and ecx, ebp
sbb eax, 0xf7c7f258
inc esi
and esp, dword [ecx]
aas
push 0xc2aafe7c
aas
or al, 0xa5
daa
daa
mov ebx, 0xaf577dc8
int3
Function at 0x41304a
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea eax, [ebp - 4]
push eax
push 0x414c30
push 1
xor ebx, ebx
push ebx
push 0x414ce0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x41311b
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
lea edx, [ebp - 8]
push edx
push 0x414cd0
push eax
call dword [ecx]
test eax, eax
jl 0x413112
cmp byte [ebp + 8], bl
je 0x41309d
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push 2
push dword [ebp + 0x10]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
cmp dword [ebp + 0x18], ebx
je 0x4130ba
mov eax, dword [ebp - 4]
push dword [ebp + 0x18]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ebx
cmp dword [ebp + 0x1c], ebx
jne 0x4130cc
push 0x41437c
jmp 0x4130cf
push dword [ebp + 0x1c]
push eax
call dword [ecx + 0x44]
cmp dword [ebp + 0x20], ebx
je 0x4130e4
mov eax, dword [ebp - 4]
push dword [ebp + 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
cmp dword [ebp + 0x14], ebx
je 0x4130f5
mov eax, dword [ebp - 4]
push dword [ebp + 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push 1
push dword [ebp + 0x10]
push eax
call dword [ecx + 0x18]
test eax, eax
jl 0x413109
mov bl, 1
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov al, bl
pop ebx
leave
ret 0x1c

Function at 0x413135
Capabilities:
Get common file path

Disassembly:
push dword [esp + 4]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
neg eax
sbb eax, eax
neg eax
ret 8

Function at 0x421740
Capabilities:
Encode data using xor

Disassembly:
xor dl, dl
mov dl, byte [edi]
xor dl, bl
mov byte [edi], dl
inc edi
cmp edi, ecx
jne fcn.00421740
ret
Function at 0x405cc0
Capabilities:
Check os version
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x140
mov eax, dword [0x4bf004]
xor eax, esp
mov dword [esp + 0x13c], eax
push esi
mov esi, ecx
push 0x118
push 0
lea eax, [esi + 4]
push eax
call fcn.00468d80
add esp, 0xc
mov dword [esi], 0x11c
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x405e02
cmp dword [esi + 4], 6
push edi
ja 0x405d16
jne 0x405d9e
cmp dword [esi + 8], 2
jb 0x405d9e
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
test edi, edi
je 0x405d9e
push 0x10
push 1
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x405d9e
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x405d9e
movups xmm0, xmmword [0x4abf84]
push eax
movups xmmword [esp + 0x128], xmm0
movups xmm0, xmmword [0x4abf94]
movups xmmword [esp + 0x138], xmm0
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x405d9e
lea eax, [esp + 0x124]
push eax
lea ecx, [edi + 6]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x405d9e
cmp word [edi + 2], ax
jbe 0x405d9e
movzx edx, word [edi + 0x32]
movzx ecx, word [edi + 0x30]
movzx eax, word [edi + 0x36]
mov dword [esi + 4], edx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], eax
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.RtlGetVersion
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x405de9
push 0x118
lea eax, [esp + 0x10]
push 0
push eax
call fcn.00468d80
add esp, 0xc
mov dword [esp + 8], 0x11c
lea eax, [esp + 8]
push eax
call edi
test eax, eax
jne 0x405de9
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
pop edi
mov al, 1
pop esi
mov ecx, dword [esp + 0x13c]
xor ecx, esp
call fcn.00466f87
add esp, 0x140
ret
mov ecx, dword [esp + 0x140]
xor al, al
pop esi
xor ecx, esp
call fcn.00466f87
add esp, 0x140
ret
Function at 0x42c9a0
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x174
mov eax, dword [0x4bf004]
xor eax, esp
mov dword [esp + 0x170], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x18]
push 0x118
mov dword [esp + 0x18], eax
lea eax, [esp + 0x60]
push 0
push eax
mov dword [esp + 0x64], 0x11c
call fcn.00468d80
add esp, 0xc
lea ecx, [esp + 0x58]
call fcn.00405cc0
test al, al
je 0x42ca5e
push dword [esp + 0x60]
push dword [esp + 0x60]
push str._u._u
push esi
call fcn.004065f0
call fcn.00405c30
test al, al
mov edx, 0x40
mov ecx, 0x20
cmovne ecx, edx
push ecx
push 0x4aca9c
push edi
call fcn.004065f0
lea edx, [esp + 0x88]
add esp, 0x1c
lea ecx, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x42ca40
sub edx, ecx
lea eax, [esp + 0x6c]
mov ecx, dword [esp + 0x10]
sar edx, 1
push edx
push eax
call fcn.004042d0
push 0x40
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.00468d80
add esp, 0xc
mov dword [esp + 0x18], 0x40
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
shrd ecx, eax, 0x14
shr eax, 0x14
push eax
push ecx
push 0x4aca9c
push dword [esp + 0x20]
call fcn.004065f0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push 0x4aca9c
push ebx
call fcn.004065f0
mov ecx, dword [esp + 0x188]
add esp, 0xc
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00466f87
mov esp, ebp
pop ebp
ret 0x14
Function at 0x43dc10
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48e468
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4bf004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
push ecx
lea ecx, [ebp - 0x28]
call fcn.00408230
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.00406370
cmp dword [ebp - 0x18], 2
jbe 0x43dd19
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
cmp ecx, 8
cmovae eax, edx
cmp word [eax], 0x5c
jne 0x43dc8a
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax + 2], 0x5c
jne 0x43dc8a
mov bl, 1
jmp 0x43dd82
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax], 0x2f
jne 0x43dcad
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax + 2], 0x2f
je 0x43dd80
push 0x5c
mov edx, 0x2f
lea ecx, [ebp - 0x28]
call fcn.004061e0
mov edx, dword [ebp - 0x28]
mov eax, ecx
mov ecx, dword [ebp - 0x14]
add esp, 4
cmp ecx, 8
cmovae eax, edx
cmp word [eax + 2], 0x3a
jne 0x43dd80
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax + 4], 0x5c
jne 0x43dd80
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax], 0x61
jb 0x43dd80
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax], 0x7a
ja 0x43dd80
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
jmp 0x43dd69
jne 0x43dd80
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
cmp ecx, 8
cmovae eax, edx
cmp word [eax + 2], 0x3a
jne 0x43dd80
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax], 0x61
jb 0x43dd80
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax], 0x7a
ja 0x43dd80
push 1
push 0x4ac008
lea ecx, [ebp - 0x28]
call fcn.00408400
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x43dd80
shr eax, 4
mov bl, 1
and al, 1
mov byte [esi], al
jmp 0x43dd82
xor bl, bl
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x43ddbf
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x43ddb5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x43ddf0
push edx
push ecx
call fcn.00466f79
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov al, bl
mov dword [ebp - 0x14], 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00466f87
mov esp, ebp
pop ebp
ret
call fcn.0046adba
int3
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x422008]
jne 0x40100a
repz ret
jmp fcn.004016a1

Function at 0x406a84
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00403de3
and dword [ebp - 4], 0
cmp dword [0x423de4], 0
mov ebx, eax
jne 0x406b35
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x406be6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x406be6
push eax
call fcn.00403d71
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x423de4], eax
call esi
push eax
call fcn.00403d71
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x423de8], eax
call esi
push eax
call fcn.00403d71
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x423dec], eax
call esi
push eax
call fcn.00403d71
pop ecx
mov dword [0x423df4], eax
test eax, eax
je 0x406b35
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00403d71
pop ecx
mov dword [0x423df0], eax
mov eax, dword [0x423df0]
cmp eax, ebx
je 0x406b8d
cmp dword [0x423df4], ebx
je 0x406b8d
push eax
call fcn.00403dec
push dword [0x423df4]
mov esi, eax
call fcn.00403dec
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x406b8d
test edi, edi
je 0x406b8d
call esi
test eax, eax
je 0x406b84
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x406b84
test byte [ebp - 0xc], 1
jne 0x406b8d
or dword [ebp + 0x10], 0x200000
jmp 0x406bc6
mov eax, dword [0x423de8]
cmp eax, ebx
je 0x406bc6
push eax
call fcn.00403dec
pop ecx
test eax, eax
je 0x406bc6
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x406bc6
mov eax, dword [0x423dec]
cmp eax, ebx
je 0x406bc6
push eax
call fcn.00403dec
pop ecx
test eax, eax
je 0x406bc6
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x423de4]
call fcn.00403dec
pop ecx
test eax, eax
je 0x406be6
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x406be8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41e2f0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0xc04
mov eax, dword [0x422008]
xor eax, esp
mov dword [esp + 0xc00], eax
mov eax, dword [0x423000]
push ebx
mov ebx, dword [0x80971c]
push esi
mov esi, dword [0x8098d4]
push eax
call fcn.0041e1d0
add esp, 4
cmp dword [0x8098d4], 0x2f
jne 0x41e32f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push esi
call fcn.0041e240
add esp, 4
cmp dword [0x8098d4], 0x568
pop esi
pop ebx
jne 0x41e367
push 0
push 0
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesA]
push 0
lea edx, [esp + 0x404]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
mov ecx, dword [esp + 0xc00]
xor ecx, esp
call fcn.00401000
add esp, 0xc04
ret
Function at 0x10021d6
Capabilities:
Delete file
Delete registry value
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor esi, esi
cmp dword [ebp + 8], esi
push edi
mov dword [ebp - 4], esi
je 0x100226d
mov ebx, dword [ebp + 0xc]
cmp ebx, esi
je 0x100226d
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov eax, dword [ebp + 0x10]
push esi
push esi
push esi
push esi
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
push eax
push ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, esi
je 0x100221c
cmp eax, 0x103
jne 0x1002238
cmp eax, 0x103
je 0x100223b
push ebx
push dword [ebp + 8]
call edi
cmp dword [ebp + 0x14], 1
jne 0x10021f8
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x10021f8
push eax
jmp 0x100226f
lea eax, [ebp - 4]
push eax
push 0xf003f
push esi
push 0x1001470
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1002275
mov eax, dword [ebp + 0x14]
lea eax, [eax + eax*2]
push dword [eax*8 + 0x1008004]
push dword [ebp - 4]
call edi
jmp 0x1002275
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 4], esi
pop edi
pop esi
pop ebx
je 0x1002286
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret 0x10
Function at 0x1002bfd
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x10015c8
call fcn.01002db4
mov edi, 0x94
mov eax, edi
call fcn.01003c00
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x1008934], ecx
mov eax, dword [esi + 4]
mov dword [0x1008940], eax
mov edx, dword [esi + 8]
mov dword [0x1008944], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x1008938], esi
cmp ecx, 2
je 0x1002c5d
or esi, 0x8000
mov dword [0x1008938], esi
shl eax, 8
add eax, edx
mov dword [0x100893c], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x1002c96
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1002c96
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x1002cae
cmp eax, 0x20b
je 0x1002c9b
mov dword [ebp - 0x1c], edi
jmp 0x1002cc2
cmp dword [ecx + 0x84], 0xe
jbe 0x1002c96
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x1002cbc
cmp dword [ecx + 0x74], 0xe
jbe 0x1002c96
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.01003ba7
pop ecx
test eax, eax
jne 0x1002cd6
push 0x1c
call fcn.01002bd9
pop ecx
call fcn.01003b1e
test eax, eax
jne 0x1002ce7
push 0x10
call fcn.01002bd9
pop ecx
mov dword [ebp - 4], edi
call fcn.01003891
test eax, eax
jge 0x1002cfb
push 0x1b
call fcn.01002bb4
pop ecx
call fcn.010037f2
mov dword [0x10091f4], eax
call fcn.01003667
mov dword [0x1008928], eax
call fcn.010035d1
test eax, eax
jge 0x1002d20
push 8
call fcn.01002bb4
pop ecx
call fcn.0100339e
test eax, eax
jge 0x1002d31
push 9
call fcn.01002bb4
pop ecx
call fcn.01002ed9
mov dword [ebp - 0x20], eax
cmp eax, edi
je 0x1002d44
push eax
call fcn.01002bb4
pop ecx
mov eax, dword [0x100895c]
mov dword [0x1008960], eax
push eax
push dword [0x1008950]
push dword [0x1008948]
call fcn.01002684
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x24], esi
cmp dword [ebp - 0x1c], edi
jne 0x1002d73
push esi
call fcn.01002ff8
call fcn.0100301a
jmp 0x1002da5
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.01002ded
ret
Function at 0x1003038
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
xor eax, eax
cmp edx, dword [eax*8 + 0x1008058]
je 0x1003058
inc eax
cmp eax, 0x12
jb 0x1003049
shl eax, 3
cmp edx, dword [eax + 0x1008058]
mov dword [ebp + 8], eax
jne 0x10031f6
mov ecx, dword [0x100892c]
cmp ecx, 1
je 0x10031cb
test ecx, ecx
jne 0x100308a
cmp dword [0x1008050], 1
je 0x10031cb
cmp edx, 0xfc
je 0x10031f6
and byte [ebp - 8], 0
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10030c5
push 5
pop ecx
mov esi, 0x100193c
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x10c]
lea ebx, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10030d4
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x100310c
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10030ec
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x1001938
push ebx
call fcn.010041d0
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003111
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x100805c]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1003128
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.01003c00
mov edx, esp
push 6
pop ecx
mov esi, 0x100191c
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003154
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1003160
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1003179
mov eax, dword [ebp + 8]
mov esi, 0x1001918
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x100805c]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003194
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10031a0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x10018f0
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.010040cd
add esp, 0xc
jmp 0x10031f6
mov ecx, dword [eax + 0x100805c]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10031d6
push 0
lea edx, [ebp - 4]
push edx
sub eax, esi
push eax
push ecx
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1003667
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x1008b8c]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
xor ebp, ebp
cmp eax, ebx
push 2
mov dword [esp + 0x14], ebx
pop edi
jne 0x10036b4
call esi
mov ebp, eax
cmp ebp, ebx
je 0x100369b
mov dword [0x1008b8c], 1
jmp 0x10036b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x10036af
mov eax, edi
mov dword [0x1008b8c], eax
jmp 0x10036b4
mov eax, dword [0x1008b8c]
cmp eax, 1
jne 0x1003719
cmp ebp, ebx
jne 0x10036cc
call esi
mov ebp, eax
cmp ebp, ebx
jne 0x10036cc
xor eax, eax
jmp 0x10037d5
cmp word [ebp], bx
mov eax, ebp
je 0x10036e2
add eax, edi
cmp word [eax], bx
jne 0x10036d4
add eax, edi
cmp word [eax], bx
jne 0x10036d4
sub eax, ebp
add eax, edi
mov esi, eax
push esi
call fcn.010043e6
cmp eax, ebx
pop ecx
jne 0x1003701
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
jmp 0x10037d5
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, ebp
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, eax
jmp 0x10036f3
cmp eax, edi
je 0x1003721
cmp eax, ebx
jne 0x10036c5
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x10036c5
cmp byte [ebp], bl
mov esi, ebp
je 0x1003764
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x10036c5
add dword [esp + 0x10], eax
mov eax, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1003753
sub eax, edi
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x1003734
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
add eax, eax
push eax
call fcn.010043e6
cmp eax, ebx
pop ecx
mov dword [esp + 0x14], eax
je 0x10037e6
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x10037c7
mov ecx, dword [esp + 0x10]
mov eax, esi
sub eax, dword [esp + 0x14]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x10037dc
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x10037ab
sub eax, ecx
push esi
lea edi, [edi + eax + 1]
call fcn.010043f8
cmp byte [edi], bl
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x1003786
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x14]
call fcn.010042ce
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x10036c5