joyce8/EMBER2024-capa huggingface dataset:
Function at 0xc91420
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x763000]
push edi
or ebp, 0xffffffff
jmp 0xc91442
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0xc91449
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xc91438
mov eax, 1
add ebx, ebx
jne 0xc9145b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0xc9146c
jne 0xc9148b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xc9148b
dec eax
add ebx, ebx
jne 0xc91478
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0xc91450
add ebx, ebx
jne 0xc91487
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0xc914dd
xor ecx, ecx
sub eax, 3
jb 0xc914a3
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0xc91512
sar eax, 1
mov ebp, eax
jmp 0xc914ae
add ebx, ebx
jne 0xc914ae
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xc9147c
inc ecx
add ebx, ebx
jne 0xc914bc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xc9147c
add ebx, ebx
jne 0xc914c9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0xc914be
jne 0xc914da
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0xc914be
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0xc914fc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0xc914ee
jmp 0xc9143e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0xc914fc
add edi, ecx
jmp 0xc9143e
pop esi
mov edi, esi
mov ecx, 0x405e5b
mov al, 0xe8
repne scasb al, byte es:[edi]
jne 0xc91537
cmp byte [edi], 0x77
jne 0xc9151c
mov eax, dword [edi]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
add eax, esi
stosd dword es:[edi], eax
jmp 0xc9151a
lea edi, [esi + 0x864000]
mov eax, dword [edi]
or eax, eax
je 0xc9157f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xc07698]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xc077c4]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0xc9153d
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xc077c8]
or eax, eax
je 0xc91579
mov dword [ebx], eax
add ebx, 4
jmp 0xc9155a
call dword [esi + 0xc077d0]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0xc915b0
cmp al, 0xef
ja 0xc915a3
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0xc91585
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0xc91592
mov ebp, dword [esi + 0xc077cc]
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 0xc915e4
sub esp, 0xffffff80
jmp 0x878368
Function at 0x1000f188
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
pushal
call 0x1000f197
pop dword [ebp - 0x30]
mov eax, 0x1000f197
sub dword [ebp - 0x30], eax
push 0x40
push 0x1000
push 0x3a1a5
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x30]
call dword [eax]
mov ecx, 0x64549b3f
add ecx, 0x9babb0d8
mov edi, eax
mov ebx, 0x10018600
add ebx, dword [ebp - 0x30]
mov edx, 0xf813d90b
add edx, 0x2cfc6ae3
mov esi, dword [ebx]
add dword [ebp - 0x28], eax
sub esi, edx
xor dword [ebp - 0x1c], 0xadf1fd2e
mov dword [edi], esi
mov dword [ebp - 0x2c], 0x98c9be66
add edi, 0x678113e7
sub edi, 0x678113e3
add ebx, 4
loop 0x1000f1e6
add eax, 0x1232f
mov ebx, eax
add eax, 0xefe0a355
sub eax, 0xefe0a350
mov ecx, 0x10000000
add ecx, dword [ebp - 0x30]
call ebx
leave
ret
Function at 0x409dc9
Capabilities:
Terminate thread

Disassembly:
mov eax, 0x41bc55
call fcn.00412360
push ecx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi], 0x41dddc
cmp dword [esi + 0x94], 0
mov dword [ebp - 4], 5
je 0x409e2b
mov ecx, dword [esi + 0x98]
mov eax, dword [ecx]
call dword [eax + 8]
push 0xbb8
push dword [esi + 0x94]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
je 0x409e18
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push dword [esi + 0x94]
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
push dword [esi + 0x94]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
and dword [esi + 0x94], 0
lea ecx, [esi + 0x9c]
mov byte [ebp - 4], 4
call fcn.004090e0
lea ecx, [esi + 0x98]
mov byte [ebp - 4], 3
call fcn.004090e0
lea ecx, [esi + 0x80]
mov byte [ebp - 4], 2
call fcn.0040af51
lea ecx, [esi + 0x54]
mov byte [ebp - 4], 1
call fcn.00409110
lea ecx, [esi + 0x2c]
mov byte [ebp - 4], 0
call fcn.00409cfc
or dword [ebp - 4], 0xffffffff
lea ecx, [esi + 4]
call fcn.00409cb4
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret

Function at 0x40adfe
Capabilities:
Check mutex on windows

