joyce8/EMBER2024-capa huggingface dataset:
Function at 0x6d8a30
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x304]
push ebx
push ebp
mov ebp, dword [eax + 0x308]
push esi
mov esi, dword [eax + 0x300]
mov dword [esp + 0xc], ecx
mov ecx, dword [eax + 0x310]
add eax, 0xd8
push edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], eax
xor edi, edi
jmp 0x6d8a80
mov ecx, dword [esp + 0x14]
xor edi, edi
jmp 0x6d8a80
mov ecx, dword [esp + 0x14]
lea esp, [esp]
cmp ebp, 0xf
jge 0x6d8aac
mov eax, 0xe
sub eax, ebp
shr eax, 3
inc eax
lea ebp, [ebp + eax*8]
mov edx, dword [esp + 0x10]
movzx ebx, byte [ecx]
shl edx, 8
add edx, ebx
inc ecx
dec eax
mov dword [esp + 0x10], edx
jne 0x6d8a94
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x24]
movzx eax, byte [eax + edi + 0x149]
mov ecx, esi
shr ecx, 6
mov edx, eax
and edx, 0xfffffffc
movzx ebx, byte [ecx + edx + 0x302701b8]
sub esi, ebx
mov ecx, ebp
mov edx, esi
shl edx, cl
mov ecx, dword [esp + 0x10]
and eax, 0xfffffffe
cmp ecx, edx
jb 0x6d8ae8
mov esi, ecx
sub esi, edx
mov dword [esp + 0x10], esi
mov esi, ebx
dec eax
movzx ecx, byte [esi + 0x302703d0]
movzx eax, byte [eax + 0x302702c9]
sub ebp, ecx
shl esi, cl
mov ecx, dword [esp + 0x24]
mov edx, edi
not edx
mov byte [ecx + edi + 0x149], al
xor eax, edx
test al, 1
je 0x6d8b19
inc edi
cmp edi, 3
jl 0x6d8a78
mov ax, word [edi*8 + 0x30270928]
mov ecx, dword [esp + 0x1c]
mov word [ecx], ax
movzx edx, byte [edi*8 + 0x3027092c]
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x28]
mov dword [edi + eax*4], edx
inc eax
add ecx, 2
cmp eax, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
jl 0x6d8a70
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
pop edi
mov dword [eax + 0x300], esi
pop esi
mov dword [eax + 0x308], ebp
pop ebp
mov dword [eax + 0x304], ecx
mov dword [eax + 0x310], edx
pop ebx
add esp, 0x10
ret 8
Function at 0x7114b0
Capabilities:
Encode data using xor

Disassembly:
test edx, edx
push ebp
mov ebp, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, eax
jle 0x711520
push ebx
mov al, byte [esi]
mov cl, byte [edi]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp], al
mov al, byte [esi + 1]
mov cl, byte [edi + 1]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp + 1], al
mov al, byte [esi + 2]
mov cl, byte [edi + 2]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp + 2], al
mov al, byte [esi + 3]
mov cl, byte [edi + 3]
mov bl, al
xor bl, cl
or al, cl
mov ecx, dword [esp + 0x1c]
shr bl, 1
sub al, bl
mov ebx, dword [esp + 0x24]
mov byte [ebp + 3], al
add esi, dword [esp + 0x20]
add edi, ebx
add ebp, ecx
dec edx
jne 0x7114c2
pop ebx
pop edi
pop esi
pop ebp
ret

Function at 0x711b40
Capabilities:
Encode data using xor

Disassembly:
test edx, edx
push ebp
mov ebp, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, eax
jle 0x711c04
push ebx
mov al, byte [esi]
mov cl, byte [edi]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp], al
mov al, byte [esi + 1]
mov cl, byte [edi + 1]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp + 1], al
mov al, byte [esi + 2]
mov cl, byte [edi + 2]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp + 2], al
mov al, byte [esi + 3]
mov cl, byte [edi + 3]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp + 3], al
mov al, byte [esi + 4]
mov cl, byte [edi + 4]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp + 4], al
mov al, byte [esi + 5]
mov cl, byte [edi + 5]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp + 5], al
mov al, byte [esi + 6]
mov cl, byte [edi + 6]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov byte [ebp + 6], al
mov al, byte [esi + 7]
mov cl, byte [edi + 7]
mov bl, al
xor bl, cl
or al, cl
mov ecx, dword [esp + 0x1c]
shr bl, 1
sub al, bl
mov ebx, dword [esp + 0x24]
mov byte [ebp + 7], al
add esi, dword [esp + 0x20]
add edi, ebx
add ebp, ecx
dec edx
jne 0x711b56
pop ebx
pop edi
pop esi
pop ebp
ret
Function at 0x712770
Capabilities:
Encode data using xor

