joyce8/EMBER2024-capa huggingface dataset:
Function at 0x469bb0
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4b8e98
call fcn.0046d3f4
mov edi, 0x94
mov eax, edi
call fcn.0046ae30
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 [0x4d32b0], ecx
mov eax, dword [esi + 4]
mov dword [0x4d32bc], eax
mov edx, dword [esi + 8]
mov dword [0x4d32c0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4d32b4], esi
cmp ecx, 2
je 0x469c10
or esi, 0x8000
mov dword [0x4d32b4], esi
shl eax, 8
add eax, edx
mov dword [0x4d32b8], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x469c4b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x469c4b
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x469c63
cmp eax, 0x20b
je 0x469c50
mov dword [ebp - 0x1c], esi
jmp 0x469c77
cmp dword [ecx + 0x84], 0xe
jbe 0x469c4b
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x469c71
cmp dword [ecx + 0x74], 0xe
jbe 0x469c4b
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0046ee94
pop ecx
test eax, eax
jne 0x469c8b
push 0x1c
call fcn.00469b8c
pop ecx
call fcn.0046ee0b
test eax, eax
jne 0x469c9c
push 0x10
call fcn.00469b8c
pop ecx
call fcn.0046eb76
mov dword [ebp - 4], esi
call fcn.0046e978
test eax, eax
jge 0x469cb5
push 0x1b
call fcn.00469b67
pop ecx
call fcn.0046e8d7
mov dword [0x4d4c30], eax
call fcn.0046e76d
mov dword [0x4d329c], eax
call fcn.0046e6d7
test eax, eax
jge 0x469cda
push 8
call fcn.00469b67
pop ecx
call fcn.0046e4a4
test eax, eax
jge 0x469ceb
push 9
call fcn.00469b67
pop ecx
call fcn.0046b141
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x469cfe
push eax
call fcn.00469b67
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoW]
call fcn.0046e450
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x469d1f
movzx eax, word [ebp - 0x34]
jmp 0x469d22
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.0047c240
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x469d40
push edi
call fcn.0046b279
call fcn.0046b29b
jmp 0x469d72
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0046d42f
ret
Function at 0x46b1a6
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.00473375
xor esi, esi
inc esi
cmp dword [0x4d32f0], esi
pop ecx
jne 0x46b1ce
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x4d32ec], esi
mov byte [0x4d32e8], al
jne 0x46b234
mov ecx, dword [0x4d4c28]
test ecx, ecx
je 0x46b215
mov eax, dword [0x4d4c24]
sub eax, 4
cmp eax, ecx
jmp 0x46b20e
mov eax, dword [eax]
test eax, eax
je 0x46b200
call eax
mov eax, dword [0x4d4c24]
sub eax, 4
cmp eax, dword [0x4d4c28]
mov dword [0x4d4c24], eax
jae 0x46b1f8
mov eax, 0x4cd0c8
mov esi, 0x4cd0d0
cmp eax, esi
mov edi, eax
jae 0x46b234
mov eax, dword [edi]
test eax, eax
je 0x46b22d
call eax
add edi, 4
cmp edi, esi
jb 0x46b225
mov eax, 0x4cd0d4
mov esi, 0x4cd0dc
cmp eax, esi
mov edi, eax
jae 0x46b253
mov eax, dword [edi]
test eax, eax
je 0x46b24c
call eax
add edi, 4
cmp edi, esi
jb 0x46b244
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x46b264
push 8
call fcn.004732e1
jmp 0x46b276
push dword [ebp + 8]
mov dword [0x4d32f0], 1
call fcn.0046b0ff
pop ecx
pop ebp
ret

Function at 0x46d211
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x46d22e
call fcn.0046bab5
mov dword [eax], 0x16
xor eax, eax
jmp 0x46d298
push esi
push 0x88
push 1
call fcn.0046d081
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x46d283
push esi
call fcn.0046ec1c
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x46d261
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x46d16d
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CreateThread]
test eax, eax
jne 0x46d297
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ebx, eax
push esi
call fcn.0046b98b
test ebx, ebx
pop ecx
je 0x46d295
push ebx
call fcn.0046bac7
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x46e13c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4ceed0]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4ceee0]
je 0x46e169
inc eax
cmp eax, 0x12
jb 0x46e15a
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4ceee0]
jne 0x46e29d
mov eax, dword [0x4d32a0]
cmp eax, 1
je 0x46e278
cmp eax, edx
jne 0x46e199
cmp dword [0x4cec9c], 1
je 0x46e278
cmp ecx, 0xfc
je 0x46e29d
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x46e1d2
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00477fb0
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.0046c930
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x46e214
lea eax, [ebp - 0x10c]
push eax
call fcn.0046c930
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x4b93d0
push edi
call fcn.004780b0
add esp, 0x10
push edi
call fcn.0046c930
push dword [esi + 0x4ceee4]
mov ebx, eax
call fcn.0046c930
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0046ae30
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00477fb0
push edi
push ebx
call fcn.00477fc0
push 0x4b93b0
push ebx
call fcn.00477fc0
push dword [esi + 0x4ceee4]
push ebx
call fcn.00477fc0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00477eb1
add esp, 0x2c
jmp 0x46e29d
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x4ceee4]
push dword [esi]
call fcn.0046c930
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 - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.0046c69e
pop edi
pop esi
pop ebx
leave
ret
Function at 0x46e76d
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x4d3504]
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 0x46e7b6
call ebp
mov esi, eax
cmp esi, ebx
je 0x46e79c
mov dword [0x4d3504], 1
jmp 0x46e7bb
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x78
jne 0x46e7b1
push 2
pop eax
mov dword [0x4d3504], eax
jmp 0x46e7b6
mov eax, dword [0x4d3504]
cmp eax, 1
jne 0x46e813
cmp esi, ebx
jne 0x46e7ce
call ebp
mov esi, eax
cmp esi, ebx
jne 0x46e7ce
xor eax, eax
jmp 0x46e8ba
cmp word [esi], bx
mov eax, esi
je 0x46e7e3
inc eax
inc eax
cmp word [eax], bx
jne 0x46e7d5
inc eax
inc eax
cmp word [eax], bx
jne 0x46e7d5
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.0046baa3
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x46e806
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x46e8ba
push ebp
push esi
push edi
call fcn.0046c330
add esp, 0xc
jmp 0x46e7f8
cmp eax, 2
je 0x46e81c
cmp eax, ebx
jne 0x46e7c7
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x46e7c7
cmp byte [ebp], bl
mov esi, ebp
je 0x46e852
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
cmp eax, ebx
je 0x46e7c7
push esi
add edi, eax
call fcn.0046c930
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x46e82f
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.0046baa3
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x46e8cb
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x46e8ac
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 0x46e8c1
push edi
call fcn.0046c930
push esi
lea edi, [edi + eax + 1]
call fcn.0046ab7c
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x46e872
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.0046b98b
pop ecx
push ebp
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsA]
jmp 0x46e7c7
Function at 0x46e8d7
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x4d3508]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetCommandLineW]
jne 0x46e917
call esi
test eax, eax
je 0x46e8fc
mov dword [0x4d3508], 1
jmp 0x46e91c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x78
jne 0x46e913
mov dword [0x4d3508], 2
jmp 0x46e925
xor eax, eax
jmp 0x46e975
cmp eax, 1
jne 0x46e920
call esi
jmp 0x46e975
cmp eax, 2
jne 0x46e913
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
jne 0x46e949
xor eax, eax
jmp 0x46e973
lea eax, [esi + esi]
push eax
call fcn.0046baa3
mov ebp, eax
test ebp, ebp
pop ecx
je 0x46e945
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x46e971
push ebp
call fcn.0046b98b
pop ecx
jmp 0x46e945
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret

Function at 0x4723a4
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.0046ae30
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x472439
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x4d32b0]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x472439
cmp eax, 1
je 0x472451
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x472439
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x47240e
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x472435
xor eax, eax
inc eax
jmp 0x47246d
cmp esi, ebx
jae 0x47243d
xor eax, eax
jmp 0x47246d
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov eax, dword [0x4d32b0]
jmp 0x472453
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4771d4
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x4ceed0]
xor eax, dword [ebp + 4]
push esi
mov esi, dword [ebp + 8]
test esi, esi
mov dword [ebp - 4], eax
je 0x477256
push esi
call fcn.0047a5d1
test eax, eax
pop ecx
jne 0x477221
call fcn.0046babe
mov dword [eax], 0xf
call fcn.0046bab5
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
call fcn.0046c69e
leave
ret
and word [ebp - 6], 0
lea eax, [ebp + 8]
push eax
add esi, 0x40
lea eax, [ebp - 0x214]
push eax
mov word [ebp - 0xc], si
mov esi, 0x104
push esi
lea eax, [ebp - 0xc]
push eax
mov word [ebp - 0xa], 0x3a
mov word [ebp - 8], 0x2e
call dword [sym.imp.KERNEL32.DLL_GetFullPathNameW]
jmp 0x477269
lea eax, [ebp - 0x214]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryW]
test eax, eax
je 0x477211
inc eax
cmp eax, esi
ja 0x477211
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x4772a0
cmp eax, dword [ebp + 0x10]
jg 0x477281
mov eax, dword [ebp + 0x10]
add eax, eax
push eax
call fcn.0046baa3
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x4772b5
call fcn.0046bab5
mov dword [eax], 0xc
jmp 0x477211
cmp eax, dword [ebp + 0x10]
jle 0x4772b5
call fcn.0046bab5
mov dword [eax], 0x22
jmp 0x477211
lea eax, [ebp - 0x214]
push eax
push ecx
call fcn.0046a5bd
pop ecx
pop ecx
jmp 0x477213
Function at 0x477851
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x477a17
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4d4b20]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x477a17
test cl, 0x48
je 0x4778b7
mov al, byte [eax + 5]
cmp al, 0xa
je 0x4778b7
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x477909
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4778f1
call fcn.0046bab5
mov dword [eax], 9
call fcn.0046babe
mov dword [eax], esi
jmp 0x477901
cmp eax, 0x6d
je 0x477a17
push eax
call fcn.0046bac7
pop ecx
or eax, 0xffffffff
jmp 0x477a19
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x477a12
test edx, edx
je 0x47792c
cmp byte [ebx], 0xa
jne 0x47792c
or al, 4
jmp 0x47792e
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x477a0c
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4779fc
cmp al, 0xd
je 0x477962
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4779ee
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x47797c
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x477977
add dword [ebp + 0x10], 2
jmp 0x4779d0
mov dword [ebp + 0x10], eax
jmp 0x4779ea
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x4779a4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x4779ea
cmp dword [ebp - 0xc], 0
je 0x4779ea
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4779c5
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4779d0
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4779ed
cmp ebx, dword [ebp + 0xc]
jne 0x4779d5
cmp byte [ebp - 1], 0xa
jne 0x4779d5
mov byte [ebx], 0xa
jmp 0x4779ed
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00476594
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4779ee
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x477946
jmp 0x477a0c
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x477a0c
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x477a19
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x477ac9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x4ceed0]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x477af2
xor eax, eax
jmp 0x477c60
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4d4b20]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x477b25
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0047a608
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x477bf7
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x477c32
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x477b80
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x477b71
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x477b54
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x477bc0
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x477bc9
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x477b45
jmp 0x477bcb
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x477c5b
cmp dword [ebp - 8], edi
je 0x477c32
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x477c24
call fcn.0046bab5
mov dword [eax], 9
call fcn.0046babe
mov dword [eax], esi
jmp 0x477c2d
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x477c19
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x477bcb
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 8], eax
jmp 0x477bcb
push dword [ebp - 8]
call fcn.0046bac7
pop ecx
or eax, 0xffffffff
jmp 0x477c5e
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x477c47
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x477c47
xor eax, eax
jmp 0x477c5e
call fcn.0046bab5
mov dword [eax], 0x1c
call fcn.0046babe
mov dword [eax], edi
jmp 0x477c2d
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.0046c69e
leave
ret
Function at 0x477eb1
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4d3770], ebx
push esi
push edi
jne 0x477f31
push str.user32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x477f6c
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x4d3770], eax
je 0x477f6c
push 0x4bd854
push edi
call esi
push 0x4bd840
push edi
mov dword [0x4d3774], eax
call esi
cmp dword [0x4d32b0], 2
mov dword [0x4d3778], eax
jne 0x477f31
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x4d3780], eax
je 0x477f31
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4d377c], eax
mov eax, dword [0x4d377c]
test eax, eax
je 0x477f76
call eax
test eax, eax
je 0x477f5d
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x4d3780]
test eax, eax
je 0x477f5d
test byte [ebp - 8], 1
jne 0x477f76
cmp dword [0x4d32bc], 4
jb 0x477f70
or byte [ebp + 0x12], 0x20
jmp 0x477f95
xor eax, eax
jmp 0x477fa5
or byte [ebp + 0x12], 4
jmp 0x477f95
mov eax, dword [0x4d3774]
test eax, eax
je 0x477f95
call eax
mov ebx, eax
test ebx, ebx
je 0x477f95
mov eax, dword [0x4d3778]
test eax, eax
je 0x477f95
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4d3770]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x47bae5
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ebx
je 0x47bb50
push 0x3d
push dword [ebp + 8]
call fcn.0047bcc5
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x47bb50
cmp dword [ebp + 8], esi
je 0x47bb50
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x4d32d0]
cmp eax, dword [0x4d32d4]
jne 0x47bb36
mov edi, eax
call fcn.0047ba84
mov dword [0x4d32d0], eax
cmp eax, ebx
jne 0x47bb8f
cmp dword [ebp + 0xc], ebx
je 0x47bb58
cmp dword [0x4d32d8], ebx
je 0x47bb58
call fcn.0047b2f5
test eax, eax
je 0x47bb8f
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x47bc93
push 4
call fcn.0046baa3
cmp eax, ebx
pop ecx
mov dword [0x4d32d0], eax
je 0x47bb50
mov dword [eax], ebx
cmp dword [0x4d32d8], ebx
jne 0x47bb8f
push 4
call fcn.0046baa3
cmp eax, ebx
pop ecx
mov dword [0x4d32d8], eax
je 0x47bb50
mov dword [eax], ebx
mov ebx, dword [0x4d32d0]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.0047ba37
mov edi, eax
test edi, edi
pop ecx
jl 0x47bbe8
cmp dword [ebx], 0
je 0x47bbe8
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.0046b98b
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x47bbd0
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x47bc1e
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x47bbc7
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.0046c774
test eax, eax
pop ecx
pop ecx
je 0x47bc1e
jmp 0x47bc19
cmp dword [ebp - 4], 0
jne 0x47bc8c
test edi, edi
jge 0x47bbf8
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.0046c774
test eax, eax
pop ecx
pop ecx
je 0x47bb50
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x4d32d0], eax
cmp dword [ebp + 0xc], 0
je 0x47bc75
push dword [ebp + 8]
call fcn.0046c930
inc eax
inc eax
push eax
call fcn.0046baa3
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x47bc75
push dword [ebp + 8]
push esi
call fcn.00477fb0
mov eax, esi
sub eax, dword [ebp + 8]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
and byte [eax], 0
mov ecx, dword [ebp - 4]
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableA]
test eax, eax
jne 0x47bc6e
or dword [ebp - 8], 0xffffffff
push esi
call fcn.0046b98b
pop ecx
cmp dword [ebp - 4], 0
je 0x47bc84
push dword [ebp + 8]
call fcn.0046b98b
pop ecx
mov eax, dword [ebp - 8]
jmp 0x47bb53
push esi
call fcn.0046b98b
pop ecx
xor eax, eax
jmp 0x47bb53