joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10034d9b
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov eax, ecx
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + 0x20]
push esi
mov esi, dword [eax]
mov ebx, dword [esi + 0x20]
push edi
mov edi, dword [esi + 0x6c]
imul edi, dword [esi + 0x60]
add edi, ebx
cmp ebx, edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], edi
jae 0x10034ec2
mov eax, 0xff1c
mov edx, dword [esi + 0x60]
mov esi, dword [esi + 0x68]
lea esi, [ebx + esi*2]
add edx, ebx
cmp ebx, esi
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], esi
jae 0x10034ea3
movzx esi, word [edx + 2]
movzx ecx, word [edx]
movzx edx, word [ebx]
movzx edi, word [ebx + 2]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], edx
mov ebx, esi
mov ecx, 0xe3
and dx, cx
and bx, cx
add ebx, edx
mov edx, dword [ebp - 4]
and dx, cx
add ebx, edx
mov edx, edi
and dx, cx
mov ecx, esi
and cx, ax
and esi, eax
lea edx, [ebx + edx + 0x42]
mov ebx, dword [ebp - 0xc]
and bx, ax
shr edx, 2
add ecx, ebx
mov ebx, dword [ebp - 4]
and bx, ax
add ecx, ebx
mov ebx, edi
and bx, ax
and edi, eax
lea ecx, [ecx + ebx + 0x208]
mov ebx, dword [ebp - 0x10]
shr ecx, 2
xor dl, cl
mov ecx, dword [ebp - 0xc]
and ecx, eax
add esi, ecx
mov ecx, dword [ebp - 4]
and ecx, eax
add esi, ecx
and edx, 0xffff00e3
lea ecx, [esi + edi + 0x208]
shr ecx, 2
xor edx, ecx
mov ecx, dword [ebp - 8]
add dword [ebp - 8], 2
mov word [ecx], dx
mov edx, dword [ebp - 0x14]
add ebx, 4
add edx, 4
cmp ebx, dword [ebp - 0x20]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], edx
jb 0x10034df4
mov ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov esi, dword [edx + 4]
add ecx, dword [esi + 0x60]
mov esi, dword [edx]
mov edx, dword [esi + 0x60]
lea ebx, [ebx + edx*2]
cmp ebx, edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ebx
jb 0x10034dd5
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret
Function at 0x10034fd2
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov eax, ecx
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + 0x20]
push esi
mov esi, dword [eax]
mov ebx, dword [esi + 0x20]
push edi
mov edi, dword [esi + 0x6c]
imul edi, dword [esi + 0x60]
add edi, ebx
cmp ebx, edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], edi
jae 0x100350f9
mov eax, 0xff00
mov edx, dword [esi + 0x60]
mov esi, dword [esi + 0x68]
lea esi, [ebx + esi*2]
add edx, ebx
cmp ebx, esi
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], esi
jae 0x100350da
movzx esi, word [edx + 2]
movzx ecx, word [edx]
movzx edx, word [ebx]
movzx edi, word [ebx + 2]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], edx
mov ebx, esi
mov ecx, 0xff
and dx, cx
and bx, cx
add ebx, edx
mov edx, dword [ebp - 4]
and dx, cx
add ebx, edx
mov edx, edi
and dx, cx
mov ecx, esi
and cx, ax
and esi, eax
lea edx, [ebx + edx + 2]
mov ebx, dword [ebp - 0xc]
and bx, ax
shr edx, 2
add ecx, ebx
mov ebx, dword [ebp - 4]
and bx, ax
add ecx, ebx
mov ebx, edi
and bx, ax
and edi, eax
lea ecx, [ecx + ebx + 0x200]
mov ebx, dword [ebp - 0x10]
shr ecx, 2
xor dl, cl
mov ecx, dword [ebp - 0xc]
and ecx, eax
add esi, ecx
mov ecx, dword [ebp - 4]
and ecx, eax
add esi, ecx
and edx, 0xffff00ff
lea ecx, [esi + edi + 0x200]
shr ecx, 2
xor edx, ecx
mov ecx, dword [ebp - 8]
add dword [ebp - 8], 2
mov word [ecx], dx
mov edx, dword [ebp - 0x14]
add ebx, 4
add edx, 4
cmp ebx, dword [ebp - 0x20]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], edx
jb 0x1003502b
mov ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov esi, dword [edx + 4]
add ecx, dword [esi + 0x60]
mov esi, dword [edx]
mov edx, dword [esi + 0x60]
lea ebx, [ebx + edx*2]
cmp ebx, edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ebx
jb 0x1003500c
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret
Function at 0x10035100
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, ecx
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + 0x20]
push ebx
push edi
mov dword [ebp - 0x28], eax
mov eax, dword [eax]
mov edi, dword [eax + 0x6c]
imul edi, dword [eax + 0x60]
mov ebx, dword [eax + 0x20]
add edi, ebx
cmp ebx, edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], edi
jae 0x10035218
push esi
mov esi, 0xf0
mov edx, dword [eax + 0x60]
mov eax, dword [eax + 0x68]
add eax, ebx
add edx, ebx
cmp ebx, eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x20], eax
jae 0x100351f8
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
movzx edi, byte [ebx + 1]
mov dword [ebp - 4], ecx
movzx ecx, byte [ebx]
mov ebx, ecx
and ebx, 0xf
mov edx, eax
and edx, 0xf
add edx, ebx
mov ebx, dword [ebp - 4]
and ebx, 0xf
add edx, ebx
mov dword [ebp - 0x1c], ecx
and cx, si
mov ebx, edi
and ebx, 0xf
lea edx, [edx + ebx + 2]
mov ebx, eax
and bx, si
shr edx, 2
and ax, si
add ebx, ecx
mov ecx, dword [ebp - 4]
and cx, si
add ebx, ecx
mov ecx, edi
and cx, si
and di, si
lea ecx, [ebx + ecx + 0x20]
shr ecx, 2
xor dl, cl
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
and cx, si
and dl, 0xf
add eax, ecx
mov ecx, dword [ebp - 4]
and cx, si
add eax, ecx
lea eax, [eax + edi + 0x20]
shr eax, 2
xor dl, al
mov eax, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [eax], dl
mov edx, dword [ebp - 0x10]
inc ebx
inc ebx
inc edx
inc edx
cmp ebx, dword [ebp - 0x20]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], edx
jb 0x10035158
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
mov edx, dword [eax + 4]
add ecx, dword [edx + 0x60]
mov eax, dword [eax]
mov edx, dword [eax + 0x60]
lea ebx, [ebx + edx*2]
cmp ebx, edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ebx
jb 0x1003513a
pop esi
pop edi
xor eax, eax
pop ebx
leave
ret
Function at 0x100467b6
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov edx, dword [ebx + 0x24]
push esi
mov dword [ebp - 8], edx
push edi
mov ecx, dword [ebx + 0x64]
mov eax, dword [ebx + 0x34]
mov esi, dword [ebx + 0x6c]
sub eax, ecx
sub eax, esi
mov dword [ebp - 4], eax
jne 0x100467e2
test ecx, ecx
jne 0x100467ec
test esi, esi
jne 0x100467ec
mov eax, edx
jmp 0x1004685d
cmp eax, 0xffffffff
jne 0x100467ec
push 0xfffffffffffffffe
pop eax
jmp 0x1004685d
mov esi, dword [ebx + 0x24]
lea esi, [edx + esi - 0x106]
cmp ecx, esi
jb 0x1004685d
mov edi, dword [ebx + 0x30]
mov ecx, edx
mov eax, ecx
shr ecx, 2
lea esi, [edi + edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x44]
mov eax, dword [ebx + 0x3c]
sub dword [ebx + 0x68], edx
sub dword [ebx + 0x64], edx
sub dword [ebx + 0x54], edx
lea eax, [eax + ecx*2]
dec eax
dec eax
movzx esi, word [eax]
mov edi, esi
sub edi, edx
cmp esi, edx
sbb esi, esi
not esi
and esi, edi
dec ecx
mov word [eax], si
jne 0x10046822
mov eax, dword [ebx + 0x38]
mov esi, edx
lea eax, [eax + edx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edi, ecx
sub edi, edx
cmp ecx, edx
sbb ecx, ecx
not ecx
and ecx, edi
dec esi
mov word [eax], cx
jne 0x10046841
mov eax, dword [ebp - 4]
add eax, edx
mov esi, dword [ebx]
cmp dword [esi + 4], 0
mov dword [ebp - 0xc], esi
je 0x1004690a
mov edi, dword [ebx + 0x6c]
add edi, dword [ebx + 0x64]
mov ecx, dword [esi + 4]
add edi, dword [ebx + 0x30]
cmp ecx, eax
mov dword [ebp - 4], ecx
jbe 0x10046882
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1004688c
xor ecx, ecx
jmp 0x100468cb
sub ecx, dword [ebp - 4]
mov eax, dword [esi + 0x1c]
mov dword [esi + 4], ecx
cmp dword [eax + 0x18], 0
jne 0x100468ae
push dword [ebp - 4]
push dword [esi]
push dword [esi + 0x30]
call fcn.10047047
mov edx, dword [ebp - 8]
mov dword [esi + 0x30], eax
mov ecx, dword [ebp - 4]
mov esi, dword [esi]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov eax, dword [ebp - 0xc]
add dword [eax], ecx
add dword [eax + 8], ecx
add dword [ebx + 0x6c], ecx
mov edi, dword [ebx + 0x6c]
cmp edi, 3
jb 0x100468f6
mov eax, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x30]
lea esi, [eax + ecx]
movzx eax, byte [esi]
mov ecx, dword [ebx + 0x50]
mov dword [ebx + 0x40], eax
shl eax, cl
movzx ecx, byte [esi + 1]
xor eax, ecx
and eax, dword [ebx + 0x4c]
mov dword [ebx + 0x40], eax
cmp edi, 0x106
jae 0x1004690a
mov eax, dword [ebx]
cmp dword [eax + 4], 0
jne 0x100467c4
pop edi
pop esi
leave
ret
Function at 0x9eb110
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x4a9000]
push edi
or ebp, 0xffffffff
jmp 0x9eb132
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x9eb139
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x9eb128
mov eax, 1
add ebx, ebx
jne 0x9eb14b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x9eb15c
jne 0x9eb17b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x9eb17b
dec eax
add ebx, ebx
jne 0x9eb168
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x9eb140
add ebx, ebx
jne 0x9eb177
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x9eb1cd
xor ecx, ecx
sub eax, 3
jb 0x9eb193
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x9eb202
sar eax, 1
mov ebp, eax
jmp 0x9eb19e
add ebx, ebx
jne 0x9eb19e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x9eb16c
inc ecx
add ebx, ebx
jne 0x9eb1ac
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x9eb16c
add ebx, ebx
jne 0x9eb1b9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x9eb1ae
jne 0x9eb1ca
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x9eb1ae
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x9eb1ec
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x9eb1de
jmp 0x9eb12e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x9eb1ec
add edi, ecx
jmp 0x9eb12e
pop esi
mov edi, esi
mov ecx, 0x13547
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x9eb20a
cmp byte [edi], 0xa7
jne 0x9eb20a
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 0x9eb20f
lea edi, [esi + 0x5e7000]
mov eax, dword [edi]
or eax, eax
je 0x9eb27e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x5f3080]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x5f31e0]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x9eb23c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x5f31e8]
or eax, eax
je 0x9eb278
mov dword [ebx], eax
add ebx, 4
jmp 0x9eb259
call dword [esi + 0x5f31e4]
mov ebp, dword [esi + 0x5f31ec]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
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 0x9eb2b2
sub esp, 0xffffff80
jmp 0x79a7d4
Function at 0x40174c
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp 0x40aff8

