joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401ee2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x411280]
jne 0x401eec
repz ret
jmp fcn.00404369

Function at 0x4025e7
Capabilities:
Accept command line arguments
Parse pe header

Disassembly:
push 0x14
push 0x40f530
call fcn.00403770
mov eax, 0x5a4d
cmp word [0x400000], ax
jne 0x4024e7
mov eax, dword [0x40003c]
cmp dword [eax + 0x400000], 0x4550
jne 0x4024e7
mov ecx, 0x10b
cmp word [eax + 0x400018], cx
jne 0x4024e7
cmp dword [eax + 0x400074], 0xe
jbe 0x4024e7
xor ecx, ecx
cmp dword [eax + 0x4000e8], ecx
setne cl
mov dword [ebp - 0x1c], ecx
jmp 0x4024eb
and dword [ebp - 0x1c], 0
push 1
call fcn.00406dc2
pop ecx
test eax, eax
jne 0x4024ff
push 0x1c
call fcn.00406dc2
pop ecx
call fcn.00405287
test eax, eax
jne 0x402510
push 0x10
call fcn.00406dc2
pop ecx
call fcn.00405952
and dword [ebp - 4], 0
call fcn.004032ff
test eax, eax
jge 0x40252a
push 0x1b
call fcn.00406dc2
pop ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x412ba0], eax
call fcn.00406dc2
mov dword [0x41203c], eax
call fcn.00406dc2
test eax, eax
jge 0x402550
push 8
call fcn.00406dc2
pop ecx
call fcn.00405fde
test eax, eax
jge 0x402561
push 9
call fcn.00406dc2
pop ecx
push 1
call fcn.00406dc2
pop ecx
test eax, eax
je 0x402574
push eax
call fcn.00406dc2
pop ecx
mov eax, dword [0x412018]
mov dword [0x41201c], eax
push eax
push dword [0x412010]
push dword [0x41200c]
call main
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 0
jne 0x4025a2
push eax
call fcn.00406dc2
call fcn.00402400
jmp 0x4025d7
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x20]
call fcn.004037b5
ret
call fcn.00406dc2
jmp 0x402495

Function at 0x406dc2
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
pushal
call 0x406dd1
pop dword [ebp - 0x30]
mov eax, 0x406dd1
sub dword [ebp - 0x30], eax
push 0x40
push 0x1000
push 0x3af11
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x30]
call dword [eax]
mov ecx, 0x4e96
xor edx, edx
add edx, eax
mov esi, 0x3b515c8e
sub esi, 0x3b1020ca
add esi, dword [ebp - 0x30]
mov ebx, 0x6ae000e3
add ebx, 0xf056c38
mov edi, dword [esi]
xor dword [ebp - 8], edi
sub edi, ebx
mov dword [edx], edi
sub dword [ebp - 0x1c], edx
add edx, 0xc6f4cb93
sub edx, 0xc6f4cb8f
add esi, 4
loop 0x406e22
add eax, 0xf907aaf4
add eax, 0x6f98237
mov ebx, eax
add eax, 0xb97ffba7
add eax, 0x4680045e
mov ecx, 0xdfc989d6
sub ecx, 0xdf8989d6
add ecx, dword [ebp - 0x30]
call ebx
leave
ret
Function at 0x1001a093
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
pushal
call 0x1001a0a2
pop dword [ebp - 0x1c]
mov eax, 0x1001a0a2
sub dword [ebp - 0x1c], eax
push 0x40
push 0x1000
push 0x408bb
push 0
mov eax, 0x556f02d5
add eax, 0xba945e07
add eax, dword [ebp - 0x1c]
call dword [eax]
mov ecx, 0x4841
mov edi, eax
mov edx, 0xaf2bfd7
sub edx, 0xfaef01d7
add edx, dword [ebp - 0x1c]
mov esi, 0xd7a1a9ba
sub esi, 0xcd9b8710
mov ebx, dword [edx]
xor dword [ebp - 0xc], eax
sub ebx, esi
mov dword [ebp - 0xc], 0xb46ff417
mov dword [edi], ebx
add dword [ebp - 0x18], 0x4ca7f0e8
add edi, 4
add edx, 4
loop 0x1001a0f6
add eax, 0x9633c1fc
add eax, 0x69cd51db
xor ebx, ebx
add ebx, eax
add eax, 0x24218be2
sub eax, 0x24218bdd
mov ecx, 0x10000000
add ecx, dword [ebp - 0x1c]
call ebx
leave
ret

