joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100291f3
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 + 0x1004fa10]
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 0x10029233
cmp byte [ebx], 0xa
jne 0x10029233
or byte [eax + edi + 0x28], 4
jmp 0x10029238
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x10029336
mov al, byte [edx]
cmp al, 0x1a
je 0x10029318
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x10029267
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x1002928c
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x10029296
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 0x10029249
jmp 0x10029336
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 0x10029313
cmp dword [ebp - 0xc], 0
je 0x10029313
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x1004fa10]
test byte [eax + edi + 0x28], 0x48
je 0x100292ed
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x100292d8
mov byte [esi], dl
jmp 0x100292e9
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1004fa10]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10029336
cmp byte [ebp - 1], 0xa
jne 0x100292fc
cmp esi, ebx
jne 0x100292fc
mov byte [esi], 0xa
jmp 0x10029335
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10028ee1
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10029336
mov byte [esi], 0xd
jmp 0x10029335
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x1004fa10]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10029332
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10029336
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1002933f
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 + 0x1004fa10]
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 0x10029382
cmp word [esi], dx
jne 0x10029382
or byte [edi + eax + 0x28], 4
jmp 0x10029387
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 0x100294da
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 0x100294ba
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x100293c9
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x100293ff
cmp eax, edx
jae 0x1002940b
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 0x100293a1
jmp 0x100294da
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 0x100294b6
cmp dword [ebp - 0x14], 0
je 0x100294b6
mov eax, dword [ebx*4 + 0x1004fa10]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x1002948e
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x10029457
mov word [esi], cx
jmp 0x1002948a
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x1004fa10]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x1004fa10]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x1004fa10]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x100294da
pop ebx
cmp word [ebp - 4], bx
jne 0x1002949f
cmp esi, dword [ebp + 0xc]
jne 0x1002949f
mov word [esi], bx
jmp 0x100294d7
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10028ee1
add esp, 0x10
cmp word [ebp - 4], bx
je 0x100294da
push 0xd
jmp 0x100294d3
mov ecx, dword [ebx*4 + 0x1004fa10]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x100294d1
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x100294da
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 0x10029cfb
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.10029b6c

Function at 0x1002a684
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1003e110
push 0x1003e108
push str.FlsAlloc
push 0x1e
call fcn.1002a54e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1002a6b8
push dword [ebp + 8]
mov ecx, esi
call dword [0x1003a18c]
call esi
jmp 0x1002a6be
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1002a702
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1003e120
push 0x1003e118
push str.FlsGetValue
push 0x20
call fcn.1002a54e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1002a739
push dword [ebp + 8]
mov ecx, esi
call dword [0x1003a18c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x1002e8ab
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 0x1002e948
push ebx
push esi
call fcn.1002e874
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.1002d60b
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1002e8f5
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1002e947
push edi
push eax
call fcn.1002771c
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1002e915
call fcn.100276e2
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1002e946
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1002d60b
add esp, 0x20
test eax, eax
jne 0x1002e934
push edi
call fcn.100276e2
jmp 0x1002e93c
push ebx
call fcn.100276e2
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 0x10035ff1
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]
push dword [ebp + 0xc]
push ebx
call fcn.10035f6d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10036169
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10036169
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x10036118
jg 0x1003604a
test eax, eax
je 0x1003610e
push 1
push 0x1000
call fcn.1002a250
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10036070
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x10036105
push 0x8000
push ebx
call fcn.10035e9e
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x1003609c
jg 0x10036097
cmp ecx, 0x1000
jb 0x1003609c
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10034291
add esp, 0x10
cmp eax, 0xffffffff
je 0x100360e1
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 0x10036097
jl 0x100360c8
test ecx, ecx
jne 0x10036089
push dword [ebp - 0xc]
push ebx
call fcn.10035e9e
push esi
call fcn.100276e2
add esp, 0xc
xor edi, edi
jmp 0x1003617a
cmp byte [edi + 0x24], 0
je 0x100360f8
cmp dword [edi + 0x20], 5
jne 0x100360f8
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x10036103
mov edi, dword [edi + 0x18]
jmp 0x10036105
xor edi, edi
push esi
call fcn.100276e2
pop ecx
jmp 0x1003617a
test ecx, ecx
jg 0x100360da
jl 0x10036118
test eax, eax
jae 0x100360da
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10028ee1
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1003613b
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x100360da
jmp 0x10036172
push ebx
call fcn.10032bdc
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x100360da
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x1003617a
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x10036177
mov edi, dword [edi + 0x18]
jmp 0x1003617a
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10028ee1
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4323c0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x28000]
push edi
jmp 0x4323da
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4323e1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4323d0
mov eax, 1
add ebx, ebx
jne 0x4323f3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4323e8
jne 0x432404
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4323e8
xor ecx, ecx
sub eax, 3
jb 0x432418
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x43248a
mov ebp, eax
add ebx, ebx
jne 0x432423
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x432430
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x432454
inc ecx
add ebx, ebx
jne 0x432440
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x432435
jne 0x432451
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x432435
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x432474
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x432465
jmp 0x4323d6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x432474
add edi, ecx
jmp 0x4323d6
pop esi
mov edi, esi
mov ecx, 0x82f
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x432492
cmp byte [edi], 6
jne 0x432492
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 al, bl
loop 0x432497
lea edi, [esi + 0x2f000]
mov eax, dword [edi]
or eax, eax
je 0x432506
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x48f34]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x49014]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4324c4
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x4901c]
or eax, eax
je 0x432500
mov dword [ebx], eax
add ebx, 4
jmp 0x4324e1
call dword [esi + 0x49018]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x432537
cmp al, 0xef
ja 0x43252a
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x43250c
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x432519
mov ebp, dword [esi + 0x49020]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x217]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x43256b
sub esp, 0xffffff80
jmp 0x40ede0
Function at 0x40d8ee
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x18], 0
and dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
ret 4

