joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404b00
Capabilities:
Get mac address on windows

Disassembly:
mov eax, 0x2808
call fcn.00408580
push ebx
push ebp
mov ebp, ecx
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x14], 0x2800
call sub.iphlpapi.dll_GetAdaptersInfo
lea edx, [esp + 0x10]
lea ebx, [esp + 0x10]
test edx, edx
je 0x404bfa
push esi
push edi
lea eax, [ebx + 0x10c]
test eax, eax
je 0x404be2
push 0x194
call fcn.00420175
mov edx, eax
lea edi, [ebx + 8]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0x10c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0x104]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x190]
lea esi, [ebx + 0x194]
mov eax, ecx
lea edi, [edx + 0x184]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x190]
mov dword [edx + 0x18c], ecx
mov eax, dword [ebp + 8]
mov dword [edx + 0x190], eax
mov eax, dword [ebp + 4]
inc eax
mov dword [ebp + 8], edx
mov dword [ebp + 4], eax
mov ebx, dword [ebx]
test ebx, ebx
jne 0x404b37
mov eax, dword [ebp + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2808
ret
mov eax, dword [ebp + 4]
pop ebp
pop ebx
add esp, 0x2808
ret
Function at 0x406050
Capabilities:
Create service
Start service

Disassembly:
push 0xffffffffffffffff
push 0x42c568
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x14]
call fcn.00407553
mov eax, dword [esi + 0x18]
push 0
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x40], 0
call fcn.00407616
test eax, eax
jne 0x4060bb
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], 0xffffffff
call fcn.00407590
pop edi
pop esi
pop ebp
mov eax, 0xffff8b34
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x4060f9
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], 0xffffffff
call fcn.00407590
pop edi
pop esi
pop ebp
mov eax, 0xffff8b33
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
mov eax, dword [esi + 0x10]
push 0xf01ff
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x406131
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x14]
push edi
mov edx, dword [esi + 0x10]
push edi
push edi
push edi
push edi
push eax
push 1
push 3
push 1
push 0x30
push ecx
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov edi, eax
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call ebp
test edi, edi
jne 0x406167
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], 0xffffffff
call fcn.00407590
pop edi
pop esi
pop ebp
mov eax, 0xffff8b32
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push edi
mov ebx, eax
call ebp
test ebx, ebx
jne 0x4061a4
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], 0xffffffff
call fcn.00407590
pop edi
pop esi
pop ebp
mov eax, 0xffff8b31
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
mov eax, dword [esi + 0x1c]
push 0
push 4
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
or ebx, 0xffffffff
mov dword [esi + 0x20], eax
cmp eax, ebx
jne 0x4061ec
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], ebx
call fcn.00407590
pop edi
pop esi
pop ebp
mov eax, 0xffff8b30
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
lea edi, [esi + 0x24]
mov ecx, esi
push edi
call fcn.00406480
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0x10]
push 0
push eax
push 0x400
push edi
push 0x400
push edi
push 0x222000
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x406242
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], ebx
call fcn.00407590
pop edi
pop esi
pop ebp
mov eax, 0xffff8b20
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
mov edx, dword [edi]
lea ecx, [esp + 0x14]
mov dword [esi + 8], edx
mov dword [esp + 0x38], ebx
call fcn.00407590
mov ecx, dword [esp + 0x30]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x4063d0
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x1c
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x20]
cmp eax, 0xffffffff
je 0x4063ed
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x20], 0xffffffff
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x406439
mov esi, dword [esi + 0x10]
push 0xf01ff
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
call edi
test esi, esi
je 0x406439
lea eax, [esp + 8]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call edi
pop edi
pop esi
add esp, 0x1c
ret
Function at 0x408800
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x430eb0
call fcn.0040ceb8
mov edi, 0x94
mov eax, edi
call fcn.00408580
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 [0x43d408], ecx
mov eax, dword [esi + 4]
mov dword [0x43d414], eax
mov edx, dword [esi + 8]
mov dword [0x43d418], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x43d40c], esi
cmp ecx, 2
je 0x408860
or esi, 0x8000
mov dword [0x43d40c], esi
shl eax, 8
add eax, edx
mov dword [0x43d410], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40889b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40889b
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4088b3
cmp eax, 0x20b
je 0x4088a0
mov dword [ebp - 0x1c], esi
jmp 0x4088c7
cmp dword [ecx + 0x84], 0xe
jbe 0x40889b
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4088c1
cmp dword [ecx + 0x74], 0xe
jbe 0x40889b
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.004105a3
pop ecx
test eax, eax
jne 0x4088db
push 0x1c
call fcn.00408786
pop ecx
call fcn.0040cc30
test eax, eax
jne 0x4088ec
push 0x10
call fcn.00408786
pop ecx
mov dword [ebp - 4], esi
call fcn.0041033f
test eax, eax
jge 0x408900
push 0x1b
call fcn.00408761
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x43ec30], eax
call fcn.00410219
mov dword [0x43d3f8], eax
call fcn.00410177
test eax, eax
jge 0x408926
push 8
call fcn.00408761
pop ecx
call fcn.0040ff2b
test eax, eax
jge 0x408937
push 9
call fcn.00408761
pop ecx
call fcn.004096dd
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x40894a
push eax
call fcn.00408761
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040fec2
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x40896b
movzx eax, word [ebp - 0x34]
jmp 0x40896e
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.004191e4
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40898c
push edi
call fcn.004097fc
call fcn.0040981e
jmp 0x4089be
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040cef1
ret
Function at 0x409911
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 0x40992e
call fcn.0040bde8
mov dword [eax], 0x16
xor eax, eax
jmp 0x409998
push esi
push 0x88
push 1
call fcn.00411dec
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x409983
push esi
call fcn.0040ca35
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 0x409961
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x40986d
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x409997
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.004093a5
test ebx, ebx
pop ecx
je 0x409995
push ebx
call fcn.0040bdfa
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40fb06
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 + 0x43ac38]
je 0x40fb26
inc eax
cmp eax, 0x12
jb 0x40fb17
shl eax, 3
cmp edx, dword [eax + 0x43ac38]
mov dword [ebp + 8], eax
jne 0x40fcc4
mov ecx, dword [0x43d400]
cmp ecx, 1
je 0x40fc99
test ecx, ecx
jne 0x40fb58
cmp dword [0x43a464], 1
je 0x40fc99
cmp edx, 0xfc
je 0x40fcc4
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 0x40fb93
push 5
pop ecx
mov esi, str._program_name_unknown_
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 0x40fba2
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x40fbda
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fbba
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x4317a8
push ebx
call fcn.00414660
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fbdf
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x43ac3c]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40fbf6
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.00408580
mov edx, esp
push 6
pop ecx
mov esi, str.Runtime_Error__n_nProgram:
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 0x40fc22
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40fc2e
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 0x40fc47
mov eax, dword [ebp + 8]
mov esi, 0x431788
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x43ac3c]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fc62
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40fc6e
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.004160fc
add esp, 0xc
jmp 0x40fcc4
mov ecx, dword [eax + 0x43ac3c]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40fca4
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 0x41252b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
push esi
push edi
je 0x412595
push ebx
call fcn.004124f4
test eax, eax
pop ecx
jne 0x412566
call fcn.0040bdf1
mov dword [eax], 0xf
call fcn.0040bde8
mov dword [eax], 0xd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
and byte [ebp + 0xb], 0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x108]
push eax
mov esi, 0x104
push esi
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4125a8
lea eax, [ebp - 0x108]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x41255f
inc eax
cmp eax, esi
ja 0x41255f
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x4125da
cmp eax, dword [ebp + 0x10]
jg 0x4125c0
mov eax, dword [ebp + 0x10]
push eax
call fcn.00409393
mov edi, eax
test edi, edi
pop ecx
jne 0x4125ef
call fcn.0040bde8
mov dword [eax], 0xc
jmp 0x41255f
cmp eax, dword [ebp + 0x10]
jle 0x4125ef
call fcn.0040bde8
mov dword [eax], 0x22
jmp 0x41255f
mov esi, edi
lea eax, [ebp - 0x108]
lea ecx, [ebp - 0x108]
sub esi, eax
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x4125ff
mov eax, edi
jmp 0x412561

Function at 0x412de8
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.00408580
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x412e7d
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 [0x43d408]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x412e7d
cmp eax, 1
je 0x412e95
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 0x412e7d
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x412e52
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x412e79
xor eax, eax
inc eax
jmp 0x412eb1
cmp esi, ebx
jae 0x412e81
xor eax, eax
jmp 0x412eb1
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x43d408]
jmp 0x412e97
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 0x415162
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
jne 0x415180
xor eax, eax
jmp 0x4152ee
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 + 0x43d8c0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4151b3
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.00417546
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x415285
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
jbe 0x4152c0
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
mov dword [ebp - 8], edi
cmp ecx, dword [ebp + 0x10]
jae 0x41520e
mov edx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4151ff
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 8]
mov byte [eax], dl
inc eax
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x400
jl 0x4151e2
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x18]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41524e
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
cmp eax, edi
jl 0x415257
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x4151d3
jmp 0x415259
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x4152e9
cmp dword [ebp - 4], edi
je 0x4152c0
push 5
pop esi
cmp dword [ebp - 4], esi
jne 0x4152b2
call fcn.0040bde8
mov dword [eax], 9
call fcn.0040bdf1
mov dword [eax], esi
jmp 0x4152bb
push edi
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4152a7
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
jmp 0x415259
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x415259
push dword [ebp - 4]
call fcn.0040bdfa
pop ecx
or eax, 0xffffffff
jmp 0x4152ec
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4152d5
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x4152d5
xor eax, eax
jmp 0x4152ec
call fcn.0040bde8
mov dword [eax], 0x1c
call fcn.0040bdf1
mov dword [eax], edi
jmp 0x4152bb
sub eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret
Function at 0x4160fc
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x43d83c], ebx
push esi
push edi
jne 0x41617c
push 0x432bb0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4161b7
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x432ba4
push edi
call esi
test eax, eax
mov dword [0x43d83c], eax
je 0x4161b7
push 0x432b94
push edi
call esi
push 0x432b80
push edi
mov dword [0x43d840], eax
call esi
cmp dword [0x43d408], 2
mov dword [0x43d844], eax
jne 0x41617c
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x43d84c], eax
je 0x41617c
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x43d848], eax
mov eax, dword [0x43d848]
test eax, eax
je 0x4161c1
call eax
test eax, eax
je 0x4161a8
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x43d84c]
test eax, eax
je 0x4161a8
test byte [ebp - 8], 1
jne 0x4161c1
cmp dword [0x43d414], 4
jb 0x4161bb
or byte [ebp + 0x12], 0x20
jmp 0x4161e0
xor eax, eax
jmp 0x4161f0
or byte [ebp + 0x12], 4
jmp 0x4161e0
mov eax, dword [0x43d840]
test eax, eax
je 0x4161e0
call eax
mov ebx, eax
test ebx, ebx
je 0x4161e0
mov eax, dword [0x43d844]
test eax, eax
je 0x4161e0
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x43d83c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x417687
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 0x41784d
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x43d8c0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x41784d
test cl, 0x48
je 0x4176ed
mov al, byte [eax + 5]
cmp al, 0xa
je 0x4176ed
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 0x41773f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x417727
call fcn.0040bde8
mov dword [eax], 9
call fcn.0040bdf1
mov dword [eax], esi
jmp 0x417737
cmp eax, 0x6d
je 0x41784d
push eax
call fcn.0040bdfa
pop ecx
or eax, 0xffffffff
jmp 0x41784f
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 0x417848
test edx, edx
je 0x417762
cmp byte [ebx], 0xa
jne 0x417762
or al, 4
jmp 0x417764
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 0x417842
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x417832
cmp al, 0xd
je 0x417798
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x417824
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4177b2
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4177ad
add dword [ebp + 0x10], 2
jmp 0x417806
mov dword [ebp + 0x10], eax
jmp 0x417820
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 0x4177da
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x417820
cmp dword [ebp - 0xc], 0
je 0x417820
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4177fb
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x417806
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x417823
cmp ebx, dword [ebp + 0xc]
jne 0x41780b
cmp byte [ebp - 1], 0xa
jne 0x41780b
mov byte [ebx], 0xa
jmp 0x417823
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00415043
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x417824
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x41777c
jmp 0x417842
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x417842
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x41784f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4178ff
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
call fcn.00415043
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x417a44
push 2
push esi
push dword [ebp + 8]
call fcn.00415043
add esp, 0xc
cmp eax, ebx
je 0x417a44
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x4179e7
mov ebx, 0x1000
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x417978
call fcn.0040bde8
mov dword [eax], 0xc
or esi, 0xffffffff
jmp 0x417a2f
push 0x8000
push dword [ebp + 8]
call fcn.0041810b
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp edi, ebx
mov eax, ebx
jge 0x417992
mov eax, edi
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.00415162
add esp, 0xc
cmp eax, 0xffffffff
je 0x4179ae
sub edi, eax
test edi, edi
jg 0x41798a
jmp 0x4179c6
call fcn.0040bdf1
cmp dword [eax], 5
jne 0x4179c3
call fcn.0040bde8
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.0041810b
pop ecx
pop ecx
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x417a2f
jge 0x417a2f
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00415043
push dword [ebp + 8]
call fcn.004158ad
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x417a2f
call fcn.0040bde8
mov dword [eax], 0xd
call fcn.0040bdf1
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.00415043
add esp, 0xc
mov eax, esi
pop edi
jmp 0x417a46
mov eax, ebx
pop esi
pop ebx
leave
ret