joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45e4e0
Capabilities:
Get disk size

Disassembly:
push 0xffffffffffffffff
push 0x4b9db8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov ecx, dword [ecx + 0x1c]
lea edx, [esp + 4]
push ebx
push edx
mov eax, dword [ecx]
call dword [eax + 0x18]
mov eax, dword [eax]
mov dword [esp + 0x24], 0
push eax
lea eax, [esp + 8]
push eax
call fcn.0045ba40
mov eax, dword [eax]
add esp, 8
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
lea ecx, [esp + 4]
sete bl
call fcn.0049d0dc
lea ecx, [esp + 8]
mov dword [esp + 0x24], 0xffffffff
call fcn.0049d0dc
test bl, bl
pop ebx
je 0x45e570
xor eax, eax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x18]
imul eax, dword [esp + 0xc]
imul eax, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x24
ret
Function at 0x464840
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x104
call fcn.0041fce0
push ebx
push esi
push edi
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x464889
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
je 0x464889
mov ecx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
push ecx
push 0x4dd248
call fcn.0048e3d5
add esp, 0xc
lea esp, [ebp - 0x110]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
lea edx, [ebp + 0xc]
push edx
push eax
lea ecx, [ebp - 0x104]
push 0xff
push ecx
call fcn.004209d9
add esp, 0x10
mov byte [ebp - 5], 0
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x46498b
call dword [sym.imp.USER32.dll_GetDesktopWindow]
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
mov ebx, eax
test ebx, ebx
je 0x464946
lea edx, [ebp - 4]
push edx
push 0
push 0
push 2
push ebx
call dword [sym.imp.USER32.dll_GetUserObjectInformationW]
test eax, eax
jne 0x464946
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x464946
mov eax, dword [ebp - 4]
cmp eax, 0x200
ja 0x464946
lea esi, [eax + 1]
and esi, 0xfffffffe
mov dword [ebp - 4], esi
lea eax, [esi + 2]
add eax, 3
and al, 0xfc
call fcn.0041fce0
lea eax, [ebp - 4]
mov edi, esp
push eax
push esi
push edi
push 2
push ebx
call dword [sym.imp.USER32.dll_GetUserObjectInformationW]
test eax, eax
je 0x464946
mov ecx, dword [ebp - 4]
push str.Service_0x
push edi
lea eax, [ecx + 1]
and al, 0xfe
mov dword [ebp - 4], eax
shr eax, 1
mov word [edi + eax*2], 0
call fcn.00420433
add esp, 8
test eax, eax
je 0x46498b
push str.OPENSSL
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
lea eax, [ebp - 4]
push 0
push eax
push 0
push 1
push 0
push 0
push 0
lea edx, [ebp - 0x104]
push 1
push esi
mov dword [ebp - 4], edx
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
lea esp, [ebp - 0x110]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x10
lea ecx, [ebp - 0x104]
push str.OpenSSL:_FATAL
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea esp, [ebp - 0x110]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x48d55d
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x48d57d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004221a6
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x48d5a0
test byte [esp + 8], 2
je 0x48d5a0
call fcn.00422219
mov dword [eax], 0xd
call fcn.00422222
mov dword [eax], 5
jmp 0x48d579
xor eax, eax
ret

Function at 0x4905b0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x4905bd
xor eax, eax
ret 0xc
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x4906c0
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0x4ca3fc]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x4ca3fc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x4ca3fc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x4ca3fc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x4ca3fc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x4ca3fc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x4ca3fc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x4ca3fc]
xor eax, edx
inc ecx
dec edi
jne 0x4905d8
pop edi
test esi, esi
je 0x4906e2
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x4ca3fc]
xor eax, edx
inc ecx
dec esi
jne 0x4906c4
pop esi
pop ebx
not eax
ret 0xc
Function at 0x49c5df
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x49c601
cmp dword [edi + 0x3c], 0
jne 0x49c601
movzx eax, bx
mov dword [edi + 0x3c], eax
call fcn.004ad31c
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.0049c640
pop edi
pop esi
pop ebx
ret 8

Function at 0x49e7fc
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x49e834
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0049d583
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0049d55b
jmp 0x49e840
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4a05fe
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4a0640
call fcn.004ad31c
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4a0640
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4a0637
xor eax, eax
jmp 0x4a0648
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004a064e
pop edi
pop esi
pop ebx
ret 4
Function at 0x4a2dec
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push edi
push dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x4a2e1c
push edi
call ebx
push eax
call fcn.004a1624
push esi
mov esi, dword [ebp + 0xc]
movzx eax, byte [esi + 0x10]
cmp eax, dword [ebp - 4]
je 0x4a2e46
test byte [ebp - 4], 1
je 0x4a2e46
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x4a2e46
push edi
call ebx
push eax
call fcn.004a1624
cmp dword [esi + 4], edi
lea eax, [esi + 4]
je 0x4a2eec
lea ecx, [ebp - 0x24]
push ecx
push eax
call fcn.004a2d39
cmp dword [esi + 8], edi
lea eax, [esi + 8]
pop ecx
pop ecx
je 0x4a2e78
lea ecx, [ebp - 0x14]
push ecx
push eax
call fcn.004a2d39
pop ecx
lea eax, [ebp - 0x14]
pop ecx
mov dword [ebp - 8], eax
cmp dword [esi], edi
je 0x4a2e8e
lea eax, [ebp - 0x1c]
push eax
push esi
call fcn.004a2d39
pop ecx
lea eax, [ebp - 0x1c]
pop ecx
mov dword [ebp - 0xc], eax
push edi
push 0x80
push 3
push edi
push 1
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4a2eb8
push 0
call ebx
push eax
call fcn.004a1624
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x4a2ed6
push eax
call ebx
push eax
call fcn.004a1624
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4a2eea
push eax
call ebx
push eax
call fcn.004a1624
xor edi, edi
movzx eax, byte [esi + 0x10]
cmp eax, dword [ebp - 4]
pop esi
je 0x4a2f13
test byte [ebp - 4], 1
jne 0x4a2f13
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x4a2f13
push edi
call ebx
push eax
call fcn.004a1624
pop edi
pop ebx
leave
ret 8
Function at 0x405a03
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
pushal
call 0x405a12
pop dword [ebp - 0xc]
mov eax, 0x405a12
sub dword [ebp - 0xc], eax
mov dword [ebp - 0x1c], 0x4f3aa5e7
add dword [ebp - 0x1c], 0xff179f64
mov dword [ebp - 0x18], 0xf44576af
add dword [ebp - 0x18], 0x3dedd596
mov dword [ebp - 0x14], 0xa6af442c
add dword [ebp - 0x14], 0xa59d0002
mov dword [ebp - 0x10], 0x4c894ceb
add dword [ebp - 0x10], 0xb376b315
lea eax, [ebp - 0x1c]
push eax
mov eax, 0x24f7a3a7
add eax, 0xdb48dd5d
add eax, dword [ebp - 0xc]
call dword [eax]
mov dword [ebp - 0x1c], 0x29bfee91
sub dword [ebp - 0x1c], 0xb54d853b
mov dword [ebp - 0x18], 0x7026061
add dword [ebp - 0x18], 0x3a6a0114
mov dword [ebp - 0x14], 0x87f47289
add dword [ebp - 0x14], 0xdb7af9e3
mov dword [ebp - 0x10], 0x124fc083
sub dword [ebp - 0x10], 0x124fc083
lea ebx, [ebp - 0x1c]
push ebx
push eax
mov eax, 0x93632841
sub eax, 0x9322a741
add eax, dword [ebp - 0xc]
call dword [eax]
push 0x40
push 0x1000
push 0x3adec
push 0
call eax
mov ecx, 0xd7b13ac8
sub ecx, 0xd7b0e339
mov edx, eax
mov ebx, 0x46e400
add ebx, dword [ebp - 0xc]
mov edi, 0x4c016f47
sub edi, 0x72aac046
xor dword [ebp - 4], esi
mov esi, dword [ebx]
add dword [ebp - 8], 0x2421e767
add esi, edi
mov dword [edx], esi
add edx, 0xa01d611c
add edx, 0x5fe29ee8
add ebx, 0xdc49611d
add ebx, 0x23b69ee7
loop 0x405b29
add eax, 0x8a54759b
sub eax, 0x8a53248c
xor ebx, ebx
add ebx, eax
add eax, 0x8918c56f
sub eax, 0x8918c56a
mov ecx, 0x51473722
add ecx, 0xaef8c8de
add ecx, dword [ebp - 0xc]
call ebx
leave
ret

Function at 0x405cce
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x425f30
push esi
call fcn.00406212
push esi
call fcn.00405c71
mov edi, eax
test edi, edi
jne 0x405cef
xor eax, eax
jmp 0x405d47
push edi
call fcn.004064a6
test byte [0x42a258], 0x80
je 0x405d0c
mov ax, word [edi]
test ax, ax
je 0x405ceb
cmp ax, 0x5c
je 0x405ceb
sub edi, esi
sar edi, 1
jmp 0x405d26
call fcn.00406555
test eax, eax
je 0x405d20
test byte [eax], 0x10
je 0x405ceb
push esi
call fcn.00405c12
push esi
call sub.kernel32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x405d12
call fcn.00405bc6
push esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x405dc2
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405de1
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.kernel32.dll_SetFileAttributesW]
mov eax, esi
pop esi
ret 4

Function at 0x405de7
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.kernel32.dll_CreateFileW]
ret 0xc
Function at 0x402a8f
Capabilities:
Parse pe header

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

Function at 0x40963b
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x41c0c8
push esi
call fcn.004106fc
pop ecx
pop ecx
test eax, eax
jne 0x409669
xor al, al
jmp 0x4096e6
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.0040937c
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x4096a3
push dword [ebp - 0x210]
call fcn.004055d8
xor al, al
jmp 0x4096e4
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4096a9
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x4096c9
push edx
call fcn.00409572
pop ecx
test al, al
je 0x409694
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x4096d7
mov bl, 1
push dword [ebp - 0x210]
call fcn.004055d8
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00401f28
leave
ret

Function at 0x40c7f0
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41cf70
push 0x41cf68
push str.FlsAlloc
push 0x1f
call fcn.0040c6af
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40c824
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b1cc]
call esi
jmp 0x40c82a
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40c86e
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41cf80
push 0x41cf78
push str.FlsGetValue
push 0x21
call fcn.0040c6af
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40c8a5
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b1cc]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40c8ad
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41cf88
push 0x41cf80
push str.FlsSetValue
push 0x22
call fcn.0040c6af
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40c8e7
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41b1cc]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40d6fd
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 + 0x4242e8]
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 0x40d73d
cmp byte [ebx], 0xa
jne 0x40d73d
or byte [edi + eax + 0x28], 4
jmp 0x40d742
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 0x40d841
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40d824
inc eax
cmp dl, 0xd
je 0x40d76e
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40d794
cmp eax, ecx
jae 0x40d7a2
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 0x40d756
jmp 0x40d841
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 0x40d81f
cmp dword [ebp - 0x10], 0
je 0x40d81f
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4242e8]
test byte [eax + edi + 0x28], 0x48
je 0x40d7f9
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40d7e4
mov byte [esi], dl
jmp 0x40d7f5
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4242e8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40d841
cmp byte [ebp - 1], 0xa
jne 0x40d808
cmp esi, ebx
jne 0x40d808
mov byte [esi], 0xa
jmp 0x40d840
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00414d51
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40d841
mov byte [esi], 0xd
jmp 0x40d840
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4242e8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40d83e
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40d841
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40d84a
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 + 0x4242e8]
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 0x40d890
cmp word [ebx], dx
jne 0x40d890
or byte [eax + edi + 0x28], 4
jmp 0x40d895
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 0x40d9f8
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 0x40d9d8
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40d8d6
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40d90c
cmp eax, edx
jae 0x40d91a
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 0x40d8b1
jmp 0x40d9f8
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 0x40d9d3
cmp dword [ebp - 0x18], 0
je 0x40d9d3
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4242e8]
test byte [eax + edi + 0x28], 0x48
je 0x40d9a9
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 0x40d96d
mov word [esi], cx
jmp 0x40d9a4
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4242e8]
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 + 0x4242e8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4242e8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40d9f8
pop eax
cmp word [ebp - 4], ax
jne 0x40d9b9
cmp esi, ebx
jne 0x40d9b9
mov word [esi], ax
jmp 0x40d9f5
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00414d51
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40d9f8
push 0xd
pop eax
jmp 0x40d9b4
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4242e8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40d9f2
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40d9f8
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 0x412308
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 0x4123a5
push ebx
push esi
call fcn.004122d1
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.0040c3a4
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x412352
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4123a4
push edi
push eax
call fcn.0040c1da
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x412372
call fcn.0040c1a0
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4123a3
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040c3a4
add esp, 0x20
test eax, eax
jne 0x412391
push edi
call fcn.0040c1a0
jmp 0x412399
push ebx
call fcn.0040c1a0
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 0x4123a8
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4123b9
pop esi
ret
push ebx
push edi
push esi
call fcn.004122d1
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0040c1da
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4123e1
push ebx
push esi
push edi
call fcn.00403f30
add esp, 0xc
push 0
call fcn.0040c1a0
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x412b3b
Capabilities:
Set environment variable

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

Function at 0x416d47
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x416d8a
call fcn.0040ba95
mov dword [eax], 0xf
call fcn.0040baa8
mov dword [eax], 0xd
call fcn.0040b9c7
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401f28
leave
ret
test eax, eax
jne 0x416d91
inc eax
jmp 0x416d7e
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 0x416d7c
xor eax, eax
cmp ecx, 1
setne al
jmp 0x416d7e