Disassembly:
test edx, edx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, eax
jle 0x71281d
push ebx
mov al, byte [edi]
mov cl, byte [ebp]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
shr bl, 1
sub cl, bl
mov byte [esi], cl
mov al, byte [edi + 1]
mov cl, byte [ebp + 1]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi + 1]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
shr bl, 1
sub cl, bl
mov byte [esi + 1], cl
mov al, byte [edi + 2]
mov cl, byte [ebp + 2]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi + 2]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
shr bl, 1
sub cl, bl
mov byte [esi + 2], cl
mov al, byte [edi + 3]
mov cl, byte [ebp + 3]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi + 3]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
mov eax, dword [esp + 0x20]
shr bl, 1
sub cl, bl
mov ebx, dword [esp + 0x24]
mov byte [esi + 3], cl
mov ecx, dword [esp + 0x1c]
add edi, eax
add ebp, ebx
add esi, ecx
dec edx
jne 0x712786
pop ebx
pop edi
pop esi
pop ebp
ret

Function at 0x712f40
Capabilities:
Encode data using xor

Disassembly:
test edx, edx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, eax
jle 0x71306d
push ebx
mov al, byte [edi]
mov cl, byte [ebp]
mov bl, al
xor bl, cl
or al, cl
shr bl, 1
sub al, bl
mov cl, byte [esi]
mov bl, cl
xor bl, al
or cl, al
shr bl, 1
sub cl, bl
mov byte [esi], cl
mov al, byte [edi + 1]
mov cl, byte [ebp + 1]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi + 1]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
shr bl, 1
sub cl, bl
mov byte [esi + 1], cl
mov al, byte [edi + 2]
mov cl, byte [ebp + 2]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi + 2]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
shr bl, 1
sub cl, bl
mov byte [esi + 2], cl
mov al, byte [edi + 3]
mov cl, byte [ebp + 3]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi + 3]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
shr bl, 1
sub cl, bl
mov byte [esi + 3], cl
mov al, byte [edi + 4]
mov cl, byte [ebp + 4]
mov bl, al
xor bl, cl
shr bl, 1
or al, cl
mov cl, byte [esi + 4]
sub al, bl
mov bl, cl
xor bl, al
shr bl, 1
or cl, al
sub cl, bl
mov byte [esi + 4], cl
mov al, byte [edi + 5]
mov cl, byte [ebp + 5]
mov bl, al
xor bl, cl
shr bl, 1
or al, cl
mov cl, byte [esi + 5]
sub al, bl
mov bl, cl
xor bl, al
shr bl, 1
or cl, al
sub cl, bl
mov byte [esi + 5], cl
mov al, byte [edi + 6]
mov cl, byte [ebp + 6]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi + 6]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
shr bl, 1
sub cl, bl
mov byte [esi + 6], cl
mov al, byte [edi + 7]
mov cl, byte [ebp + 7]
mov bl, al
xor bl, cl
or al, cl
mov cl, byte [esi + 7]
shr bl, 1
sub al, bl
mov bl, cl
xor bl, al
or cl, al
mov eax, dword [esp + 0x20]
shr bl, 1
sub cl, bl
mov ebx, dword [esp + 0x24]
mov byte [esi + 7], cl
mov ecx, dword [esp + 0x1c]
add edi, eax
add ebp, ebx
add esi, ecx
dec edx
jne 0x712f56
pop ebx
pop edi
pop esi
pop ebp
ret
Function at 0x73d2f0
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 8]
mov eax, ecx
cdq
and edx, 7
push ebx
mov ebx, dword [esp + 0x10]
add eax, edx
push ebp
sar eax, 3
and ecx, 7
test eax, eax
push esi
mov esi, dword [esp + 0x10]
mov ebp, ecx
jle 0x73d33c
push edi
mov edi, eax
push 8
mov ecx, esi
call fcn.00738520
xor edx, edx
mov ecx, ebx
shr ecx, 8
mov dh, bl
xor eax, ecx
and eax, 0xff
xor edx, dword [eax*4 + 0x30280620]
dec edi
mov ebx, edx
jne 0x73d316
pop edi
test ebp, ebp
jle 0x73d368
push 1
mov ecx, esi
call fcn.00738520
mov ecx, ebx
shr ecx, 0xf
and ecx, 1
and ebx, 0x7fff
xor eax, ecx
shl ebx, 1
test eax, eax
je 0x73d365
xor ebx, 0x8005
dec ebp
jne 0x73d340
pop esi
pop ebp
mov eax, ebx
pop ebx
ret
Function at 0x73f0fe
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x73f12c
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x73f133
cmp ebx, dword [eax + 4]
jae 0x73f133
xor eax, eax
jmp 0x73f323
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x73f144
xor eax, eax
inc eax
jmp 0x73f322
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x73f15a
cmp ecx, edx
jae 0x73f29f
cmp dword [eax + 4], 0
je 0x73f163
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x73f14b
cmp dword [ebp + 8], 0
je 0x73f185
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x73f29f
cmp eax, esi
jae 0x73f29f
mov eax, dword [0x30389d58]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x73f1aa
cmp dword [esi*4 + 0x30389d60], edi
je 0x73f2a3
inc esi
cmp esi, eax
jl 0x73f198
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [0x3023f24c]
test eax, eax
je 0x73f31f
cmp dword [ebp - 8], 0x1000000
jne 0x73f31f
test byte [ebp - 0xc], 0xcc
je 0x73f228
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x73f31f
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x73f31f
cmp word [eax + 0x18], 0x10b
jne 0x73f31f
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x73f31f
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x73f228
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x73f228
test byte [ecx + 0x27], 0x80
jne 0x73f29f
push 1
push 0x30389da0
call dword [0x3023f35c]
test eax, eax
jne 0x73f13c
mov ecx, dword [0x30389d58]
test ecx, ecx
mov edx, ecx
jle 0x73f25c
lea eax, [ecx*4 + 0x30389d5c]
cmp dword [eax], edi
je 0x73f25c
dec edx
sub eax, 4
test edx, edx
jg 0x73f250
test edx, edx
jne 0x73f28d
push 0xf
pop ebx
cmp ecx, ebx
jg 0x73f269
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x73f281
lea eax, [edx*4 + 0x30389d60]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x73f26f
cmp ecx, 0x10
jge 0x73f28d
inc ecx
mov dword [0x30389d58], ecx
push 0
push 0x30389da0
call dword [0x3023f35c]
jmp 0x73f13c
xor eax, eax
jmp 0x73f322
test esi, esi
jle 0x73f13c
mov ebx, dword [0x3023f35c]
push 1
push 0x30389da0
call ebx
test eax, eax
jne 0x73f13c
cmp dword [esi*4 + 0x30389d60], edi
je 0x73f2f9
mov eax, dword [0x30389d58]
lea esi, [eax - 1]
test esi, esi
jl 0x73f2e7
cmp dword [esi*4 + 0x30389d60], edi
je 0x73f2e3
dec esi
jns 0x73f2d7
test esi, esi
jge 0x73f2f7
cmp eax, 0x10
jge 0x73f2f2
inc eax
mov dword [0x30389d58], eax
lea esi, [eax - 1]
jmp 0x73f2f9
je 0x73f311
xor ecx, ecx
test esi, esi
jl 0x73f311
lea eax, [ecx*4 + 0x30389d60]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x73f2ff
push 0
push 0x30389da0
call ebx
jmp 0x73f13c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x7f2d40
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x1d3000]
push edi
or ebp, 0xffffffff
jmp 0x7f2d62
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x7f2d69
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x7f2d58
mov eax, 1
add ebx, ebx
jne 0x7f2d7b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x7f2d70
jne 0x7f2d8c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x7f2d70
xor ecx, ecx
sub eax, 3
jb 0x7f2da0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x7f2e12
mov ebp, eax
add ebx, ebx
jne 0x7f2dab
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x7f2db8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x7f2ddc
inc ecx
add ebx, ebx
jne 0x7f2dc8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x7f2dbd
jne 0x7f2dd9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x7f2dbd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x7f2dfc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x7f2ded
jmp 0x7f2d5e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x7f2dfc
add edi, ecx
jmp 0x7f2d5e
pop esi
mov edi, esi
mov ecx, 0x2e5d
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x7f2e1a
cmp byte [edi], 0x12
jne 0x7f2e1a
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 0x7f2e1f
lea edi, [esi + 0x3ef000]
mov eax, dword [edi]
or eax, eax
je 0x7f2e97
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x452354]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x452444]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x7f2e4c
mov ecx, edi
jns 0x7f2e7b
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 + 0x452448]
or eax, eax
je 0x7f2e91
mov dword [ebx], eax
add ebx, 4
jmp 0x7f2e69
call dword [esi + 0x452458]
mov ebp, dword [esi + 0x45244c]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x227]
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 0x7f2ecb
sub esp, 0xffffff80
jmp 0x46b324
Function at 0x407ceb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00401f28
and dword [ebp - 4], 0
cmp dword [0x40fbc4], 0
mov ebx, eax
jne 0x407d9c
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x407e4d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x407e4d
push eax
call fcn.00401eb6
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x40fbc4], eax
call esi
push eax
call fcn.00401eb6
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x40fbc8], eax
call esi
push eax
call fcn.00401eb6
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x40fbcc], eax
call esi
push eax
call fcn.00401eb6
pop ecx
mov dword [0x40fbd4], eax
test eax, eax
je 0x407d9c
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00401eb6
pop ecx
mov dword [0x40fbd0], eax
mov eax, dword [0x40fbd0]
cmp eax, ebx
je 0x407df4
cmp dword [0x40fbd4], ebx
je 0x407df4
push eax
call fcn.00401f31
push dword [0x40fbd4]
mov esi, eax
call fcn.00401f31
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x407df4
test edi, edi
je 0x407df4
call esi
test eax, eax
je 0x407deb
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x407deb
test byte [ebp - 0xc], 1
jne 0x407df4
or dword [ebp + 0x10], 0x200000
jmp 0x407e2d
mov eax, dword [0x40fbc8]
cmp eax, ebx
je 0x407e2d
push eax
call fcn.00401f31
pop ecx
test eax, eax
je 0x407e2d
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x407e2d
mov eax, dword [0x40fbcc]
cmp eax, ebx
je 0x407e2d
push eax
call fcn.00401f31
pop ecx
test eax, eax
je 0x407e2d
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x40fbc4]
call fcn.00401f31
pop ecx
test eax, eax
je 0x407e4d
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x407e4f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4018c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40197c
cmp byte [esi + 0x3d], 0
je 0x40197c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40196a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x401931
sub eax, 1
je 0x401935
sub eax, 2
jne 0x40196a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403354
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x401953
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40196a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403354
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403354
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00403354
mov esp, ebp
pop ebp
ret
Function at 0x402e10
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x402e31
jl 0x402e27
test esi, esi
jne 0x402e31
pop esi
xor eax, eax
xor edx, edx
pop ebx
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x402e48
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
pop ebp
ret 0xc
push edi
mov edi, esi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
test eax, eax
je 0x402e7e
cmp eax, dword [ebp + 0xc]
mov ecx, ebx
cmovb esi, eax
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
push esi
push eax
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
add dword [ebp + 8], esi
add esp, 0xc
mov ecx, ebx
sub edi, esi
push esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
cmp dword [ebx + 0x4c], 0
mov esi, dword [ebp + 8]
je 0x402eed
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const]
lea ecx, [ebx + 0x3c]
cmp eax, ecx
jne 0x402ea6
push dword [ebx + 0x54]
mov eax, dword [ebx + 0x50]
mov ecx, ebx
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, edi
cmp edi, 0xfff
jbe 0x402edb
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x402eed
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x402eb5
test ecx, ecx
je 0x402eed
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
pop ebp
ret 0xc
Function at 0x402f00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x402f25
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x402f90
jg 0x402f4b
test esi, esi
je 0x402f90
test ecx, ecx
jl 0x402fca
jg 0x402f55
test eax, eax
je 0x402fca
cmp edi, ecx
jg 0x402f65
jl 0x402f5f
cmp esi, eax
jae 0x402f65
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
push dword [ebp + 0x10]
push dword [ebp + 8]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0x10]
add esp, 0xc
add dword [ebp + 8], eax
mov ecx, ebx
sub esi, eax
sbb edi, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
mov eax, dword [ebp + 8]
test edi, edi
jl 0x402fb7
jg 0x402f9d
test esi, esi
je 0x402fb7
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
je 0x402fb7
push ecx
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
jmp 0x402f9d
Function at 0x403be1
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x403c20
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x403c20
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x403c20
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x403c20
cmp dword [ecx + 0x74], 0xe
jbe 0x403c20
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x402d80
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402dbd
xor eax, eax
mov al, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402ddd
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00404e20
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x402fbc
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404ba0
test esi, esi
jne 0x402ff3
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.00404c90
jmp 0x403014
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402e58
mov dword [esp], eax
test esi, esi
je 0x403014
cmp dword [ebx], 0
je 0x403014
dec esi
jmp 0x402ffb
add esp, 0x10c
pop esi
pop ebx
ret

Function at 0x403370
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x40338c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x6d2008], 0x8088405
inc edx
mov dword [ebx + 0x6d2008], edx
fld qword [ebx + 0x6d2068]
push 0
push edx
fild qword [esp]
add esp, 8
fmulp st(1)
pop ebx
ret

Function at 0x403adc
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x6d2024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403b74
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403b54
xor eax, eax
push ebp
push 0x403b4d
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 0x403b90
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 0x403b54
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x6d2024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x6d2024], ax
mov esp, ebp
pop ebp
ret