Function at 0x429c50
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x1e000]
push edi
jmp 0x429c6a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x429c71
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x429c60
mov eax, 1
add ebx, ebx
jne 0x429c83
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x429c78
jne 0x429c94
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x429c78
xor ecx, ecx
sub eax, 3
jb 0x429ca8
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x429d1a
mov ebp, eax
add ebx, ebx
jne 0x429cb3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x429cc0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x429ce4
inc ecx
add ebx, ebx
jne 0x429cd0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x429cc5
jne 0x429ce1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x429cc5
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x429d04
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x429cf5
jmp 0x429c66
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x429d04
add edi, ecx
jmp 0x429c66
pop esi
mov edi, esi
mov ecx, 0x651
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x429d22
cmp byte [edi], 5
jne 0x429d22
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 al, bl
loop 0x429d27
lea edi, [esi + 0x27000]
mov eax, dword [edi]
or eax, eax
je 0x429d9f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x2f49c]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x2f528]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x429d54
mov ecx, edi
jns 0x429d83
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x2f52c]
or eax, eax
je 0x429d99
mov dword [ebx], eax
add ebx, 4
jmp 0x429d71
call dword [esi + 0x2f53c]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x429dd0
cmp al, 0xef
ja 0x429dc3
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x429da5
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x429db2
mov ebp, dword [esi + 0x2f530]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1ff]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x429e04
sub esp, 0xffffff80
jmp 0x404f8f
Function at 0x70081b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
pushal
call 0x70081bf
pop dword [ebp - 0x3c]
mov eax, 0x70081bf
sub dword [ebp - 0x3c], eax
mov dword [ebp - 0x4c], 0xb134c1d3
add dword [ebp - 0x4c], 0x9d1d8378
mov dword [ebp - 0x48], 0x8d759397
sub dword [ebp - 0x48], 0x5b424752
mov dword [ebp - 0x44], 0x2ca4c213
sub dword [ebp - 0x44], 0xe0587de5
mov dword [ebp - 0x40], 0xf7569e0b
sub dword [ebp - 0x40], 0xf7569e0b
lea eax, [ebp - 0x4c]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 0x3c]
call dword [eax]
mov dword [ebp - 0x4c], 0xed78e9f3
sub dword [ebp - 0x4c], 0x7906809d
mov dword [ebp - 0x48], 0x7ca960a6
sub dword [ebp - 0x48], 0x3b3cff31
mov dword [ebp - 0x44], 0x71de2fba
sub dword [ebp - 0x44], 0xe6ec34e
mov dword [ebp - 0x40], 0x75e11f9
sub dword [ebp - 0x40], 0x75e11f9
lea ebx, [ebp - 0x4c]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x3c]
call dword [eax]
push 0x40
push 0x1000
push 0x3ac98
push 0
call eax
mov ecx, 0xad4bc110
sub ecx, 0xad4b785f
mov ebx, eax
mov esi, 0x701e000
add esi, dword [ebp - 0x3c]
mov edx, 0x14be123a
sub edx, 0x3a6a3f8c
sub dword [ebp - 0x34], 0x72eb7ab3
mov edi, dword [esi]
xor dword [ebp - 0x20], 0xfe74dbda
sub edi, edx
sub dword [ebp - 0x24], edx
mov dword [ebx], edi
sub dword [ebp - 0x18], 0x46510728
add ebx, 0xb0d142d3
add ebx, 0x4f2ebd31
add esi, 4
loop 0x70082cc
add eax, 0x11597
xor ebx, ebx
add ebx, eax
add eax, 0xff99d0
add eax, 0xff006635
mov ecx, 0x1a2a888a
add ecx, 0xecd57776
add ecx, dword [ebp - 0x3c]
call ebx
leave
ret