Function at 0x100289d0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
mov eax, dword [0x100330b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x10035b0c]
test dword [ebp + 8], eax
je 0x10028a7a
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x808]
push eax
call fcn.1001a093
xor eax, eax
add esp, 0xc
mov word [ebp - 8], ax
mov eax, dword [0x10035b08]
test eax, eax
je 0x10028a6d
lea ecx, [ebp - 0x808]
push ecx
push eax
call fcn.1001a093
mov eax, dword [0x100330ac]
pop ecx
pop ecx
test eax, eax
jle 0x10028a7a
push esi
mov esi, dword [0x10035b10]
push edi
mov edi, dword [0x10035b14]
cdq
push edx
push eax
push edi
push esi
call fcn.10029420
add esi, 1
mov dword [0x10035b10], esi
adc edi, 0
or eax, edx
mov dword [0x10035b14], edi
pop edi
pop esi
jne 0x10028a7a
push dword [0x10035b08]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
pop ecx
jmp 0x10028a7a
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.kernel32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10028d50
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x40571f
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x848
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0x83c]
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push 0x10
push ebx
push eax
mov dword [ebp - 0x848], edi
mov dword [ebp - 0x840], ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 2
pop eax
push dword [ebp + 0x10]
mov word [ebp - 0x83c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x83a], ax
lea eax, [ebp - 0x838]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
jmp 0x4057fb
mov eax, ebx
mov dword [ebp - 0x844], ebx
cmp dword [ebp - 0x840], eax
jbe 0x4057fb
sub esp, 0x10
lea esi, [ebp - 0x83c]
mov edi, esp
push dword [ebp + 0xc]
movsd dword es:[edi], dword [esi]
push dword [ebp + eax*4 - 0x82c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004042ce
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x40585e
mov eax, dword [ebp - 0x844]
mov ecx, dword [ebp + eax*4 - 0x82c]
test ecx, ecx
je 0x4057df
push ecx
call sub.wevtapi.dll_EvtClose
mov eax, dword [ebp - 0x844]
mov dword [ebp + eax*4 - 0x82c], ebx
inc eax
mov dword [ebp - 0x844], eax
cmp eax, dword [ebp - 0x840]
jb 0x405797
mov edi, dword [ebp - 0x848]
lea eax, [ebp - 0x840]
push eax
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x82c]
push eax
push 0xa
push edi
call sub.wevtapi.dll_EvtNext
test eax, eax
jne 0x405787
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x103
je 0x40585e
push esi
push str.EvtNext_failed_with__lu_n
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.00402d86
add esp, 0x10
cmp dword [0x41035c], ebx
je 0x40585e
lea eax, [ebp - 0x804]
push 1
push eax
call fcn.0040a000
pop ecx
pop ecx
mov eax, dword [ebp - 0x840]
test eax, eax
je 0x405884
mov ecx, dword [ebp + ebx*4 - 0x82c]
test ecx, ecx
je 0x40587f
push ecx
call sub.wevtapi.dll_EvtClose
mov eax, dword [ebp - 0x840]
inc ebx
cmp ebx, eax
jb 0x405868
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a7e7
leave
ret

Function at 0x4077f4
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
xor edx, edx
push esi
mov esi, dword [ebp + 0xc]
cmp dword [ebp + 0x10], edx
jbe 0x407817
movzx eax, byte [esi + edx]
xor eax, ecx
imul ecx, eax, 0x1000193
inc edx
cmp edx, dword [ebp + 0x10]
jb 0x407805
mov eax, ecx
pop esi
pop ebp
ret
Function at 0x409406
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0c
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x104
lea eax, [ebp - 0x20c]
xor esi, esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x409469
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Cannot_install_service___d__n
lea eax, [ebp - 0xa0c]
push 0x400
push eax
call fcn.00402d86
lea eax, [ebp - 0xa0c]
push 1
push eax
call fcn.0040a000
add esp, 0x18
or eax, 0xffffffff
jmp 0x4095b0
push edi
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x4094b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed___d__n
lea eax, [ebp - 0xa0c]
push 0x400
push eax
call fcn.00402d86
lea eax, [ebp - 0xa0c]
push 1
push eax
call fcn.0040a000
add esp, 0x18
or eax, 0xffffffff
jmp 0x4095af
push ebx
push esi
push str.LocalSystem
push esi
push esi
push esi
lea eax, [ebp - 0x20c]
push eax
push esi
push 2
push 0x10
push 0xf01ff
push str.Telco_Host_Agent_Event_Log
push str.THAEventLog
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, eax
test ebx, ebx
jne 0x40951b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed___d__n
lea eax, [ebp - 0xa0c]
push 0x400
push eax
call fcn.00402d86
lea eax, [ebp - 0xa0c]
push 1
push eax
call fcn.0040a000
add esp, 0x18
or esi, 0xffffffff
jmp 0x4095a5
lea eax, [ebp - 0x20c]
push eax
push str.Service_installed_successfully_in_path__s_n
lea eax, [ebp - 0xa0c]
push 0x400
push eax
call fcn.00402d86
lea eax, [ebp - 0xa0c]
push 1
push eax
call fcn.0040a000
add esp, 0x18
push esi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x409590
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartService_failed___d__n
lea eax, [ebp - 0xa0c]
push 0x400
push eax
call fcn.00402d86
lea eax, [ebp - 0xa0c]
push 1
push eax
call fcn.0040a000
add esp, 0x18
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xfffffffffffffffe
pop esi
jmp 0x4095a5
push 1
push str.Service_started_n
call fcn.0040a000
pop ecx
pop ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040a7e7
leave
ret

Function at 0x40978a
Capabilities:
Create udp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4097b9
push 1
push str.Cannot_initialize_winsock._n
jmp 0x4097d1
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x4097db
push 1
push str.Cannot_create_socket_n
call fcn.0040a000
pop ecx
or eax, 0xffffffff
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a7e7
leave
ret
Function at 0x40ae4a
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40ae89
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40ae89
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40ae89
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40ae89
cmp dword [ecx + 0x74], 0xe
jbe 0x40ae89
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x401070
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, edx
mov dword [ebp - 0x42c], ecx
mov eax, 0x400
cdq
xor ebx, ebx
push esi
lea ecx, [edi + edi]
mov dword [ebp - 0x424], esi
idiv ecx
mov dword [ebp - 0x41c], edi
push eax
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x404]
push ecx
push eax
mov dword [ebp - 0x40c], 0
mov dword [ebp - 0x410], ebx
mov dword [ebp - 0x408], ebx
call fcn.00407d33
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x414], esi
test esi, esi
je 0x401230
nop dword [eax + eax]
mov eax, dword [ebp - 0x408]
add eax, esi
mov dword [ebp - 0x420], eax
cmp eax, ebx
jbe 0x40113e
add ebx, ebx
or ebx, 1
cmp eax, ebx
ja 0x401102
mov eax, edi
imul eax, ebx
shl eax, 2
push eax
push dword [ebp - 0x40c]
call fcn.00405be0
add esp, 8
mov dword [ebp - 0x40c], eax
test eax, eax
je 0x40126a
mov dword [ebp - 0x410], ebx
test esi, esi
je 0x4011f5
mov ebx, dword [ebp - 0x41c]
lea ecx, [ebp - 0x404]
mov edx, dword [ebp - 0x40c]
mov eax, ebx
imul eax, dword [ebp - 0x408]
mov dword [ebp - 0x418], ecx
lea edi, [ebx + ebx]
lea eax, [edx + eax*4]
mov dword [ebp - 0x408], eax
lea edx, [ebx*4]
test ebx, ebx
jle 0x4011ce
mov esi, eax
mov edx, ecx
mov edi, ebx
nop dword [eax]
movzx ecx, byte [edx + 1]
lea edx, [edx + 2]
movzx eax, byte [edx - 2]
lea esi, [esi + 4]
shl ecx, 8
or ecx, eax
xor ecx, 0xffff8000
movzx eax, cx
sub eax, 0x8000
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esi - 4], xmm0
sub edi, 1
jne 0x401180
mov ecx, dword [ebp - 0x418]
lea edx, [ebx*4]
mov eax, dword [ebp - 0x408]
lea edi, [ebx + ebx]
mov esi, dword [ebp - 0x414]
add eax, edx
add ecx, edi
sub esi, 1
mov dword [ebp - 0x408], eax
mov dword [ebp - 0x418], ecx
mov dword [ebp - 0x414], esi
jne 0x401172
mov ebx, dword [ebp - 0x410]
mov edi, dword [ebp - 0x41c]
push dword [ebp - 0x424]
mov eax, dword [ebp - 0x420]
push dword [ebp - 0x428]
mov dword [ebp - 0x408], eax
lea eax, [edi + edi]
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.00407d33
mov esi, eax
mov dword [ebp - 0x414], eax
add esp, 0x10
test esi, esi
jne 0x4010f0
mov ebx, dword [ebp - 0x408]
imul edi, ebx
shl edi, 2
push edi
push dword [ebp - 0x40c]
call fcn.00405be0
add esp, 8
test eax, eax
je 0x40126a
mov ecx, dword [ebp - 0x42c]
pop edi
pop esi
mov dword [ecx], eax
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040256b
mov esp, ebp
pop ebp
ret
push str.Out_of_memory._n
push 2
call fcn.00405918
add esp, 4
push eax
call fcn.00401010
add esp, 8
push 1
call fcn.0040576b
int3