Function at 0x40177f
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x4100d4], 0
jne 0x40178d
call fcn.00401755
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
test esi, esi
jbe 0x4017ba
test cl, 7
je 0x4017ba
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4100d0]
dec esi
inc ecx
jmp 0x40179b
cmp esi, 8
jb 0x40183e
mov edi, esi
shr edi, 3
xor eax, dword [ecx]
add ecx, 8
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4100d0]
sub esi, 8
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4100d0]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4100d0]
mov edx, eax
movzx eax, dl
mov eax, dword [eax*4 + 0x4100d0]
xor eax, dword [ecx - 4]
shr edx, 8
xor eax, edx
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4100d0]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4100d0]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4100d0]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4100d0]
dec edi
jne 0x4017c4
xor edx, edx
test esi, esi
jbe 0x40185e
push ebx
movzx edi, byte [edx + ecx]
movzx ebx, al
xor edi, ebx
shr eax, 8
xor eax, dword [edi*4 + 0x4100d0]
inc edx
cmp edx, esi
jb 0x401845
pop ebx
pop edi
pop esi
ret 0xc

Function at 0x40190c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.004012c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x40199e
push esi
push edi
mov edi, 0x400
push edi
lea eax, [ebp - 0x800]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004075b4
lea eax, [ebp - 0x800]
push eax
call fcn.0040979c
mov esi, eax
lea eax, [ebp - 0x800]
push eax
call fcn.0040792b
test al, al
jne 0x40197a
lea eax, [ebp - 0x1000]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x1000]
push eax
call fcn.0040979c
lea esi, [esi + eax + 1]
mov eax, 0x104
pop edi
cmp esi, eax
pop esi
jbe 0x40199e
push eax
push 0xaf
call fcn.004092a6
push eax
push 0x40e2b0
call fcn.0040a59a
add esp, 0xc
leave
ret 8
Function at 0x40346c
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esi + 0xc18], ebx
cmp byte [esi + 0x16], bl
je 0x403486
mov byte [ebp + 0x10], 1
mov dword [ebp - 4], 0x80000000
cmp byte [ebp + 0x14], bl
je 0x403499
mov dword [ebp - 4], 0xc0000000
mov dword [ebp + 0x14], 1
cmp byte [ebp + 0x10], bl
je 0x4034ac
mov dword [ebp + 0x14], 3
xor eax, eax
cmp byte [esi + 0x15], bl
setne al
dec eax
and eax, 0x8000000
mov edi, eax
call fcn.00406f22
test eax, eax
je 0x4034e5
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4034e5
cmp word [eax], bx
je 0x4034e5
push ebx
push edi
push 3
push ebx
push dword [ebp + 0x14]
push dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4034f9
push ebx
push edi
push 3
push ebx
push dword [ebp + 0x14]
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403515
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x403515
mov dword [esi + 0xc18], 1
cmp edi, 0xffffffff
setne byte [ebp + 0x13]
mov byte [esi + 0x12], bl
mov dword [esi + 0xc], ebx
mov byte [esi + 0x10], bl
cmp byte [ebp + 0x13], bl
je 0x40358d
mov dword [esi + 4], edi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x40354e
push edi
call fcn.0040979c
lea eax, [eax + eax + 2]
push eax
push edi
lea eax, [esi + 0x418]
push eax
call fcn.0040951d
jmp 0x403557
xor eax, eax
mov word [esi + 0x418], ax
cmp dword [ebp + 8], ebx
je 0x403574
push dword [ebp + 8]
call fcn.00409568
inc eax
push eax
push dword [ebp + 8]
lea eax, [esi + 0x17]
push eax
call fcn.0040951d
jmp 0x403583
push 0x1000000
lea eax, [esi + 0x17]
push eax
push edi
call fcn.0040d393
push dword [esi + 4]
mov ecx, esi
call fcn.004032bb
mov al, byte [ebp + 0x13]
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x403658
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0xc], 1
mov esi, 0x4e20
jne 0x40367e
cmp dword [ebp + 0xc], esi
jbe 0x403673
mov dword [ebp + 0xc], esi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [edi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4036ce
mov ecx, edi
call fcn.00403426
test al, al
je 0x4036b4
cmp dword [ebp + 0xc], esi
jbe 0x4036b4
push esi
push dword [ebp + 8]
mov ecx, edi
call fcn.00403658
jmp 0x4036d1
cmp dword [edi + 0xc], 1
jne 0x4036c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x4036c9
xor eax, eax
jmp 0x4036d1
or eax, 0xffffffff
jmp 0x4036d1
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 8

Function at 0x403a5d
Capabilities:
Get file attributes

Disassembly:
call fcn.00406f22
test eax, eax
je 0x403a7d
mov eax, dword [esp + 8]
test eax, eax
je 0x403a7d
cmp word [eax], 0
je 0x403a7d
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x403a87
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
ret 8
Function at 0x403a8a
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
call fcn.00406f22
test eax, eax
je 0x403aaf
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403aaf
cmp word [eax], 0
je 0x403aaf
push dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x403ac1
cmp dword [ebp + 8], 0
je 0x403ac8
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
setne al
jmp 0x403aca
xor al, al
pop ebp
ret 0xc

Function at 0x403bfe
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
call fcn.00406f22
mov esi, dword [ebp + 0xc]
xor ebx, ebx
test eax, eax
je 0x403c24
cmp esi, ebx
je 0x403c24
cmp word [esi], bx
je 0x403c24
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x403c33
cmp dword [ebp + 8], ebx
je 0x403c61
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp eax, ebx
je 0x403c4c
cmp byte [ebp + 0x10], bl
je 0x403c48
push dword [ebp + 0x14]
push esi
push dword [ebp + 8]
call fcn.00403a8a
xor eax, eax
jmp 0x403c64
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x403c61
cmp eax, 3
je 0x403c61
xor eax, eax
inc eax
jmp 0x403c64
push 2
pop eax
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x4093f2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0xc]
imul eax, dword [ebp + 0x10]
push eax
push dword [ebp + 8]
mov eax, dword [ebp + 0x14]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40942a
mov eax, dword [ebp - 4]
xor edx, edx
div dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x40942e
and dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
leave
ret 0x10

Function at 0x409b91
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
cmp dword [0x410028], 0
push ebx
push esi
push edi
mov edi, 0x400
jne 0x409bdc
push 0x64
lea eax, [ebp - 0x12c]
push eax
push 0xf
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ax, word [ebp - 0x12c]
mov word [0x42b8b8], ax
xor eax, eax
mov word [0x42b8ba], ax
mov dword [0x410028], 0x42b8b8
lea eax, [ebp - 0x64]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040ca5c
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
push ebx
push esi
xor eax, eax
push 0x410018
mov word [esi], ax
lea eax, [ebp - 0x64]
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
xor eax, eax
pop edi
mov word [esi + ebx*2 - 2], ax
pop esi
pop ebx
leave
ret 0x10

Function at 0x409f5b
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
push 0x68
push dword [0x425858]
call dword [sym.imp.USER32.dll_GetDlgItem]
cmp byte [0x42696c], 0
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov edi, eax
mov dword [ebp - 4], edi
mov ebx, 0xb1
jne 0x409fbd
mov ecx, dword [0x424724]
call fcn.0040523a
push 5
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
push 0xffffffffffffffff
push 0
push ebx
push edi
call esi
push 0x40e7e0
push 0
push 0xc2
push edi
call esi
mov byte [0x42696c], 1
mov edi, 0x5f5e100
push edi
push edi
push ebx
push dword [ebp - 4]
call esi
lea eax, [ebp - 0x60]
push eax
push 0
push 0x43a
push dword [ebp - 4]
mov dword [ebp - 0x60], 0x5c
call esi
xor eax, eax
inc eax
cmp byte [ebp + 8], 0
mov byte [ebp - 0x47], 0
mov dword [ebp - 0x5c], eax
je 0x40a00d
mov ecx, dword [ebp - 0x58]
and ecx, 0xbfffffff
or ecx, eax
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x4c], 0xa0
mov dword [ebp - 0x5c], 0x40000001
lea ecx, [ebp - 0x60]
push ecx
push eax
push 0x444
push dword [ebp - 4]
call esi
push dword [ebp + 0xc]
push 0
push 0xc2
push dword [ebp - 4]
call esi
push edi
push edi
push ebx
push dword [ebp - 4]
call esi
cmp byte [ebp + 8], 0
je 0x40a057
mov eax, dword [ebp - 0x58]
and eax, 0xfffffffe
or eax, 0x40000000
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x60]
push eax
push 1
push 0x444
push dword [ebp - 4]
call esi
push 0x40e804
push 0
push 0xc2
push dword [ebp - 4]
call esi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40d035
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [0x422680]
mov ecx, eax
xor ecx, dword [esp + 4]
shr eax, 8
mov edx, 0xff
and ecx, edx
xor eax, dword [ecx*4 + 0x4100d0]
mov ecx, dword [0x422688]
mov dword [0x422680], eax
movzx eax, al
add eax, dword [0x422684]
imul eax, eax, 0x8088405
inc eax
mov dword [0x422684], eax
shr eax, 0x18
xor eax, ecx
and eax, edx
shr ecx, 8
xor ecx, dword [eax*4 + 0x4100d0]
mov eax, dword [esp + 4]
mov dword [0x422688], ecx
ret 4

Function at 0x40d0c8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push dword [ebp + 0xc]
call fcn.0040d08f
push 0xc
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.004094eb
xor esi, esi
lea edx, [ebp + esi - 0xc]
call fcn.0040d015
xor byte [edx], al
movzx eax, byte [edx]
push eax
call fcn.0040d035
inc esi
cmp esi, 0xc
jl 0x40d0e7
movzx ax, byte [ebp - 1]
movzx ecx, ax
mov eax, dword [0x411548]
test byte [eax + 0x28], 2
movzx eax, byte [0x4215b7]
jne 0x40d122
movzx eax, byte [0x4215bf]
movzx ecx, cx
cmp ecx, eax
je 0x40d12e
or eax, 0xffffffff
jmp 0x40d173
mov ecx, dword [0x421560]
mov eax, ecx
cdq
cmp edx, dword [0x410924]
push edi
jl 0x40d150
mov edx, dword [0x410920]
jg 0x40d14c
cmp eax, edx
jbe 0x40d150
mov edi, edx
jmp 0x40d152
mov edi, ecx
mov esi, dword [0x421558]
jmp 0x40d16c
dec edi
call fcn.0040d015
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.0040d035
inc esi
test edi, edi
jne 0x40d15a
xor eax, eax
pop edi
pop esi
leave
ret 8