Disassembly:
mov eax, 0x41be05
call fcn.00412360
sub esp, 0x10c
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x10], edi
mov dword [edi + 4], ebx
mov esi, dword [ebp + 8]
mov dword [edi], 0x41de1c
cmp dword [esi + 0x18], 8
mov dword [ebp - 4], ebx
jb 0x40ae32
mov eax, dword [esi + 4]
jmp 0x40ae35
lea eax, [esi + 4]
push eax
movzx eax, byte [ebp + 0xc]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateMutexW]
cmp eax, ebx
mov dword [edi + 8], eax
jne 0x40af3e
push str.WT::System::Win32::CMutex::CMutex
lea ecx, [ebp - 0x48]
call fcn.00401c50
push str..SourceWtSystemWin32Mutex.cpp
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.00401c50
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x9c]
call fcn.00408e73
mov dword [ebp + 0xc], eax
push esi
lea eax, [ebp - 0x80]
push str.Failed_to_create_mutex:
push eax
mov byte [ebp - 4], 3
call fcn.00404520
push 0x41dee8
push eax
lea eax, [ebp - 0xb8]
push eax
mov byte [ebp - 4], 4
call fcn.00404470
push dword [ebp + 0xc]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.004045d0
add esp, 0x24
lea ecx, [ebp - 0x48]
push ecx
push 0x15
lea ecx, [ebp - 0x2c]
push ecx
push eax
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 6
call fcn.0040701e
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x64]
call fcn.004013c0
push ebx
push esi
lea ecx, [ebp - 0xb8]
call fcn.004013c0
push ebx
push esi
lea ecx, [ebp - 0x80]
call fcn.004013c0
push ebx
push esi
lea ecx, [ebp - 0x9c]
call fcn.004013c0
push ebx
push esi
lea ecx, [ebp - 0x2c]
call fcn.00401360
push ebx
push esi
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 8
call fcn.00401360
lea ecx, [ebp - 0x118]
call fcn.0040718a
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], bl
call fcn.00406fcd
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x40befe
Capabilities:
Check if file exists
Get file attributes

Disassembly:
cmp dword [ecx + 0x18], 8
jb 0x40bf09
mov ecx, dword [ecx + 4]
jmp 0x40bf0c
add ecx, 4
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40bf1f
test al, 0x10
je 0x40bf1f
mov al, 1
ret
xor al, al
ret
Function at 0x40efe0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
xor edx, edx
mov eax, edx
and eax, 1
dec eax
not eax
and eax, 0xedb88320
mov ecx, edx
shr ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
shr eax, 1
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
shr ecx, 1
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
shr eax, 1
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
shr ecx, 1
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
shr eax, 1
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
shr ecx, 1
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
shr eax, 1
xor ecx, eax
mov dword [edx*4 + 0x4240f8], ecx
inc edx
cmp edx, 0x100
jb 0x40efe2
ret

Function at 0x40f090
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
mov eax, ecx
mov ecx, edx
jbe 0x40f0bd
push edi
mov edi, edi
xor edx, edx
mov dl, byte [ecx]
xor edx, eax
and edx, 0xff
mov edi, dword [edx*4 + 0x4240f8]
shr eax, 8
xor eax, edi
inc ecx
dec esi
jne 0x40f0a0
pop edi
pop esi
ret 4
Function at 0x410c90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xc
push ebp
push esi
mov esi, dword [esp + 0x1c]
mov ebp, dword [esi]
xor eax, eax
and ebp, 7
cmp edx, 5
mov dword [esp + 0xc], ecx
jae 0x410cb1
pop esi
pop ebp
add esp, 0xc
ret 0xc
mov esi, dword [esp + 0x18]
add esi, 5
lea edx, [ecx + edx - 4]
push ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x14], edx
push edi
mov edi, edi
mov ecx, dword [esp + 0x14]
lea edi, [eax + ecx]
cmp edi, edx
jae 0x410ced
jmp 0x410ce0
mov al, byte [edi]
and al, 0xfe
cmp al, 0xe8
je 0x410ced
inc edi
cmp edi, edx
jb 0x410ce0
mov eax, edi
sub eax, ecx
cmp edi, edx
mov ecx, eax
jae 0x410df5
sub ecx, dword [esp + 0x10]
cmp ecx, 3
jbe 0x410d21
xor ebp, ebp
mov cl, byte [edi + 4]
test cl, cl
mov dword [esp + 0x10], eax
je 0x410d5c
cmp cl, 0xff
je 0x410d5c
and ebp, 3
shl ebp, 1
or ebp, 1
inc eax
jmp 0x410cd0
dec ecx
shl ebp, cl
and ebp, 7
je 0x410d06
movzx ecx, byte [ebp + 0x41e330]
mov ebx, edi
sub ebx, ecx
mov cl, byte [ebx + 4]
mov bl, byte [ebp + 0x41e328]
test bl, bl
je 0x410d4a
test cl, cl
je 0x410d4a
cmp cl, 0xff
jne 0x410d06
and ebp, 3
shl ebp, 1
mov dword [esp + 0x10], eax
or ebp, 1
inc eax
jmp 0x410cd0
xor edx, edx
mov dh, cl
movzx ecx, byte [edi + 2]
mov dl, byte [edi + 3]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 1]
shl edx, 8
or edx, ecx
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x410d84
lea ebx, [edx + eax]
add ebx, esi
jmp 0x410d8a
sub edx, eax
sub edx, esi
mov ebx, edx
test ebp, ebp
je 0x410dc7
movzx esi, byte [ebp + 0x41e330]
shl esi, 3
mov ecx, 0x18
sub ecx, esi
mov edx, ebx
shr edx, cl
test dl, dl
je 0x410dac
cmp dl, 0xff
jne 0x410dc3
mov ecx, 0x20
sub ecx, esi
mov esi, dword [esp + 0x20]
mov edx, 1
shl edx, cl
dec edx
xor edx, ebx
jmp 0x410d75
mov esi, dword [esp + 0x20]
mov edx, ebx
shr edx, 0x18
and dl, 1
dec dl
not dl
mov byte [edi + 4], dl
mov edx, ebx
shr edx, 8
mov ecx, ebx
shr ecx, 0x10
mov byte [edi + 2], dl
mov edx, dword [esp + 0x18]
mov byte [edi + 3], cl
mov byte [edi + 1], bl
add eax, 5
jmp 0x410cd0
sub ecx, dword [esp + 0x10]
cmp ecx, 3
pop edi
pop ebx
jbe 0x410e10
mov ecx, dword [esp + 0x1c]
xor ebp, ebp
pop esi
mov dword [ecx], ebp
pop ebp
add esp, 0xc
ret 0xc
dec ecx
shl ebp, cl
mov ecx, dword [esp + 0x1c]
pop esi
and ebp, 7
mov dword [ecx], ebp
pop ebp
add esp, 0xc
ret 0xc
Function at 0x411c01
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41e420
call fcn.00412864
push 8
call fcn.00413ebb
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x424550], esi
jne 0x411c35
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
mov dword [0x42454c], esi
mov al, byte [ebp + 0x10]
mov byte [0x424548], al
cmp dword [ebp + 0xc], edi
jne 0x411c7f
cmp dword [0x425ecc], edi
je 0x411c6f
mov eax, dword [0x425ec8]
sub eax, 4
mov dword [0x425ec8], eax
cmp eax, dword [0x425ecc]
jb 0x411c6f
mov eax, dword [eax]
cmp eax, edi
je 0x411c50
call eax
jmp 0x411c50
push 0x423044
mov eax, 0x42303c
call fcn.00411b7f
pop ecx
push 0x423050
mov eax, 0x423048
call fcn.00411b7f
pop ecx
or dword [ebp - 4], 0xffffffff
call fcn.00411cb0
cmp dword [ebp + 0x10], edi
jne 0x411cbe
mov dword [0x424550], esi
push dword [ebp + 8]
call fcn.00411b3d
xor edi, edi
xor esi, esi
inc esi
call fcn.0041289f
ret
Function at 0x411e3f
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41e440
call fcn.00412864
mov edi, 0x94
mov eax, edi
call fcn.00411a60
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 [0x424510], ecx
mov eax, dword [esi + 4]
mov dword [0x42451c], eax
mov edx, dword [esi + 8]
mov dword [0x424520], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x424514], esi
cmp ecx, 2
je 0x411e9f
or esi, 0x8000
mov dword [0x424514], esi
shl eax, 8
add eax, edx
mov dword [0x424518], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x411eda
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x411eda
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x411ef2
cmp eax, 0x20b
je 0x411edf
mov dword [ebp - 0x1c], esi
jmp 0x411f06
cmp dword [ecx + 0x84], 0xe
jbe 0x411eda
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x411f00
cmp dword [ecx + 0x74], 0xe
jbe 0x411eda
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00415a89
pop ecx
test eax, eax
jne 0x411f1a
push 0x1c
call fcn.00411e1b
pop ecx
call fcn.00413ac9
test eax, eax
jne 0x411f2b
push 0x10
call fcn.00411e1b
pop ecx
call fcn.00414e10
mov dword [ebp - 4], esi
call fcn.00415871
test eax, eax
jge 0x411f44
push 0x1b
call fcn.00411df6
pop ecx
call fcn.004157d2
mov dword [0x425ec0], eax
call fcn.00415668
mov dword [0x424558], eax
call fcn.004155d2
test eax, eax
jge 0x411f69
push 8
call fcn.00411df6
pop ecx
call fcn.0041539f
test eax, eax
jge 0x411f7a
push 9
call fcn.00411df6
pop ecx
push 1
call fcn.00411b97
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x411f90
push eax
call fcn.00411df6
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoW]
call fcn.00415359
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x411fb1
movzx eax, word [ebp - 0x40]
jmp 0x411fb4
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00406e70
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x411fd2
push edi
call fcn.00411cc4
call fcn.00411ce6
jmp 0x412004
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0041289f
ret
Function at 0x415045
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4231dc]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4234a8]
je 0x41507a
inc eax
cmp eax, 0x13
jb 0x41506b
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4234a8]
jne 0x4151a0
mov eax, dword [0x42455c]
cmp eax, 1
je 0x415178
cmp eax, edx
jne 0x4150aa
cmp dword [0x4231e4], 1
je 0x415178
cmp ecx, 0xfc
je 0x4151a0
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x4150e0
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00413c70
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00412380
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x415114
mov eax, edi
push eax
call fcn.00412380
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x41e594
push edi
call fcn.00417b40
add esp, 0x10
push edi
call fcn.00412380
push dword [esi + 0x4234ac]
mov ebx, eax
call fcn.00412380
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00411a60
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00413c70
push edi
push ebx
call fcn.00413c80
push 0x41e590
push ebx
call fcn.00413c80
push dword [esi + 0x4234ac]
push ebx
call fcn.00413c80
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00417a3c
add esp, 0x2c
jmp 0x4151a0
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4234ac]
push dword [esi]
call fcn.00412380
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00411920
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x415668
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x4248ec]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x4156b1
call ebp
mov esi, eax
cmp esi, ebx
je 0x415697
mov dword [0x4248ec], 1
jmp 0x4156b6
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x78
jne 0x4156ac
push 2
pop eax
mov dword [0x4248ec], eax
jmp 0x4156b1
mov eax, dword [0x4248ec]
cmp eax, 1
jne 0x41570e
cmp esi, ebx
jne 0x4156c9
call ebp
mov esi, eax
cmp esi, ebx
jne 0x4156c9
xor eax, eax
jmp 0x4157b5
cmp word [esi], bx
mov eax, esi
je 0x4156de
inc eax
inc eax
cmp word [eax], bx
jne 0x4156d0
inc eax
inc eax
cmp word [eax], bx
jne 0x4156d0
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.00412fa6
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x415701
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x4157b5
push ebp
push esi
push edi
call fcn.00412020
add esp, 0xc
jmp 0x4156f3
cmp eax, 2
je 0x415717
cmp eax, ebx
jne 0x4156c2
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x4156c2
cmp byte [ebp], bl
mov esi, ebp
je 0x41574d
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
cmp eax, ebx
je 0x4156c2
push esi
add edi, eax
call fcn.00412380
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x41572a
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.00412fa6
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x4157c6
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x4157a7
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
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 0x4157bc
push edi
call fcn.00412380
push esi
lea edi, [edi + eax + 1]
call fcn.0041192e
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x41576d
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.004129b9
pop ecx
push ebp
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsA]
jmp 0x4156c2
Function at 0x4157d2
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x4248f0]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetCommandLineW]
jne 0x415812
call esi
test eax, eax
je 0x4157f7
mov dword [0x4248f0], 1
jmp 0x415817
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x78
jne 0x41580e
mov dword [0x4248f0], 2
jmp 0x415820
xor eax, eax
jmp 0x41586e
cmp eax, 1
jne 0x41581b
call esi
jmp 0x41586e
cmp eax, 2
jne 0x41580e
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
mov edi, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x415866
lea eax, [esi + esi]
push eax
call fcn.00412fa6
mov ebp, eax
test ebp, ebp
pop ecx
je 0x415866
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x41586a
push ebp
call fcn.004129b9
pop ecx
xor eax, eax
jmp 0x41586c
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret
Function at 0x416175
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x4161a3
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x4161aa
cmp ebx, dword [eax + 4]
jae 0x4161aa
xor eax, eax
jmp 0x41639a
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4161bb
xor eax, eax
inc eax
jmp 0x416399
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4161d1
cmp ecx, edx
jae 0x416316
cmp dword [eax + 4], 0
je 0x4161da
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4161c2
cmp dword [ebp + 8], 0
je 0x4161fc
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x416316
cmp eax, esi
jae 0x416316
mov eax, dword [0x424908]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x416221
cmp dword [esi*4 + 0x424910], edi
je 0x41631a
inc esi
cmp esi, eax
jl 0x41620f
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x416396
cmp dword [ebp - 8], 0x1000000
jne 0x416396
test byte [ebp - 0xc], 0xcc
je 0x41629f
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x416396
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x416396
cmp word [eax + 0x18], 0x10b
jne 0x416396
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x416396
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41629f
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41629f
test byte [ecx + 0x27], 0x80
jne 0x416316
push 1
push 0x424950
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
test eax, eax
jne 0x4161b3
mov ecx, dword [0x424908]
test ecx, ecx
mov edx, ecx
jle 0x4162d3
lea eax, [ecx*4 + 0x42490c]
cmp dword [eax], edi
je 0x4162d3
dec edx
sub eax, 4
test edx, edx
jg 0x4162c7
test edx, edx
jne 0x416304
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4162e0
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4162f8
lea eax, [edx*4 + 0x424910]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4162e6
cmp ecx, 0x10
jge 0x416304
inc ecx
mov dword [0x424908], ecx
push 0
push 0x424950
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
jmp 0x4161b3
xor eax, eax
jmp 0x416399
test esi, esi
jle 0x4161b3
mov ebx, dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
push 1
push 0x424950
call ebx
test eax, eax
jne 0x4161b3
cmp dword [esi*4 + 0x424910], edi
je 0x416370
mov eax, dword [0x424908]
lea esi, [eax - 1]
test esi, esi
jl 0x41635e
cmp dword [esi*4 + 0x424910], edi
je 0x41635a
dec esi
jns 0x41634e
test esi, esi
jge 0x41636e
cmp eax, 0x10
jge 0x416369
inc eax
mov dword [0x424908], eax
lea esi, [eax - 1]
jmp 0x416370
je 0x416388
xor ecx, ecx
test esi, esi
jl 0x416388
lea eax, [ecx*4 + 0x424910]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x416376
push 0
push 0x424950
call ebx
jmp 0x4161b3
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x417a3c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x424960], ebx
push esi
push edi
jne 0x417abc
push str.user32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x417af7
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x424960], eax
je 0x417af7
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x424964], eax
call esi
cmp dword [0x424510], 2
mov dword [0x424968], eax
jne 0x417abc
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x424970], eax
je 0x417abc
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x42496c], eax
mov eax, dword [0x42496c]
test eax, eax
je 0x417b01
call eax
test eax, eax
je 0x417ae8
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x424970]
test eax, eax
je 0x417ae8
test byte [ebp - 8], 1
jne 0x417b01
cmp dword [0x42451c], 4
jb 0x417afb
or byte [ebp + 0x12], 0x20
jmp 0x417b20
xor eax, eax
jmp 0x417b30
or byte [ebp + 0x12], 4
jmp 0x417b20
mov eax, dword [0x424964]
test eax, eax
je 0x417b20
call eax
mov ebx, eax
test ebx, ebx
je 0x417b20
mov eax, dword [0x424968]
test eax, eax
je 0x417b20
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x424960]
pop edi
pop esi
pop ebx
leave
ret