Function at 0x402da8
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x402de7
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x402de7
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402de7
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x402de7
cmp dword [ecx + 0x74], 0xe
jbe 0x402de7
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x409c1a
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c728
push 0x41c720
push str.FlsAlloc
push 0x1f
call fcn.00409ad9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x409c4e
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b11c]
call esi
jmp 0x409c54
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x409c98
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c738
push 0x41c730
push str.FlsGetValue
push 0x21
call fcn.00409ad9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x409ccf
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b11c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x409cd7
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c740
push 0x41c738
push str.FlsSetValue
push 0x22
call fcn.00409ad9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x409d11
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41b11c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40c15f
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 + 0x429108]
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 0x40c19f
cmp byte [ebx], 0xa
jne 0x40c19f
or byte [edi + eax + 0x28], 4
jmp 0x40c1a4
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 0x40c2a3
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40c286
inc eax
cmp dl, 0xd
je 0x40c1d0
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40c1f6
cmp eax, ecx
jae 0x40c204
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 0x40c1b8
jmp 0x40c2a3
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 0x40c281
cmp dword [ebp - 0x10], 0
je 0x40c281
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x429108]
test byte [eax + edi + 0x28], 0x48
je 0x40c25b
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40c246
mov byte [esi], dl
jmp 0x40c257
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x429108]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40c2a3
cmp byte [ebp - 1], 0xa
jne 0x40c26a
cmp esi, ebx
jne 0x40c26a
mov byte [esi], 0xa
jmp 0x40c2a2
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004134fd
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40c2a3
mov byte [esi], 0xd
jmp 0x40c2a2
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x429108]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40c2a0
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40c2a3
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40c2ac
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 + 0x429108]
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 0x40c2f2
cmp word [ebx], dx
jne 0x40c2f2
or byte [eax + edi + 0x28], 4
jmp 0x40c2f7
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 0x40c45a
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 0x40c43a
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40c338
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40c36e
cmp eax, edx
jae 0x40c37c
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 0x40c313
jmp 0x40c45a
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 0x40c435
cmp dword [ebp - 0x18], 0
je 0x40c435
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x429108]
test byte [eax + edi + 0x28], 0x48
je 0x40c40b
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 0x40c3cf
mov word [esi], cx
jmp 0x40c406
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x429108]
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 + 0x429108]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x429108]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40c45a
pop eax
cmp word [ebp - 4], ax
jne 0x40c41b
cmp esi, ebx
jne 0x40c41b
mov word [esi], ax
jmp 0x40c457
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004134fd
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40c45a
push 0xd
pop eax
jmp 0x40c416
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x429108]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40c454
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40c45a
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 0x40e08d
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 0x40e12a
push ebx
push esi
call fcn.0040e056
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.0040dfea
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40e0d7
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40e129
push edi
push eax
call fcn.0040acb3
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40e0f7
call fcn.0040996c
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40e128
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040dfea
add esp, 0x20
test eax, eax
jne 0x40e116
push edi
call fcn.0040996c
jmp 0x40e11e
push ebx
call fcn.0040996c
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 0x414265
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.004141e1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4143d4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4143d4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x414389
jg 0x4142c1
test eax, eax
je 0x41437f
push 1
push 0x1000
call fcn.0040990f
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4142e4
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x414376
push 0x8000
push ebx
call fcn.004086d8
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x41430d
jg 0x414308
cmp ecx, 0x1000
jb 0x41430d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00410fd0
add esp, 0x10
cmp eax, 0xffffffff
je 0x414352
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x414308
jl 0x414339
test ecx, ecx
jne 0x4142fa
push dword [ebp - 0xc]
push ebx
call fcn.004086d8
push esi
call fcn.0040996c
add esp, 0xc
xor ebx, ebx
jmp 0x4143e2
cmp byte [edi + 0x24], 0
je 0x414369
cmp dword [edi + 0x20], 5
jne 0x414369
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x414374
mov ebx, dword [edi + 0x18]
jmp 0x414376
xor ebx, ebx
push esi
call fcn.0040996c
pop ecx
jmp 0x4143e2
test ecx, ecx
jg 0x41434b
jl 0x414389
test eax, eax
jae 0x41434b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004134fd
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4143a9
cmp byte [edi + 0x1c], 0
je 0x41434b
jmp 0x4143da
push ebx
call fcn.0040e881
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x41434b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4143e2
cmp byte [edi + 0x1c], 0
je 0x4143df
mov ebx, dword [edi + 0x18]
jmp 0x4143e2
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004134fd
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x416b20
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x416b4d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x416b4d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret