joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4076c4
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x42600c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
xor edi, edi
mov dword [ebp - 0x210], ecx
lea eax, [ebp - 0x20c]
mov esi, edx
push edi
push eax
call fcn.004095f0
add esp, 0xc
lea ecx, [ebp - 0x20c]
call fcn.004072b0
lea eax, [ebp - 0x20c]
push eax
push edi
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov ebx, eax
test ebx, ebx
jne 0x407756
push ecx
push str.ReadSharedMemory__:
push ecx
mov edi, 0x82
mov ecx, esi
mov edx, edi
call fcn.00403b0e
lea ecx, [esi + 0x208]
mov edx, edi
push ecx
push str.Could_not_open_file_mapping_object.
push ecx
call fcn.00403b0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x410], eax
xor eax, eax
jmp 0x407820
push 0x1e78
push edi
push edi
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
jne 0x4077aa
push ecx
push str.ReadSharedMemory__:
push ecx
mov edi, 0x82
mov ecx, esi
mov edx, edi
call fcn.00403b0e
lea ecx, [esi + 0x208]
mov edx, edi
push ecx
push str.Could_not_map_view_of_file.
push ecx
call fcn.00403b0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov dword [esi + 0x410], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40774f
mov eax, dword [ebp - 0x210]
test eax, eax
jne 0x4077c6
call fcn.0040d306
mov dword [eax], 0x16
call fcn.0040d23a
jmp 0x4077d5
push 0x1034
push edi
push eax
call fcn.00408e00
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
push str.ReadSharedMemory__:
push ecx
mov edx, 0x82
mov ecx, esi
call fcn.00403b0e
lea eax, [ebp - 0x20c]
push eax
push str.succeeded._mapping_obj_name:__s
lea eax, [esi + 0x208]
push 0x104
push eax
call fcn.00406b11
and dword [esi + 0x410], 0
xor eax, eax
add esp, 0x10
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407989
leave
ret

Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
nop
nop
nop
nop
pop edi
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x430072
nop
nop
nop
nop
mov ebx, 0x408ecc
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
pop eax
nop
nop
nop
nop
nop
mov esi, 0x627a3118
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x430060
nop
mov eax, section..data
cmp eax, 0
nop
nop
nop
nop
nop
nop
nop
je 0x4300d2
mov ebx, 0x42e1d0
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x8006c37
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x4300c0
nop
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x4013e0
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x554
mov eax, dword [0x425240]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00401b80
add esp, 4
test eax, eax
je 0x401408
jmp 0x401608
mov ecx, dword [ebp + 8]
push ecx
push str._s
push 0x200
lea edx, [ebp - 0x404]
push edx
call fcn.004023f0
add esp, 0x10
lea eax, [ebp - 0x544]
push eax
lea ecx, [ebp - 0x404]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x54c], eax
cmp dword [ebp - 0x54c], 0xffffffff
jne 0x40144d
jmp 0x401608
push 0x4251a8
lea edx, [ebp - 0x518]
push edx
call fcn.00407010
add esp, 8
test eax, eax
je 0x4015de
push 0x4251ac
lea eax, [ebp - 0x518]
push eax
call fcn.00407010
add esp, 8
test eax, eax
je 0x4015de
lea ecx, [ebp - 0x518]
push ecx
mov edx, dword [ebp + 8]
push edx
push str._s_s
push 0x200
lea eax, [ebp - 0x204]
push eax
call fcn.004023f0
add esp, 0x14
mov ecx, dword [ebp - 0x544]
and ecx, 0x10
je 0x4014dd
cmp dword [ebp + 0x14], 3
jge 0x4014d8
mov edx, dword [ebp + 0x14]
add edx, 1
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x204]
push edx
call fcn.004013e0
add esp, 0x10
jmp 0x4015de
push 0x2e
lea eax, [ebp - 0x518]
push eax
call fcn.00404da0
add esp, 8
mov dword [ebp - 0x550], eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401a60
add esp, 4
test eax, eax
jne 0x401531
cmp dword [ebp - 0x550], 0
je 0x401525
push str..lnk
mov edx, dword [ebp - 0x550]
push edx
call fcn.004071ab
add esp, 8
test eax, eax
je 0x401531
mov eax, dword [ebp + 8]
push eax
call fcn.00401ae0
add esp, 4
push 0x34
call fcn.0040729f
add esp, 4
mov dword [ebp - 0x548], eax
lea ecx, [ebp - 0x204]
push ecx
call fcn.0040709c
add esp, 4
mov edx, dword [ebp - 0x548]
mov dword [edx], eax
push 0x20
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x548]
add ecx, 4
push ecx
call fcn.00404820
add esp, 0xc
push 0x10
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x548]
add eax, 0x24
push eax
call fcn.00404820
add esp, 0xc
push 0x426880
mov ecx, dword [ebp - 0x548]
push ecx
push 0x401710
call dword [sym.imp.KERNEL32.dll_CreateThreadpoolWork]
mov dword [ebp - 0x554], eax
cmp dword [ebp - 0x554], 0
je 0x4015be
mov edx, dword [ebp - 0x554]
push edx
call dword [sym.imp.KERNEL32.dll_SubmitThreadpoolWork]
nop
jmp 0x4015de
mov eax, dword [ebp - 0x548]
mov ecx, dword [eax]
push ecx
call fcn.00407284
add esp, 4
mov edx, dword [ebp - 0x548]
push edx
call fcn.00407284
add esp, 4
lea eax, [ebp - 0x544]
push eax
mov ecx, dword [ebp - 0x54c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40144d
mov edx, dword [ebp - 0x54c]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
nop
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402484
mov esp, ebp
pop ebp
ret
Function at 0x401660
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0xf0000000
push 0x18
push 0
push 0
lea eax, [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x4016c7
mov ecx, dword [ebp + 8]
push ecx
push 0x20
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov eax, dword [ebp + 0xc]
push eax
push 0x10
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0x20
mov eax, dword [ebp + 8]
push eax
call fcn.00401620
add esp, 8
push 0x10
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00401620
add esp, 8
jmp 0x4016dc
push str.Failed_to_acquire_cryptographic_context._n
call fcn.004023b0
add esp, 4
push 1
call fcn.004075e5
nop
mov esp, ebp
pop ebp
ret

Function at 0x401840
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x425240]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0
mov byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 0
mov byte [ebp - 0xa], 0
mov byte [ebp - 9], 0
mov byte [ebp - 8], 0
mov byte [ebp - 7], 5
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4018b1
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
nop
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402484
mov esp, ebp
pop ebp
ret

Function at 0x4018d0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x425240]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00401840
test eax, eax
jne 0x40197a
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40197a
mov dword [ebp - 0x144], 0x3c
push 0x38
push 0
lea ecx, [ebp - 0x140]
push ecx
call fcn.00405150
add esp, 0xc
mov dword [ebp - 0x138], str.runas
lea edx, [ebp - 0x108]
mov dword [ebp - 0x134], edx
mov dword [ebp - 0x130], 0x425064
mov dword [ebp - 0x13c], 0
mov dword [ebp - 0x128], 0
lea eax, [ebp - 0x144]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x401972
push 1
call fcn.004075e5
nop
push 0
call fcn.004075e5
nop
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402484
mov esp, ebp
pop ebp
ret
Function at 0x401990
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x425240]
xor eax, ebp
mov dword [ebp - 4], eax
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x401a47
mov dword [ebp - 0x10], str.wuauserv
mov dword [ebp - 0xc], str.bits
mov dword [ebp - 8], str.cryptsvc
mov dword [ebp - 0x30], 0
jmp 0x4019e3
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 3
jae 0x401a3c
push 0x24
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp + ecx*4 - 0x10]
push edx
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x401a3a
lea ecx, [ebp - 0x2c]
push ecx
push 1
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x401a2f
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp + eax*4 - 0x10]
push ecx
push str.Service__s_stopped_successfully._n
call fcn.004023b0
add esp, 8
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
jmp 0x4019da
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402484
mov esp, ebp
pop ebp
ret
Function at 0x402110
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x425240]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 2
jge 0x402157
call fcn.004018d0
push 0
push 0
push 0x4251ec
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
xor eax, eax
jmp 0x402213
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x34]
push edx
call fcn.00401660
add esp, 8
call fcn.00401990
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x34]
push ecx
call fcn.004016e0
add esp, 8
call fcn.00401760
push str.__food
mov edx, 4
shl edx, 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
call fcn.00407010
add esp, 8
test eax, eax
jne 0x4021b5
push 0
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x34]
push eax
call fcn.00401dc0
add esp, 0xc
jmp 0x40220c
push str.__rest
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
call fcn.00407010
add esp, 8
test eax, eax
jne 0x4021e9
push 1
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x34]
push edx
call fcn.00401dc0
add esp, 0xc
jmp 0x40220c
mov eax, 4
shl eax, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
push str.Invalid_parameter:__s_n
call fcn.004023b0
add esp, 8
mov eax, 1
jmp 0x402213
call fcn.00401810
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402484
mov esp, ebp
pop ebp
ret

Function at 0x403038
Capabilities:
Parse pe header

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

Function at 0x40b2e7
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x425240]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x41dfa8
push esi
call fcn.004123ab
pop ecx
pop ecx
test eax, eax
jne 0x40b315
xor al, al
jmp 0x40b392
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.0040b028
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x40b34f
push dword [ebp - 0x210]
call fcn.00407284
xor al, al
jmp 0x40b390
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40b355
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x40b375
push edx
call fcn.0040b21e
pop ecx
test al, al
je 0x40b340
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x40b383
mov bl, 1
push dword [ebp - 0x210]
call fcn.00407284
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00402484
leave
ret
Function at 0x40e4a0
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ee50
push 0x41ee48
push str.FlsAlloc
push 0x1f
call fcn.0040e35f
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e4d4
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d1d4]
call esi
jmp 0x40e4da
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40e51e
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ee60
push 0x41ee58
push str.FlsGetValue
push 0x21
call fcn.0040e35f
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e555
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d1d4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40e55d
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ee68
push 0x41ee60
push str.FlsSetValue
push 0x22
call fcn.0040e35f
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e597
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41d1d4]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40f3ac
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x426528]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40f3ec
cmp byte [ebx], 0xa
jne 0x40f3ec
or byte [edi + eax + 0x28], 4
jmp 0x40f3f1
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x40f4f0
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40f4d3
inc eax
cmp dl, 0xd
je 0x40f41d
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40f443
cmp eax, ecx
jae 0x40f451
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x40f405
jmp 0x40f4f0
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f4ce
cmp dword [ebp - 0x10], 0
je 0x40f4ce
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x426528]
test byte [eax + edi + 0x28], 0x48
je 0x40f4a8
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40f493
mov byte [esi], dl
jmp 0x40f4a4
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x426528]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40f4f0
cmp byte [ebp - 1], 0xa
jne 0x40f4b7
cmp esi, ebx
jne 0x40f4b7
mov byte [esi], 0xa
jmp 0x40f4ef
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00416a01
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40f4f0
mov byte [esi], 0xd
jmp 0x40f4ef
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x426528]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40f4ed
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40f4f0
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40f4f9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x426528]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40f53f
cmp word [ebx], dx
jne 0x40f53f
or byte [eax + edi + 0x28], 4
jmp 0x40f544
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x40f6a7
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x40f687
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40f585
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40f5bb
cmp eax, edx
jae 0x40f5c9
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x40f560
jmp 0x40f6a7
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f682
cmp dword [ebp - 0x18], 0
je 0x40f682
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x426528]
test byte [eax + edi + 0x28], 0x48
je 0x40f658
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x40f61c
mov word [esi], cx
jmp 0x40f653
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x426528]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x426528]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x426528]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40f6a7
pop eax
cmp word [ebp - 4], ax
jne 0x40f668
cmp esi, ebx
jne 0x40f668
mov word [esi], ax
jmp 0x40f6a4
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00416a01
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40f6a7
push 0xd
pop eax
jmp 0x40f663
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x426528]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40f6a1
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40f6a7
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x413fb7
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 0x414054
push ebx
push esi
call fcn.00413f80
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.0040e054
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x414001
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x414053
push edi
push eax
call fcn.0040de8a
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x414021
call fcn.0040de50
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x414052
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040e054
add esp, 0x20
test eax, eax
jne 0x414040
push edi
call fcn.0040de50
jmp 0x414048
push ebx
call fcn.0040de50
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 0x414057
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x414068
pop esi
ret
push ebx
push edi
push esi
call fcn.00413f80
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0040de8a
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x414090
push ebx
push esi
push edi
call fcn.00404820
add esp, 0xc
push 0
call fcn.0040de50
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x4147ea
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00414305

Function at 0x4189f7
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x425240]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x418a3a
call fcn.0040d745
mov dword [eax], 0xf
call fcn.0040d758
mov dword [eax], 0xd
call fcn.0040d677
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402484
leave
ret
test eax, eax
jne 0x418a41
inc eax
jmp 0x418a2e
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x418a2c
xor eax, eax
cmp ecx, 1
setne al
jmp 0x418a2e