Function at 0x700c938
Capabilities:
Set current directory

Disassembly:
push 8
mov eax, 0x7010cdd
call fcn.07001ea6
mov edi, ecx
mov dword [ebp - 0x14], edi
mov esi, dword [ebp + 8]
push esi
call fcn.0700cc00
xor ebx, ebx
mov dword [edi], vtable.FileSharedStream.0
mov dword [edi + 0xc], ebx
mov byte [edi + 0x10], bl
mov eax, dword [esi + 0x14]
mov dword [edi + 0x14], eax
lea eax, [edi + 0x18]
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.kernel32.dll_InitializeCriticalSection]
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.0700d3f5
lea ecx, [ebp - 0x10]
call fcn.0700c8d5
mov eax, dword [edi + 0x14]
mov byte [ebp - 4], 2
push dword [eax + 0x14]
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x700c9a5
mov eax, dword [eax + 0x14]
jmp 0x700c9aa
mov eax, 0x70127b2
push 0x701411c
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov dword [edi + 0xc], eax
pop ecx
pop ecx
test eax, eax
je 0x700c9dc
mov ecx, dword [edi + 4]
call fcn.07007826
lea ecx, [ebp - 0x10]
mov dword [edi + 8], eax
call fcn.070081b0
mov eax, edi
call fcn.07002b7f
ret 4
push str.file_does_not_exist
push ebx
call fcn.070081b0
int3
Function at 0x700d4d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 0xc]
test eax, eax
je 0x700d534
cmp byte [esi + 0x10], 0
je 0x700d4f2
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov eax, dword [esi + 0xc]
pop ecx
mov byte [esi + 0x10], 0
push edi
push eax
push dword [ebp + 0xc]
push 1
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push dword [esi + 0xc]
mov edi, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 0x14
test eax, eax
je 0x700d522
push dword [esi + 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
pop ecx
test eax, eax
je 0x700d53b
push dword [esi + 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
pop ecx
mov dword [esi + 8], eax
mov eax, edi
pop edi
jmp 0x700d536
xor eax, eax
pop esi
pop ebp
ret 8
push str.stream_read_error
push 0
call fcn.070081b0
int3

Function at 0x700d7e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 4]
cmp byte [eax + 8], 0
jne 0x700d833
cmp dword [esi + 0xc], 0
je 0x700d82e
push dword [esi + 0xc]
push dword [ebp + 0xc]
push 1
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [esi + 0xc]
mov byte [esi + 0x10], 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 0x14
test eax, eax
je 0x700d821
push str.stream_write_error
jmp 0x700d838
push dword [esi + 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
pop ecx
mov dword [esi + 8], eax
pop esi
pop ebp
ret 8
push str.Attempt_to_write_read_only_stream
push 0
call fcn.070081b0
int3
Function at 0x402f94
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x403694
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x469024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x40372c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x40370c
xor eax, eax
push ebp
push 0x403705
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403748
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40370c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x469024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x469024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404538
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x524048], 0
je 0x404599
cmp word [0x52421c], 0xd7b2
jne 0x404561
cmp dword [0x524224], 0
jbe 0x404561
mov eax, 0x524218
call dword [0x524234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x4045c0
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x469030], 0
jne 0x4045b5
push 0
push 0x469754
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret