joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401400
Capabilities:
Access peb ldr_data
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [0x418580], 0
push esi
push edi
jne 0x4015ab
mov eax, dword fs:[0x30]
xor esi, esi
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 0xc]
mov eax, dword [edx + 0x18]
test eax, eax
je 0x4015b6
nop
mov edi, eax
mov eax, dword [edi + 0x3c]
mov eax, dword [eax + edi + 0x78]
test eax, eax
je 0x401463
mov ecx, dword [eax + edi + 0xc]
lea esi, [eax + edi]
mov eax, dword [ecx + edi]
or eax, 0x20202020
cmp eax, 0x6c64746e
jne 0x401463
mov eax, dword [ecx + edi + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
je 0x40146c
mov edx, dword [edx]
mov eax, dword [edx + 0x18]
test eax, eax
jne 0x401430
test esi, esi
je 0x4015b6
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
add eax, edi
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x14], eax
add ecx, edi
mov eax, dword [esi + 0x24]
xor esi, esi
add eax, edi
mov dword [ebp - 8], edx
push ebx
mov dword [ebp - 4], esi
lea eax, [eax + edx*2]
add eax, 0xfffffffe
xor ebx, ebx
mov dword [ebp - 0xc], eax
mov eax, edx
lea edx, [eax - 1]
lea edx, [ecx + edx*4]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], edx
nop dword [eax + eax]
mov edx, dword [edx]
mov esi, 0x775a
add edx, edi
cmp word [edx], si
mov esi, dword [ebp - 4]
jne 0x401511
mov esi, 0x87832afc
movzx eax, word [edx]
lea edx, [edx + 1]
mov ecx, esi
ror ecx, 8
add ecx, eax
xor esi, ecx
cmp byte [edx], 0
jne 0x4014c6
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov dword [ebx + 0x418584], esi
mov esi, dword [ebp - 4]
movzx eax, word [ecx]
inc esi
mov dword [ebp - 4], esi
mov eax, dword [edx + eax*4]
mov dword [ebx + 0x418588], eax
mov dword [ebx + 0x41858c], 0
add ebx, 0xc
cmp ebx, 0x1c20
je 0x401528
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
dec eax
sub edx, 4
mov dword [ebp - 8], eax
sub ecx, 2
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], ecx
test eax, eax
jne 0x4014b0
xor ecx, ecx
mov dword [0x418580], esi
lea eax, [esi - 1]
mov dword [ebp - 0xc], ecx
test eax, eax
je 0x4015aa
nop word [eax + eax]
mov eax, esi
xor ebx, ebx
sub eax, ecx
sub eax, 1
je 0x40159f
mov edi, dword [0x418588]
mov eax, 0x418588
mov edx, edi
lea ecx, [eax + 0xc]
mov edi, dword [ecx]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], ecx
cmp edx, edi
jbe 0x40158f
mov esi, dword [eax - 4]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov dword [eax - 4], ecx
mov ecx, dword [eax + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x14]
mov dword [eax], edi
mov edi, dword [ebp - 0x10]
mov dword [eax + 8], esi
mov dword [ecx], edi
mov dword [eax + 0x10], edx
mov esi, dword [0x418580]
mov eax, ecx
inc ebx
mov ecx, esi
sub ecx, dword [ebp - 0xc]
dec ecx
cmp ebx, ecx
jb 0x401556
mov ecx, dword [ebp - 0xc]
inc ecx
lea eax, [esi - 1]
mov dword [ebp - 0xc], ecx
cmp ecx, eax
jb 0x401540
pop ebx
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x401650
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret

Function at 0x4016a5
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret
Function at 0x4016fa
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret

Function at 0x40174f
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret

Function at 0x4017a4
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret

Function at 0x4017f9
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret

Function at 0x40184e
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret

Function at 0x40205e
Capabilities:
Parse pe header

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

Function at 0x40638d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004061fe
Function at 0x4080d5
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 0x408172
push ebx
push esi
call fcn.0040809e
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.00407fe7
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40811f
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x408171
push edi
push eax
call fcn.00408ae3
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40813f
call fcn.00406c10
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x408170
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00407fe7
add esp, 0x20
test eax, eax
jne 0x40815e
push edi
call fcn.00406c10
jmp 0x408166
push ebx
call fcn.00406c10
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 0x409267
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x411fd0
push 0x411fc8
push str.FlsAlloc
push 0x1e
call fcn.00409128
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40929b
push dword [ebp + 8]
mov ecx, esi
call dword [0x410154]
call esi
jmp 0x4092a1
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4092e5
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x411fe0
push 0x411fd8
push str.FlsGetValue
push 0x20
call fcn.00409128
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40931c
push dword [ebp + 8]
mov ecx, esi
call dword [0x410154]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x40a31c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
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 + 0x4180c8]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40a35c
cmp byte [ebx], 0xa
jne 0x40a35c
or byte [eax + edi + 0x28], 4
jmp 0x40a361
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x40a45f
mov al, byte [edx]
cmp al, 0x1a
je 0x40a441
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x40a390
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x40a3b5
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x40a3bf
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x40a372
jmp 0x40a45f
push 0
lea eax, [ebp - 0xc]
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 0x40a43c
cmp dword [ebp - 0xc], 0
je 0x40a43c
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x4180c8]
test byte [eax + edi + 0x28], 0x48
je 0x40a416
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40a401
mov byte [esi], dl
jmp 0x40a412
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4180c8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40a45f
cmp byte [ebp - 1], 0xa
jne 0x40a425
cmp esi, ebx
jne 0x40a425
mov byte [esi], 0xa
jmp 0x40a45e
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040c972
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40a45f
mov byte [esi], 0xd
jmp 0x40a45e
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x4180c8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40a45b
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40a45f
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40a468
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x4180c8]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40a4ab
cmp word [esi], dx
jne 0x40a4ab
or byte [edi + eax + 0x28], 4
jmp 0x40a4b0
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x40a603
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x40a5e3
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x40a4f2
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40a528
cmp eax, edx
jae 0x40a534
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
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 - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x40a4ca
jmp 0x40a603
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a5df
cmp dword [ebp - 0x14], 0
je 0x40a5df
mov eax, dword [ebx*4 + 0x4180c8]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x40a5b7
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x40a580
mov word [esi], cx
jmp 0x40a5b3
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x4180c8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x4180c8]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x4180c8]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x40a603
pop ebx
cmp word [ebp - 4], bx
jne 0x40a5c8
cmp esi, dword [ebp + 0xc]
jne 0x40a5c8
mov word [esi], bx
jmp 0x40a600
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0040c972
add esp, 0x10
cmp word [ebp - 4], bx
je 0x40a603
push 0xd
jmp 0x40a5fc
mov ecx, dword [ebx*4 + 0x4180c8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40a5fa
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40a603
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40f050
Capabilities:
Parse pe header

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

Function at 0x4a9bd0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x84000]
push edi
or ebp, 0xffffffff
jmp 0x4a9bf2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4a9bf9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4a9be8
mov eax, 1
add ebx, ebx
jne 0x4a9c0b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4a9c1c
jne 0x4a9c2c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4a9c2c
dec eax
add ebx, ebx
jne 0x4a9c28
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x4a9c00
xor ecx, ecx
sub eax, 3
jb 0x4a9c44
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x4a9cb6
sar eax, 1
mov ebp, eax
jmp 0x4a9c4f
add ebx, ebx
jne 0x4a9c4f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4a9c5c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x4a9c80
inc ecx
add ebx, ebx
jne 0x4a9c6c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4a9c61
jne 0x4a9c7d
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4a9c61
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4a9ca0
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4a9c91
jmp 0x4a9bee
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4a9ca0
add edi, ecx
jmp 0x4a9bee
pop esi
mov edi, esi
mov ecx, 0x3aa5
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x4a9cbe
cmp byte [edi], 0x28
jne 0x4a9cbe
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov eax, ebx
loop 0x4a9cc3
lea edi, [esi + 0xa6000]
mov eax, dword [edi]
or eax, eax
je 0x4a9d32
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xaa034]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xaa110]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4a9cf0
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xaa114]
or eax, eax
je 0x4a9d2c
mov dword [ebx], eax
add ebx, 4
jmp 0x4a9d0d
call dword [esi + 0xaa118]
popal
jmp 0x46bd58
Function at 0x1000114e
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call
Read file on windows

Disassembly:
push esi
push edi
push str.ShellExecuteW
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 1
xor edi, edi
push edi
push edi
push 0x10002054
push str.open
push edi
call eax
push 0x40
mov esi, 0x1000
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push str.desktop.ini
mov dword [0x10003228], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1000322c], eax
cmp eax, 0xffffffff
je 0x100011f3
push edi
push 0x10003230
push esi
push dword [0x10003228]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x10003228]
movzx ecx, byte [eax]
xor ecx, 0x4e
xor esi, esi
cmp dword [0x10003230], edi
jbe 0x100011f1
mov dl, byte [eax + esi]
xor dl, cl
add dl, 0x42
mov byte [eax + esi], dl
inc esi
cmp esi, dword [0x10003230]
jb 0x100011dd
call eax
pop edi
pop esi
ret 0x10

Function at 0x431005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
call 0x43100c
nop
nop
nop
nop
pop eax
nop
add eax, 0x403e6a
nop
nop
sub eax, 0x403e10
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x431030
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
jne 0x43101e
nop
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp loc.00401219
Function at 0x43b4c0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov eax, dword [0x4d0b90]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1b4], ecx
push 0x64
lea eax, [ebp - 0x194]
push eax
mov ecx, dword [ebp - 0x1b4]
mov edx, dword [ecx + 0x234]
push edx
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x198], 0
mov dword [ebp - 0x19c], 0
mov ecx, 1
imul edx, ecx, 0
mov dword [ebp - 0x1a4], edx
cmp dword [ebp - 0x1a4], 0xc8
jae 0x43b538
jmp 0x43b53d
call fcn.0049dafa
mov eax, dword [ebp - 0x1a4]
mov byte [ebp + eax - 0xcc], 0
mov ecx, dword [ebp - 0x198]
cmp ecx, dword [ebp - 0x1b8]
jge 0x43b650
mov edx, dword [ebp - 0x198]
movsx eax, byte [ebp + edx - 0x194]
and eax, 0xff
mov dword [ebp - 0x1a0], eax
cmp dword [ebp - 0x1a0], 0x81
jl 0x43b58e
cmp dword [ebp - 0x1a0], 0xfe
jle 0x43b5ae
cmp dword [ebp - 0x1a0], 0xe0
jl 0x43b63c
cmp dword [ebp - 0x1a0], 0xfc
jg 0x43b63c
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ebp - 0x198]
mov al, byte [ebp + edx - 0x194]
mov byte [ebp + ecx - 0xcc], al
mov ecx, dword [ebp - 0x19c]
add ecx, 1
mov dword [ebp - 0x19c], ecx
mov edx, dword [ebp - 0x198]
add edx, 1
mov dword [ebp - 0x198], edx
mov eax, dword [ebp - 0x19c]
mov ecx, dword [ebp - 0x198]
mov dl, byte [ebp + ecx - 0x194]
mov byte [ebp + eax - 0xcc], dl
mov eax, dword [ebp - 0x19c]
add eax, 1
mov dword [ebp - 0x19c], eax
mov ecx, dword [ebp - 0x19c]
mov dword [ebp - 0x1a8], ecx
cmp dword [ebp - 0x1a8], 0xc8
jae 0x43b629
jmp 0x43b62e
call fcn.0049dafa
mov edx, dword [ebp - 0x1a8]
mov byte [ebp + edx - 0xcc], 0
mov eax, dword [ebp - 0x198]
add eax, 1
mov dword [ebp - 0x198], eax
jmp 0x43b54b
lea ecx, [ebp - 0xcc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jg 0x43b663
jmp 0x43b6a4
lea edx, [ebp - 0xcc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x64
jle 0x43b6a4
mov eax, 1
imul ecx, eax, 0x64
mov dword [ebp - 0x1ac], ecx
cmp dword [ebp - 0x1ac], 0xc8
jae 0x43b691
jmp 0x43b696
call fcn.0049dafa
mov edx, dword [ebp - 0x1ac]
mov byte [ebp + edx - 0xcc], 0
mov ecx, 0x4d2930
call fcn.0041f770
mov dword [ebp - 0x1b0], eax
lea eax, [ebp - 0xcc]
push eax
imul ecx, dword [ebp + 8], 0x3c998
mov edx, dword [ebp - 0x1b0]
lea eax, [edx + ecx + 9]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x43b6d9
jmp 0x43b702
lea ecx, [ebp - 0xcc]
push ecx
imul edx, dword [ebp + 8], 0x3c998
mov eax, dword [ebp - 0x1b0]
lea ecx, [eax + edx + 9]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, 0x4d2930
call fcn.0046e540
mov ecx, dword [ebp - 0x1b4]
call fcn.004392d0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049d708
mov esp, ebp
pop ebp
ret 4
Function at 0x4014e0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x30
call sym.___main
mov dword [esp + 0x28], str.input
mov dword [esp + 0x24], str.output
mov dword [esp + 0x20], 6
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
lea eax, [esp + 0x12]
mov dword [esp], eax
call sym._z
mov dword [esp + 4], 0x405071
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sym._fopen
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x1c], 0
jne 0x40154f
mov dword [esp], str.Error:_Could_not_open_input_file
call sym._perror
mov eax, 1
jmp 0x401649
mov dword [esp + 4], 0x405095
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._fopen
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
jne 0x401590
mov dword [esp], str.Error:_Could_not_create_output_file
call sym._perror
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sym._fclose
mov eax, 1
jmp 0x401649
mov dword [esp + 0x2c], 0
jmp 0x4015ef
movzx eax, byte [esp + 0x11]
movzx eax, al
mov edx, dword [esp + 0x2c]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x20]
mov dword [esp + 8], edx
lea edx, [esp + 0x12]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._random
mov byte [esp + 0x11], al
mov eax, dword [esp + 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [esp + 0x11]
mov dword [esp], eax
call sym._fwrite
add dword [esp + 0x2c], 1
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [esp + 0x11]
mov dword [esp], eax
call sym._fread
cmp eax, 1
je 0x40159a
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sym._fclose
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call sym._fclose
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov dword [esp], str.File_processed_successfully._Output_written_to__s._n
call sym._printf
mov eax, 0
leave
ret
Function at 0x407124
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x4de008], 0x8088405
inc edx
mov dword [ebx + 0x4de008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x40871c
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00408ba8
mov byte [esp], al
cmp byte [esp], 0
jne 0x4088a5
test edi, edi
je 0x4088a5
mov byte [esp + 1], 0
test ebp, ebp
jle 0x4087e5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x4087c0
cmp edi, 0xffffffff
je 0x408781
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408781
mov byte [esp], 0
jmp 0x4088a5
cmp dword [esi], 1
jg 0x4087c0
cmp dword [esi], 0
jne 0x4087b2
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x4087b2
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x4088a5
lea eax, [esp + 0xc]
call fcn.004083d8
dec ebp
test ebp, ebp
jg 0x408766
cmp edi, 0xffffffff
je 0x4087e5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4087e3
mov byte [esp], 0
jmp 0x4088a5
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x40872a
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x4087e5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00408914
mov edx, eax
mov ebx, dword [0x4e28fc]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x408849
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x408847
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x408849
xor edi, edi
cmp byte [esp], 0
je 0x40886f
mov ebx, dword [esi]
test bl, 1
jne 0x408885
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x40884f
mov byte [esp + 1], 1
jmp 0x408885
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x40886f
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x4087fc
cmp byte [esp], 0
je 0x4088a5
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret