joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402ccd
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbf8
push ebx
push esi
push edi
mov esi, 0
push esi
push dword [ebp + 0xc]
mov esi, 0x414266
push esi
call fcn.00401016
add esp, 0xc
mov esi, 0
push esi
mov esi, 0x400
push esi
lea esi, [ebp - 0x400]
push esi
push dword [ebp + 0xc]
call fcn.004010e9
add esp, 4
push eax
call sub.WSOCK32.dll_recv
mov dword [ebp - 0x404], eax
cmp dword [ebp - 0x404], 0
jl 0x402d2c
jmp 0x402e06
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 0x408], eax
mov esi, 0
push esi
push dword [ebp - 0x408]
mov esi, 0x414270
push esi
call fcn.00401016
add esp, 0xc
cmp dword [ebp - 0x408], 0x2733
je 0x402d66
jmp 0x402db6
cmp dword [ebp + 8], 0
je 0x402d75
jmp 0x402d94
mov esi, 0x414287
push esi
mov esi, 0
push esi
mov esi, 0
push esi
call fcn.00401456
add esp, 0xc
jmp 0x402db1
mov esi, 0x414288
push esi
mov esi, 0
push esi
mov esi, 0
push esi
push dword [ebp + 8]
call fcn.004017cb
add esp, 0x10
jmp 0x402e01
cmp dword [ebp + 8], 0
je 0x402dc5
jmp 0x402de4
mov esi, 0x414289
push esi
mov esi, 0
push esi
mov esi, 0xfffffffe
push esi
call fcn.00401456
add esp, 0xc
jmp 0x402e01
mov esi, 0x41428a
push esi
mov esi, 0
push esi
mov esi, 0xfffffffe
push esi
push dword [ebp + 8]
call fcn.004017cb
add esp, 0x10
jmp 0x402ecf
cmp dword [ebp - 0x404], 0
je 0x402e18
jmp 0x402e82
mov esi, 0
push esi
push dword [ebp - 0x404]
mov esi, 0x41428b
push esi
call fcn.00401016
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x402e41
jmp 0x402e60
mov esi, 0x4142b3
push esi
mov esi, 0
push esi
mov esi, 0xffffffff
push esi
call fcn.00401456
add esp, 0xc
jmp 0x402e7d
mov esi, 0x4142b4
push esi
mov esi, 0
push esi
mov esi, 0xffffffff
push esi
push dword [ebp + 8]
call fcn.004017cb
add esp, 0x10
jmp 0x402ecf
cmp dword [ebp + 8], 0
je 0x402e91
jmp 0x402eb1
lea esi, [ebp - 0x400]
push esi
push dword [ebp - 0x404]
push dword [ebp - 0x404]
call fcn.00401456
add esp, 0xc
jmp 0x402ecf
lea esi, [ebp - 0x400]
push esi
push dword [ebp - 0x404]
push dword [ebp - 0x404]
push dword [ebp + 8]
call fcn.004017cb
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405235
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov esi, 0
push esi
mov esi, 1
push esi
mov esi, 2
push esi
call sub.WSOCK32.dll_socket
mov dword [ebp - 8], eax
push dword [ebp - 8]
call fcn.00401a6a
add esp, 4
mov esi, 0
push esi
push dword [ebp + 8]
push dword [ebp - 8]
mov esi, 0x414a1a
push esi
call fcn.00401016
add esp, 0x10
mov word [ebp - 0x1c], 2
mov esi, 0
push esi
call sub.WSOCK32.dll_htonl
mov dword [ebp - 0x18], eax
push dword [ebp + 8]
call sub.WSOCK32.dll_htons
movzx ebx, ax
mov word [ebp - 0x1a], bx
mov esi, 0x10
push esi
lea esi, [ebp - 0x1c]
push esi
push dword [ebp - 8]
call sub.WSOCK32.dll_bind
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
mov esi, 1
je 0x4052d6
mov esi, 0
cmp esi, 0
je 0x4052e4
jmp 0x405304
push dword [ebp - 8]
mov esi, 0x414a28
push esi
call fcn.004010b8
add esp, 8
mov eax, 1
jmp 0x405358
mov esi, 0xa
push esi
push dword [ebp - 8]
call sub.WSOCK32.dll_listen
jmp 0x405330
push ebp
mov esi, 0x405317
push esi
call fcn.00406ef2
add esp, 8
lea esi, [ebp - 4]
push esi
call fcn.00406c83
add esp, 4
mov eax, 0
jmp 0x405358
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40654b
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov ebx, dword [ebp + 8]
mov byte [ebx], 0
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0xc], 0x1e
jge 0x40657a
jmp 0x406587
jmp 0x40665f
mov esi, dword [ebp - 0xc]
inc dword [ebp - 0xc]
jmp 0x40656b
mov eax, dword [ebp - 0xc]
mov esi, 0xc
imul esi
add eax, 0x417498
add eax, 8
mov ebx, eax
cmp dword [ebx], 0
jne 0x4065a9
jmp 0x40665a
lea esi, [ebp - 4]
push esi
lea esi, [ebp - 0x10]
push esi
mov eax, dword [ebp - 0xc]
mov esi, 0xc
imul esi
add eax, 0x417498
add eax, 4
mov ebx, eax
push dword [ebx]
mov esi, 0xffffffff
push esi
mov esi, 0
push esi
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4065f1
jmp 0x406655
mov esi, 0
push esi
push dword [ebp - 4]
push dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov esi, 0xc
imul esi
add eax, 0x417498
add eax, 8
mov ebx, eax
mov esi, dword [ebx]
call esi
add esp, 8
push eax
mov eax, dword [ebp - 0xc]
mov esi, 0xc
imul esi
add eax, 0x417498
mov ebx, eax
push dword [ebx]
mov esi, 0x414dd5
push esi
push dword [ebp + 8]
call fcn.00408480
add esp, 4
mov esi, 1
imul esi
add eax, dword [ebp + 8]
push eax
call fcn.00408078
add esp, 0x14
jmp 0x406655
jmp 0x40665a
jmp 0x40657f
mov eax, dword [ebp + 8]
jmp 0x406667
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406826
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbfc
push ebx
push esi
push edi
mov esi, 0
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
mov esi, 0x414e24
push esi
lea esi, [ebp - 0x404]
push esi
call fcn.00408078
add esp, 0x10
lea esi, [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp - 4]
push dword [ebp + 8]
lea esi, [ebp - 0x404]
push esi
call fcn.00408480
add esp, 4
mov esi, 1
imul esi
lea esi, [ebp - 0x404]
add eax, esi
push eax
call fcn.00409389
add esp, 0xc
mov dword [ebp - 4], 0
lea esi, [ebp - 0x404]
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40693a
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0
push ebx
push esi
push edi
mov eax, dword [0x41a798]
mov esi, 0xc
imul esi
add eax, 0x417794
mov esi, dword [ebp + 8]
mov ebx, eax
mov dword [ebx], esi
mov eax, dword [0x41a798]
mov esi, 0xc
imul esi
add eax, 0x417794
add eax, 8
mov esi, dword [ebp + 0x10]
mov ebx, eax
mov dword [ebx], esi
mov eax, dword [0x41a798]
mov esi, 0xc
imul esi
add eax, 0x417794
add eax, 4
mov esi, dword [ebp + 0xc]
mov ebx, eax
mov dword [ebx], esi
mov esi, 1
add esi, dword [0x41a798]
mov eax, esi
mov esi, 0x400
cdq
idiv esi
mov dword [0x41a798], edx
mov esi, dword [0x41a794]
cmp esi, dword [0x41a798]
je 0x4069c6
jmp 0x4069f7
mov esi, 0x10
push esi
mov esi, 0x414e5d
push esi
mov esi, 0x414e2e
push esi
mov esi, 0
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, 0xfffffffe
push esi
call fcn.00408e80
add esp, 4
jmp 0x4069f7
inc dword [0x41778c]
mov esi, dword [0x41778c]
cmp esi, dword [0x417788]
je 0x406a14
jmp 0x406a33
mov esi, 0
push esi
push dword [0x417788]
mov esi, 0x414e69
push esi
call fcn.00406826
add esp, 0xc
jmp 0x406a33
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406b3b
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
push ebx
push esi
push edi
mov esi, 2
push esi
mov esi, 0
push esi
mov esi, 0
push esi
lea esi, [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
cmp eax, 0
je 0x406b89
jmp 0x406bba
mov esi, 0x10
push esi
mov esi, 0x414ec3
push esi
mov esi, 0x414e9e
push esi
mov esi, 0
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, 0xffffffff
push esi
call fcn.00408e80
add esp, 4
jmp 0x406bba
mov eax, dword [ebp - 4]
jmp 0x406bc2
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406bc7
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0
push ebx
push esi
push edi
cmp dword [0x41a7b4], 0
je 0x406be5
jmp 0x406c00
mov esi, 0x41a79c
push esi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x41a7b4], 1
jmp 0x406c00
mov esi, 0x41a79c
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x41a7b8]
inc dword [0x41a7b8]
cmp dword [0x41a7b8], 1
jg 0x406c2a
jmp 0x406c5b
mov esi, 0x10
push esi
mov esi, 0x414f31
push esi
mov esi, 0x414eff
push esi
mov esi, 0
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, 0xfffffffe
push esi
call fcn.00408e80
add esp, 4
jmp 0x406c5b
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406c83
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
call fcn.00406b3b
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 8], eax
call fcn.00406bc7
mov ebx, dword [ebp + 8]
dec dword [ebx]
cmp dword [ebx], 0
jl 0x406cb8
jmp 0x406d22
mov esi, 0
push esi
push dword [ebp - 8]
push dword [ebp + 8]
mov esi, 0x414f66
push esi
call fcn.00406826
add esp, 0x10
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0040693a
add esp, 0xc
call fcn.00406c60
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov dword [ebp - 0xc], eax
mov dword [0x41a7bc], 1
call fcn.00406bc7
mov esi, 0
push esi
push dword [ebp - 8]
push dword [ebp + 8]
mov esi, 0x414f8c
push esi
call fcn.00406826
add esp, 0x10
jmp 0x406d22
call fcn.00406c60
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406d35
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 8], eax
call fcn.00406bc7
mov ebx, dword [ebp + 8]
inc dword [ebx]
push dword [ebp + 8]
call fcn.004068a3
add esp, 4
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
mov esi, 1
je 0x406d75
mov esi, 0
cmp esi, 0
je 0x406d83
jmp 0x406e5b
push dword [ebp - 4]
lea eax, [ebp - 0x24]
push eax
call fcn.00406a38
add esp, 8
mov esi, eax
lea ebx, [ebp - 0x14]
mov edi, ebx
mov ecx, 0xc
cld
rep movsb byte es:[edi], byte [esi]
mov esi, 0
push esi
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp + 8]
mov esi, 0x414fde
push esi
call fcn.00406826
add esp, 0x14
mov dword [0x41a7bc], 0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x406de9
jmp 0x406e1a
cmp dword [0x41a7bc], 0
je 0x406dfb
jmp 0x406e15
mov esi, 0
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov dword [ebp - 0x18], eax
jmp 0x406de9
jmp 0x406e56
cmp dword [ebp - 0x18], 1
mov esi, 1
je 0x406e2e
mov esi, 0
cmp esi, 0
je 0x406e3c
jmp 0x406e56
mov esi, 0
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov dword [ebp - 0x18], eax
jmp 0x406e1a
jmp 0x406e5b
call fcn.00406c60
pop edi
pop esi
pop ebx
leave
ret

