joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52b6cc
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, 0x52d168
sub eax, eax
test esi, esi
je 0x52b7a4
sub eax, 1
test ecx, ecx
je 0x52b7a2
test esi, 3
je 0x52b70a
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x52b6ef
mov edx, ecx
and edx, 7
shr ecx, 3
je 0x52b789
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x52b714
mov ecx, edx
test ecx, ecx
je 0x52b7a2
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x52b78f
not eax
mov dword [esp + 0x1c], eax
popal
ret

Function at 0x52b7ac
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cld
mov dl, 0x80
xor ebx, ebx
movsb byte es:[edi], byte [esi]
mov bl, 2
call fcn.0052b82f
jae 0x52b7ba
xor ecx, ecx
call fcn.0052b82f
jae 0x52b7e9
xor eax, eax
call fcn.0052b82f
jae 0x52b7f9
mov bl, 2
inc ecx
mov al, 0x10
call fcn.0052b82f
adc al, al
jae 0x52b7db
jne 0x52b825
stosb byte es:[edi], al
jmp 0x52b7bd
call fcn.0052b83b
sub ecx, ebx
jne 0x52b802
call fcn.0052b839
jmp 0x52b821
lodsb al, byte [esi]
shr eax, 1
je 0x52b84b
adc ecx, ecx
jmp 0x52b81e
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.0052b839
cmp eax, 0x7d00
jae 0x52b81e
cmp ah, 5
jae 0x52b81f
cmp eax, 0x7f
ja 0x52b820
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov bl, 1
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x52b7bd
sub edi, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
popal
ret
Function at 0x401334
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x428794], eax
push 0x42250c
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [ebp - 4], eax
mov eax, dword [0x428794]
push eax
push 0x422524
push 0x42253c
lea ecx, [ebp - 0x10c]
push ecx
call fcn.00419370
add esp, 0x10
lea edx, [ebp - 0x10c]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
je 0x4013b2
push 0
lea ecx, [ebp - 0xc]
push ecx
push 0
push 2
push 0
push 0
push 0
push 1
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [0x428790]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov esp, ebp
pop ebp
ret

Function at 0x4045f0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
push 0
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
call sub.WSOCK32.dll_recv
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jge 0x404620
xor eax, eax
jmp 0x404628
mov eax, dword [ebp - 4]
jmp 0x404628
add byte [eax], al
invalid
pop edi
pop esi

Function at 0x4046cf
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov eax, dword [ebp + 0x14]
add eax, 4
push eax
mov eax, dword [ebp + 0x14]
add eax, 8
push eax
push 0
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
call sub.WSOCK32.dll_recvfrom
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
jmp 0x404704
pop edi
pop esi
pop ebx
leave
ret

Function at 0x404709
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 4]
push eax
mov eax, dword [ebp + 0x14]
add eax, 8
push eax
push 0
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
call sub.WSOCK32.dll_sendto
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
jmp 0x40473e
pop edi
pop esi
pop ebx
leave
ret

Function at 0x404fab
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0xc]
push eax
push 0x8004667e
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
jge 0x404fee
push 0x423154
call fcn.00419e50
add esp, 4
mov eax, 0xffffffff
jmp 0x405043
mov eax, dword [ebp + 0xc]
add eax, 8
mov dword [ebp - 4], eax
push 0x10
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call sub.WSOCK32.dll_connect
test eax, eax
jge 0x40503c
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x2734
je 0x40503c
cmp dword [ebp - 8], 0x2733
je 0x40503c
mov eax, 0xffffffff
jmp 0x405043
xor eax, eax
jmp 0x405043
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4080b7
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404e46
add esp, 4
test eax, eax
jne 0x4080e4
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00404ddb
add esp, 8
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404e7e
add esp, 4
test eax, eax
jne 0x40810a
call fcn.00408b9a
mov dword [ebp - 4], eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00404dfc
add esp, 8
push 0x11
push 2
push 2
call sub.WSOCK32.dll_socket
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x408130
push 0x423f24
call fcn.004016ce
add esp, 4
or eax, 0xffffffff
jmp 0x40816f
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 8]
push eax
call fcn.00404f6a
add esp, 8
test eax, eax
je 0x408156
push 0x423f38
call fcn.004016ce
add esp, 4
or eax, 0xffffffff
jmp 0x40816f
cmp dword [ebp - 4], 0
je 0x40816c
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00404dfc
add esp, 8
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
Function at 0x408190
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
push 0
push 0x423f4c
call sub.WSOCK32.dll_getservbyname
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4081ce
push 0xc7
call sub.WSOCK32.dll_htons
movzx eax, ax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0x423f54
jmp 0x4081e1
mov eax, dword [ebp - 8]
movsx eax, word [eax + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0xc]
push eax
call sub.WSOCK32.dll_getprotobyname
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x408208
mov eax, dword [ebp - 0x14]
movsx eax, word [eax + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push eax
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x40823e
push 0x423f58
call fcn.004016ce
add esp, 4
mov eax, 0xffffffff
jmp 0x408385
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404e46
add esp, 4
test eax, eax
jne 0x408262
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404ddb
add esp, 8
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404e7e
add esp, 4
test eax, eax
jne 0x4082a5
cmp dword [ebp + 8], 0
je 0x408293
push 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404dfc
add esp, 8
jmp 0x4082a5
call fcn.00408b9a
push eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404dfc
add esp, 8
cmp dword [ebp + 8], 0
je 0x408342
mov dword [ebp - 0x1c], 1
push 4
lea eax, [ebp - 0x1c]
push eax
push 4
push 0xffff
mov eax, dword [ebp - 0x18]
push eax
call sub.WSOCK32.dll_setsockopt
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00404f6a
add esp, 8
test eax, eax
je 0x408307
push 0x423f6c
call fcn.004016ce
add esp, 4
lea eax, [ebp - 0x18]
push eax
call fcn.00404650
add esp, 4
mov eax, 0xffffffff
jmp 0x408385
push 5
mov eax, dword [ebp - 0x18]
push eax
call sub.WSOCK32.dll_listen
test eax, eax
jge 0x40833d
push 0x423f80
call fcn.004016ce
add esp, 4
lea eax, [ebp - 0x18]
push eax
call fcn.00404650
add esp, 4
mov eax, 0xffffffff
jmp 0x408385
jmp 0x40837d
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00404fab
add esp, 8
test eax, eax
je 0x40837d
push 0x423f94
call fcn.004016ce
add esp, 4
lea eax, [ebp - 0x18]
push eax
call fcn.00404650
add esp, 4
mov eax, 0xffffffff
jmp 0x408385
mov eax, dword [ebp - 0x18]
jmp 0x408385
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4083d0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov eax, dword [ebp + 0x10]
push eax
push 0
push 0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
call sub.WSOCK32.dll_select
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jg 0x408410
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 4
jne 0x408410
xor eax, eax
jmp 0x408418
mov eax, dword [ebp - 4]
jmp 0x408418
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408a90
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
push eax
call sub.WSOCK32.dll_gethostbyname
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x408ab6
xor eax, eax
jmp 0x408aec
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x408ad0
xor eax, eax
jmp 0x408aec
push 4
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
push eax
call fcn.0040641d
add esp, 0xc
mov eax, dword [ebp - 0xc]
jmp 0x408aec
pop edi
pop esi
pop ebx
leave
ret

Function at 0x408b2d
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.WSOCK32.dll_gethostname
test eax, eax
je 0x408b5b
mov eax, 1
jmp 0x408b95
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
push eax
call sym._enc_int
add esp, 4
sub ebx, eax
mov dword [ebp + 0xc], ebx
cmp dword [ebp + 0xc], 2
jge 0x408b83
mov eax, 1
jmp 0x408b95
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
mov byte [eax + ecx - 1], 0
xor eax, eax
jmp 0x408b95
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4143f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
test ecx, ecx
je 0x414502
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
cmp eax, 0xa
jne 0x414451
mov ecx, dword [0x42a800]
and ecx, 0x3f
shl ecx, 7
mov edx, dword [0x42a804]
and edx, 0x7f
jg 0x4143e8
test byte [ecx], dl
add byte [eax - 0x5effffbe], cl
add al, 0xa8
inc edx
add byte [ebx + 0x4a301c0], al
test al, 0x42
add byte [ebx + 0x42a8000d], cl
add byte [ebx + 0xd8901c1], al
add byte [eax + 0x5c70042], ch
add al, 0xa8
inc edx
add byte [eax], al
add byte [eax], al
add bl, ch
invalid
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
cmp eax, 9
jne 0x41449d
mov ecx, dword [0x42a800]
and ecx, 0x3f
shl ecx, 7
mov edx, dword [0x42a804]
and edx, 0x7f
mov byte [ecx + edx + 0x428800], 0x20
mov eax, dword [0x42a804]
add eax, 1
mov dword [0x42a804], eax
mov eax, dword [0x42a804]
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
test eax, eax
jne 0x41445c
jmp 0x4144cd
mov ecx, dword [0x42a800]
and ecx, 0x3f
shl ecx, 7
mov edx, dword [0x42a804]
and edx, 0x7f
mov eax, dword [ebp + 8]
mov al, byte [eax]
mov byte [ecx + edx + 0x428800], al
mov ecx, dword [0x42a804]
add ecx, 1
mov dword [0x42a804], ecx
cmp dword [0x42a804], 0x80
jl 0x4144f4
mov dword [0x42a804], 0
mov edx, dword [0x42a800]
add edx, 1
mov dword [0x42a800], edx
jmp 0x4144fd
mov eax, dword [ebp + 8]
add eax, 1
mov dword [ebp + 8], eax
jmp 0x4143f3
push 0
push 0
mov ecx, dword [0x42ac20]
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
pop ebp
ret

Function at 0x4193e0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421070
push 0x41bfb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x42a868], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x42a864], ecx
shl ecx, 8
add ecx, edx
mov dword [0x42a860], ecx
inc edx
add cl, al
call 0xa89e3745
inc edx
add al, ch
add al, 0x2a
add byte [eax], al
test eax, eax
jne 0x41944a
push 0x1c
call fcn.00419500
add esp, 4
mov dword [ebp - 4], 0
call fcn.0041bc10
call fcn.0041bc00
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42c724], eax
call fcn.0041b7c0
mov dword [0x42a828], eax
test eax, eax
je 0x41947d
mov eax, dword [0x42c724]
test eax, eax
jne 0x419487
push 0xffffffffffffffff
call fcn.0041af60
add esp, 4
call fcn.0041b310
call fcn.0041b220
call fcn.0041af30
mov eax, dword [0x42a878]
mov dword [0x42a87c], eax
push eax
mov eax, dword [0x42a870]
push eax
mov ecx, dword [0x42a86c]
push ecx
call fcn.0040111e
add esp, 0xc
mov dword [ebp - 0x1c], eax
in al, 0x50
call fcn.0041af60
jmp 0x4194e2
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
invalid
Function at 0x41afc0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x42a898]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x41afdf
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x42a894], 1
mov byte [0x42a890], bl
jne 0x41b039
mov ecx, dword [0x42b708]
test ecx, ecx
je 0x41b027
mov esi, dword [0x42b704]

Function at 0x41b7c0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x42a9a8]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x41b802
call edi
mov esi, eax
test esi, esi
je 0x41b7ec
mov eax, 1
jmp 0x41b7fd
call ebp
mov ebx, eax
test ebx, ebx
je 0x41b90f
mov eax, 2
mov dword [0x42a9a8], eax
cmp eax, 1
jne 0x41b8a2
test esi, esi
jne 0x41b81b
call edi
mov esi, eax
test esi, esi
je 0x41b90f
cmp word [esi], 0
mov eax, esi
je 0x41b835
add eax, 2
cmp word [eax], 0
jne 0x41b823
add eax, 2
cmp word [eax], 0
jne 0x41b823
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x41b894
push edi
call fcn.00419580
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41b894
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x41b886
push ebx
call fcn.00419530
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x41b90f
test ebx, ebx
jne 0x41b8b3
call ebp
mov ebx, eax
test ebx, ebx
je 0x41b90f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x41b8cb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41b8bb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41b8bb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00419580
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x41b8ed
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x41c0d0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x426158
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x41c0f4
add eax, 8
inc ebp
cmp eax, 0x4261e8
jb 0x41c0e5
cmp ecx, dword [ebp*8 + 0x426158]
jne 0x41c29b
mov eax, dword [0x42a830]
cmp eax, 1
je 0x41c25d
test eax, eax
jne 0x41c120
cmp dword [0x425d24], 1
je 0x41c25d
cmp ecx, 0xfc
je 0x41c29b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41c15b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x41c1a4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4213d0
add ebx, ecx
push ebx
call sym.__close
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
mov eax, dword [0x42b600]
test eax, eax
je 0x41c26e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x41c278
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x42615c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret

Function at 0x41d250
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [0x42b700]
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
cmp ebx, eax
push edi
jae 0x41d485
mov eax, ebx
and ebx, 0x1f
sar eax, 5
shl ebx, 3
mov ecx, dword [eax*4 + 0x42b600]
lea esi, [eax*4 + 0x42b600]
mov dword [esp + 0x14], esi
lea eax, [ebx + ecx]
mov dword [esp + 0x10], eax
mov dl, byte [eax + 4]
test dl, 1
je 0x41d485
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
xor ebp, ebp
mov eax, edi
test ecx, ecx
je 0x41d47b
test dl, 2
invalid
Function at 0x41d4b0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x42b700]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x41d65d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x42b600]
lea edi, [ecx*4 + 0x42b600]
add byte [esi - 0x193effbe], dh
add ecx, dword [ecx - 0x76dbdb84]
je 0x41d512
adc al, 0x8a
dec esp
push ss
add al, 0xf6
rol dword [ecx], 0xf
test byte [ecx + 1], ah
add byte [eax], al
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x41d51e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x41d52f
push 2
push ebp
push eax
call fcn.0041d8c0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x41d68e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x41d5d9
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x41d58a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x41d577
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x41d55a
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
rol byte [edx], cl
test eax, eax
je 0x41d67f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x41d5d5
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x41d556
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x41d64e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x41d622
cmp eax, 5
jne 0x41d60b
mov dword [0x42a854], eax
mov dword [0x42a850], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
invalid
inc dword [edi]
invalid

Function at 0x41ef70
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call sym._enc_int_wtag
mov eax, dword [0x42b700]
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
xor ebp, ebp
push esi
cmp ebx, eax
push edi
jae 0x41f0d2
mov eax, ebx
mov ecx, ebx
sar eax, 5
and ecx, 0x1f
mov edx, dword [eax*4 + 0x42b600]
test byte [edx + ecx*8 + 4], 1
je 0x41f0d2
push 1
push ebp
push ebx
call fcn.0041d8c0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x41f0dc
push 2
push ebp
push ebx
call fcn.0041d8c0
add esp, 0xc
cmp eax, 0xffffffff
je 0x41f0dc
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x41f078
add byte [eax], al
invalid
mov ecx, 0x400
jge 0x41f0b9
push 0
push ecx
push ebx
call fcn.0041d8c0
add esp, 0xc
push ebx
call fcn.0041e090
add esp, 4
push eax
mov dword [0x42a850], 9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
enter 0x5bff, 0xffffffffffffff81
les eax, [eax + edx]
add byte [eax], al
Function at 0x41fd80
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x41ff3e
push 0x3d
push edi
call fcn.00420080
mov esi, eax
add esp, 8
test esi, esi
je 0x41ff3e
cmp edi, esi
je 0x41ff3e
mov dl, byte [esi + 1]
mov ecx, dword [0x42a87c]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x42a878]
cmp eax, ecx
jne 0x41fdd7
push eax
call fcn.00420010
add esp, 4
mov dword [0x42a878], eax
test eax, eax
jne 0x41fe52
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41fdfe
mov eax, dword [0x42a880]
test eax, eax
je 0x41fdfe
call fcn.0041f7b0
test eax, eax
je 0x41fe4d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x41fe0a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00419580
add esp, 4
mov dword [0x42a878], eax
test eax, eax
je 0x41ff3e
mov dword [eax], 0
mov eax, dword [0x42a880]
test eax, eax
jne 0x41fe4d