Function at 0x408ea2
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
call fcn.00408f2d
mov dword [0x4107b8], 1
cmp dword [esp + 0x10], 0
mov ebx, dword [esp + 0x14]
mov byte [0x4107b4], bl
jne 0x408f03
cmp dword [0x4120b4], 0
je 0x408ef1
mov esi, dword [0x4120ac]
sub esi, 4
cmp esi, dword [0x4120b4]
jb 0x408ef1
mov eax, dword [esi]
test eax, eax
je 0x408ee6
call eax
sub esi, 4
cmp esi, dword [0x4120b4]
jae 0x408ede
push 0x410020
push 0x410018
call fcn.00408f43
add esp, 8
push 0x410028
push 0x410024
call fcn.00408f43
add esp, 8
test ebx, ebx
je 0x408f20
call fcn.00408f38
jmp 0x408f2a
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebx
ret
Function at 0x408fde
Capabilities:
Accept command line arguments
Query environment variable
Terminate process

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f140
push 0x40c790
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x410780], eax
mov al, ah
and eax, 0xff
mov dword [0x41078c], eax
mov eax, dword [0x410780]
shr dword [0x410780], 0x10
and eax, 0xff
mov dword [0x410788], eax
shl eax, 8
add eax, dword [0x41078c]
mov dword [0x410784], eax
call fcn.0040c6e5
call fcn.0040a761
test eax, eax
jne 0x409057
push 0x10
call fcn.00409157
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040c5f3
call fcn.0040c5e8
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4120a8], eax
call fcn.0040c105
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov dword [0x4107bc], eax
call fcn.0040c03a
call fcn.00408e50
mov esi, dword [0x4120a8]
mov al, byte [esi]
cmp al, 0x22
je 0x4090a5
cmp al, 0x20
jbe 0x4090d1
inc esi
cmp byte [esi], 0x20
ja 0x40909d
jmp 0x4090d1
inc esi
cmp byte [esi], 0x22
je 0x4090d0
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x4090cb
movzx eax, bl
push eax
call fcn.0040bff7
add esp, 4
test eax, eax
je 0x4090c5
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x4090ae
cmp byte [esi], 0x22
jne 0x4090d1
inc esi
cmp byte [esi], 0
je 0x4090e1
cmp byte [esi], 0x20
ja 0x4090e1
inc esi
cmp byte [esi], 0
jne 0x4090d6
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x409101
movzx eax, word [ebp - 0x40]
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.00408e80
jmp 0x40913d
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x409189
Capabilities:
Create thread
Resume thread

Disassembly:
push esi
push edi
xor edi, edi
push 0x70
push 1
call fcn.0040c8e6
add esp, 8
mov esi, eax
cmp esi, edi
je 0x4091e0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
push esi
mov dword [esi + 0x48], eax
push 4
mov dword [esi + 0x4c], ecx
mov dword [esi + 0x14], 1
mov dword [esi + 0x50], 0x410f60
push esi
push 0x40920e
push dword [esp + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 4], eax
mov edi, eax
test edi, edi
jne 0x4091fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call fcn.00409300
add esp, 4
test edi, edi
je 0x4091f6
push edi
call fcn.0040b739
add esp, 4
mov eax, 0xffffffff
pop edi
pop esi
ret
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x4091d8
mov eax, edi
jmp 0x4091fb
Function at 0x40a761
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.00409f4e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x410d98], eax
cmp eax, 0xffffffff
je 0x40a7be
push 0x70
push 1
call fcn.0040c8e6
add esp, 8
mov esi, eax
test esi, esi
je 0x40a7be
push esi
mov eax, dword [0x410d98]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40a7be
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov eax, 1
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], 0x410f60
mov dword [esi + 0x14], 1
jmp 0x40a7c0
xor eax, eax
pop esi
ret

Function at 0x40a7c2
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
mov eax, dword [0x410d98]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40a821
push 0x70
push 1
call fcn.0040c8e6
add esp, 8
mov esi, eax
test esi, esi
je 0x40a817
push esi
mov eax, dword [0x410d98]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40a817
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x14], 1
mov dword [esi + 0x50], 0x410f60
jmp 0x40a821
push 0x10
call fcn.00409157
add esp, 4
mov eax, esi
pop esi
ret

Function at 0x40a825
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x410d98], 0xffffffff
push esi
je 0x40a8c4
mov esi, dword [esp + 8]
test esi, esi
jne 0x40a84d
mov eax, dword [0x410d98]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x40a8b6
mov eax, dword [esi + 0x24]
test eax, eax
je 0x40a85d
push eax
call fcn.00409300
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x40a86d
push eax
call fcn.00409300
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x40a87d
push eax
call fcn.00409300
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x40a88d
push eax
call fcn.00409300
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x40a89d
push eax
call fcn.00409300
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x40a8ad
push eax
call fcn.00409300
add esp, 4
push esi
call fcn.00409300
add esp, 4
push 0
mov eax, dword [0x410d98]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x40b4c1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 8], esi
cmp dword [ebp + 0x10], esi
jne 0x40b4de
xor eax, eax
jmp 0x40b62e
mov eax, dword [ebp + 8]
test byte [eax + 0x411208], 0x20
je 0x40b4f7
push 2
push 0
push eax
call fcn.0040cc5a
add esp, 0xc
mov eax, dword [ebp + 8]
test byte [eax + 0x411208], 0x80
je 0x40b581
mov dword [ebp - 0xc], 0
mov edi, dword [ebp + 0xc]
mov eax, edi
sub eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x40b5b9
lea ebx, [ebp - 0x410]
mov eax, edi
sub eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x40b54b
mov al, byte [edi]
inc edi
cmp al, 0xa
jne 0x40b537
inc esi
mov byte [ebx], 0xd
inc ebx
lea ecx, [ebp - 0x410]
mov byte [ebx], al
inc ebx
mov eax, ebx
sub eax, ecx
cmp eax, 0x400
jl 0x40b521
lea eax, [ebp - 0x410]
push 0
sub ebx, eax
lea ecx, [ebp - 0x410]
lea eax, [ebp - 4]
push eax
push ebx
push ecx
mov eax, dword [ebp + 8]
push dword [eax*4 + 0x411308]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b5b0
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
cmp eax, ebx
jge 0x40b50d
jmp 0x40b5b9
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax*4 + 0x411308]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b5b0
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
jmp 0x40b5b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], 0
jne 0x40b629
cmp dword [ebp - 0xc], 0
je 0x40b5f4
cmp dword [ebp - 0xc], 5
jne 0x40b5e2
call fcn.0040b7ac
mov dword [eax], 9
call fcn.0040b7b5
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
jmp 0x40b5ed
push dword [ebp - 0xc]
call fcn.0040b739
add esp, 4
mov eax, 0xffffffff
jmp 0x40b62e
mov eax, dword [ebp + 8]
test byte [eax + 0x411208], 0x40
je 0x40b60c
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x40b60c
xor eax, eax
jmp 0x40b62e
call fcn.0040b7ac
mov dword [eax], 0x1c
call fcn.0040b7b5
mov dword [eax], 0
mov eax, 0xffffffff
jmp 0x40b62e
mov eax, dword [ebp - 8]
sub eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40c859
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 4
xor ecx, ecx
mov eax, 0x411a20
push edi
cmp dword [eax], edx
je 0x40c877
add eax, 8
inc ecx
cmp eax, 0x411a98
jb 0x40c868
cmp dword [ecx*8 + 0x411a20], edx
lea eax, [ecx*8]
jne 0x40c8b0
mov edx, dword [eax + 0x411a24]
push 0
lea eax, [esp + 8]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, dword [0x411310]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
add esp, 4
ret
Function at 0x40deea
Capabilities:
Set environment variable

Disassembly:
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
test esi, esi
je 0x40e0d5
push 0x3d
push esi
call fcn.0040eb50
add esp, 8
mov ebp, eax
test ebp, ebp
je 0x40e0d5
cmp ebp, esi
je 0x40e0d5
cmp byte [ebp + 1], 1
sbb eax, eax
mov ecx, dword [0x41079c]
neg eax
mov dword [esp + 0x10], eax
cmp dword [0x4107a0], ecx
jne 0x40df42
push ecx
call fcn.0040e13f
add esp, 4
mov dword [0x41079c], eax
cmp dword [0x41079c], 0
jne 0x40dfd1
cmp dword [esp + 0x1c], 0
je 0x40df6d
cmp dword [0x4107a4], 0
je 0x40df6d
call fcn.0040baf1
test eax, eax
je 0x40dfd1
jmp 0x40e0d5
cmp dword [esp + 0x10], 0
je 0x40df7b
xor eax, eax
jmp 0x40e0da
cmp dword [0x41079c], 0
jne 0x40dfa6
push 4
call fcn.004093e1
add esp, 4
mov dword [0x41079c], eax
test eax, eax
je 0x40e0d5
mov eax, dword [0x41079c]
mov dword [eax], 0
cmp dword [0x4107a4], 0
jne 0x40dfd1
push 4
call fcn.004093e1
add esp, 4
mov dword [0x4107a4], eax
test eax, eax
je 0x40e0d5
mov eax, dword [0x4107a4]
mov dword [eax], 0
mov edi, dword [0x41079c]
sub ebp, esi
push ebp
push esi
call fcn.0040e0e2
add esp, 8
mov ebx, eax
test ebx, ebx
jl 0x40e027
cmp dword [edi], 0
je 0x40e027
cmp dword [esp + 0x10], 0
je 0x40e022
lea eax, [edi + ebx*4]
cmp dword [eax], 0
je 0x40e00b
mov ecx, dword [eax + 4]
inc ebx
mov dword [eax], ecx
add eax, 4
cmp dword [eax], 0
jne 0x40dffd
lea eax, [ebx*4]
push eax
push edi
call fcn.0040e9ea
add esp, 8
test eax, eax
je 0x40e062
jmp 0x40e05d
mov dword [edi + ebx*4], esi
jmp 0x40e062
cmp dword [esp + 0x10], 0
jne 0x40e0d1
test ebx, ebx
jge 0x40e038
neg ebx
lea eax, [ebx*4 + 8]
push eax
push edi
call fcn.0040e9ea
add esp, 8
test eax, eax
je 0x40e0d5
lea ecx, [eax + ebx*4]
mov dword [ecx], esi
mov dword [ecx + 4], 0
mov dword [0x41079c], eax
cmp dword [esp + 0x1c], 0
je 0x40e0cd
mov edi, esi
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.004093e1
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x40e0cd
mov edi, esi
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x10], 1
sbb eax, eax
lea ecx, [ebp + ebx]
mov ebp, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov byte [ecx], 0
lea ecx, [ecx + 1]
and eax, ecx
push eax
push ebx
call ebp
push ebx
call fcn.00409300
add esp, 4
xor eax, eax
jmp 0x40e0da
xor eax, eax
jmp 0x40e0da
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x40e8c1
Capabilities:
Clear file content

Disassembly:
push ebp
mov eax, 0x100c
mov ebp, esp
call fcn.0040ecd0
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 0
push 1
push 0
push esi
call fcn.0040cc5a
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x40e9de
push 2
push 0
push esi
call fcn.0040cc5a
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e9de
mov ecx, dword [ebp + 0xc]
mov ebx, ecx
sub ebx, eax
test ebx, ebx
jle 0x40e986
lea edi, [ebp - 0x100c]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.0040ec66
add esp, 8
mov dword [ebp - 0xc], eax
mov eax, 0x1000
cmp ebx, eax
jge 0x40e940
mov eax, ebx
push eax
lea ecx, [ebp - 0x100c]
push ecx
push esi
call fcn.0040b4c1
add esp, 0xc
mov edi, eax
cmp edi, 0xffffffff
je 0x40e960
sub ebx, edi
test ebx, ebx
jg 0x40e935
jmp 0x40e978
call fcn.0040b7b5
cmp dword [eax], 5
jne 0x40e975
call fcn.0040b7ac
mov dword [eax], 0xd
mov dword [ebp - 4], edi
push dword [ebp - 0xc]
push esi
call fcn.0040ec66
add esp, 8
jmp 0x40e9cb
jge 0x40e9cb
push 0
push ecx
push esi
call fcn.0040cc5a
add esp, 0xc
push esi
call fcn.0040d872
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ecx, ecx
mov dword [ebp - 4], ecx
cmp ecx, 0xffffffff
jne 0x40e9cb
call fcn.0040b7ac
mov dword [eax], 0xd
call fcn.0040b7b5
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push esi
call fcn.0040cc5a
add esp, 0xc
mov eax, dword [ebp - 4]
jmp 0x40e9e3
mov eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret