joyce8/EMBER2024-capa huggingface dataset:
Function at 0x420294
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov word [ebp - 4], cx
mov byte [ebp - 1], dl
xor eax, eax
push ebp
push 0x9708af
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x4202cf
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x4202e8
lea eax, [ebp - 0x10]
mov edx, dword [0x98d54c]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x4202fb
lea eax, [ebp - 0x10]
mov edx, dword [0x98d54c]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x420307
adc edx, 0
mov edx, dword [edx*4 + 0x98c378]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406b1c
mov esi, eax
cmp esi, 0xffffffff
je 0x420481
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 8]
push eax
push 0x40
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x420474
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x420474
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406ddc
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 8]
push eax
push 0x18
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x420474
mov eax, edi
cmp dword [eax], 0x4550
jne 0x420474
add eax, 4
mov dword [ebp - 0xc], eax
cmp byte [ebp - 1], 0
je 0x420412
mov eax, dword [ebp - 0xc]
cmp word [eax], 0x8664
jne 0x420412
mov eax, edi
call fcn.00403288
mov eax, 0xf0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 8]
push eax
push 0xf0
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x420412
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 4]
jne 0x420412
mov eax, dword [eax + 0x10]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
cmp byte [ebp - 1], 0
jne 0x420474
mov eax, dword [ebp - 0xc]
cmp word [eax], 0x14c
jb 0x420474
mov eax, dword [ebp - 0xc]
cmp word [eax], 0x150
ja 0x420474
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 8]
push eax
push 0xe0
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x420474
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 4]
jne 0x420474
mov eax, dword [eax + 0x10]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406ad4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x420499
inc ebx
cmp ebx, 0x19
jne 0x4202c1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x9708b6
lea eax, [ebp - 0x10]
call fcn.00404cd0
ret
Function at 0x4216c0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x1e000]
push edi
or ebp, 0xffffffff
jmp 0x4216e2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4216e9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4216d8
mov eax, 1
add ebx, ebx
jne 0x4216fb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4216f0
jne 0x42170c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4216f0
xor ecx, ecx
sub eax, 3
jb 0x421720
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x421792
mov ebp, eax
add ebx, ebx
jne 0x42172b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x421738
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x42175c
inc ecx
add ebx, ebx
jne 0x421748
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x42173d
jne 0x421759
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x42173d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x42177c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x42176d
jmp 0x4216de
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x42177c
add edi, ecx
jmp 0x4216de
pop esi
lea edi, [esi + 0x1f000]
mov eax, dword [edi]
or eax, eax
je 0x4217db
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x211dc]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x2122c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x421799
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x21230]
or eax, eax
je 0x4217d5
mov dword [ebx], eax
add ebx, 4
jmp 0x4217b6
call dword [esi + 0x21240]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x42180c
cmp al, 0xef
ja 0x4217ff
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x4217e1
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x4217ee
mov ebp, dword [esi + 0x21234]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x207]
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 0x421840
sub esp, 0xffffff80
jmp 0x411023
Function at 0x401ee2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x411280]
jne 0x401eec
repz ret
jmp fcn.00404399

Function at 0x40b252
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
pushal
call 0x40b261
pop dword [ebp - 0x10]
mov eax, 0x1b098ca3
add eax, 0xe53725be
sub dword [ebp - 0x10], eax
push 0x40
push 0x1000
push 0x36453
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x10]
call dword [eax]
mov ecx, 0xe3f13e71
sub ecx, 0xe3f102a6
xor esi, esi
add esi, eax
mov edx, 0x413bc4
add edx, dword [ebp - 0x10]
mov edi, 0xc2fda72
sub edi, 0xb01c3f87
sub dword [ebp - 8], 0xa6e37b3c
mov ebx, dword [edx]
sub dword [ebp - 8], 0x30d3c27d
xor ebx, edi
xor dword [ebp - 8], edi
mov dword [esi], ebx
sub dword [ebp - 8], ecx
add esi, 4
add edx, 4
loop 0x40b2b7
add eax, 0xbbf5f2a4
add eax, 0x440aef5b
mov ebx, eax
add eax, 0xa558e1c2
add eax, 0x5aa71e43
mov ecx, 0x400000
add ecx, dword [ebp - 0x10]
call ebx
leave
ret
Function at 0x402d40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x402d55
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x402d94
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x402d90
lea ebx, [ebx]
cmp esi, edx
jae 0x402d94
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec ecx
jne 0x402d80
cmp esi, edx
jb 0x402d99
xor eax, eax
pop esi
pop ebp
ret
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop ebp
ret

Function at 0x404f10
Capabilities:
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55aab0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x5a0440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
cmp byte [esi], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jne 0x404f5a
xor ecx, ecx
jmp 0x404f69
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404f60
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00403060
cmp dword [ebp - 0x18], 0
sete bl
cmp dword [ebp - 0x14], 0x10
jb 0x404f8b
push dword [ebp - 0x28]
call fcn.004b8600
add esp, 4
test bl, bl
je 0x404f96
xor eax, eax
jmp 0x405041
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov dword [ebp - 4], 0
cmp byte [esi], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jne 0x404fca
xor ecx, ecx
jmp 0x404fd9
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404fd0
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00403060
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.0040e8b0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x14], 0x10
jb 0x405007
push dword [ebp - 0x28]
call fcn.004b8600
add esp, 4
lea ecx, [ebp - 0x40]
call 0x40db70
test eax, eax
jne 0x40501b
lea ecx, [ebp - 0x40]
call fcn.0040ddd0
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x2c], 0x10
jb 0x40503f
push dword [ebp - 0x40]
call fcn.004b8600
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b8605
mov esp, ebp
pop ebp
ret
Function at 0x405060
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55aae8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x5a0440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x4050f9
cmp byte [esi], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jne 0x4050b4
xor ecx, ecx
jmp 0x4050c9
mov ecx, esi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4050c0
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00403060
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.0040ddd0
cmp dword [ebp - 0x14], 0x10
mov esi, eax
jb 0x4050f5
push dword [ebp - 0x28]
call fcn.004b8600
add esp, 4
mov eax, esi
jmp 0x405102
mov edx, esi
mov ecx, edi
call fcn.00404f10
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b8605
mov esp, ebp
pop ebp
ret

Function at 0x408f99
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x5a0440]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ecx + 4]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x134], eax
cmp dword [ebx - 0xc], 0
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x13c], 0
jne 0x408ff1
call fcn.00408c29
test eax, eax
je 0x409058
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esi], eax
jmp 0x409043
push 0x12b
lea eax, [ebp - 0x12f]
mov byte [ebp - 0x130], 0
push 0
push eax
call fcn.004c2179
add esp, 0xc
lea eax, [ebp - 0x130]
push ebx
push 0x12c
push eax
push edi
push dword [ebp - 0x138]
push dword [ebp - 0x134]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, esi
test eax, eax
jne 0x409037
push edi
jmp 0x40903e
lea eax, [ebp - 0x130]
push eax
call fcn.004091b9
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004befee
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.0040a029
int3

Function at 0x4090b9
Capabilities:
Check mutex on windows

Disassembly:
push esi
push str.Yeelion_KooWo_MusicBox_2011_8_23_2012
push 0
call fcn.00445359
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
cmp eax, 0xb7
jne 0x4090ea
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
ret
Function at 0x409729
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40973e
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40977d
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x409779
lea ebx, [ebx]
cmp esi, edx
jae 0x40977d
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec ecx
jne 0x409769
cmp esi, edx
jb 0x409782
xor eax, eax
pop esi
pop ebp
ret
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop ebp
ret

Function at 0x40a109
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55aa58
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x5a0440]
xor eax, esp
mov dword [esp + 0x30], eax
push esi
mov eax, dword [0x5a0440]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov esi, edx
push 0xffffffffffffffff
push 0
push ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
call fcn.00409ec9
push 0xffffffffffffffff
mov dword [esp + 0x4c], 0
lea ecx, [esp + 0xc]
push 0
push esi
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], 0
mov byte [esp + 0x14], 0
call fcn.00409ec9
cmp dword [esp + 0x34], 0x10
lea ecx, [esp + 0x20]
mov eax, dword [esp + 0x30]
cmovae ecx, dword [esp + 0x20]
inc eax
push eax
push ecx
call fcn.004bfd9d
cmp dword [esp + 0x24], 0x10
lea ecx, [esp + 0x10]
mov eax, dword [esp + 0x20]
cmovae ecx, dword [esp + 0x10]
inc eax
push eax
push ecx
call fcn.004bfd9d
add esp, 0x10
lea eax, [esp + 8]
cmp dword [esp + 0x1c], 0x10
lea ecx, [esp + 0x20]
cmovae eax, dword [esp + 8]
push dword [esp + 0x18]
push 0
push eax
call fcn.00409319
cmp dword [esp + 0x1c], 0x10
mov esi, eax
jb 0x40a1f8
push dword [esp + 8]
call fcn.004befe9
add esp, 4
cmp dword [esp + 0x34], 0x10
mov dword [esp + 0x1c], 0xf
mov dword [esp + 0x18], 0
mov byte [esp + 8], 0
jb 0x40a220
push dword [esp + 0x20]
call fcn.004befe9
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004befee
mov esp, ebp
pop ebp
ret
Function at 0x40b8f9
Capabilities:
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55aab0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x5a0440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
cmp byte [esi], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jne 0x40b943
xor ecx, ecx
jmp 0x40b952
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b949
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00409a49
cmp dword [ebp - 0x18], 0
sete bl
cmp dword [ebp - 0x14], 0x10
jb 0x40b974
push dword [ebp - 0x28]
call fcn.004befe9
add esp, 4
test bl, bl
je 0x40b97f
xor eax, eax
jmp 0x40ba2a
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov dword [ebp - 4], 0
cmp byte [esi], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jne 0x40b9b3
xor ecx, ecx
jmp 0x40b9c2
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b9b9
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00409a49
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.00415299
mov byte [ebp - 4], 0
cmp dword [ebp - 0x14], 0x10
jb 0x40b9f0
push dword [ebp - 0x28]
call fcn.004befe9
add esp, 4
lea ecx, [ebp - 0x40]
call fcn.00414559
test eax, eax
jne 0x40ba04
lea ecx, [ebp - 0x40]
call fcn.004147b9
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x2c], 0x10
jb 0x40ba28
push dword [ebp - 0x40]
call fcn.004befe9
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004befee
mov esp, ebp
pop ebp
ret

Function at 0x40ba49
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55aae8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x5a0440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x40bae2
cmp byte [esi], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jne 0x40ba9d
xor ecx, ecx
jmp 0x40bab2
mov ecx, esi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40baa9
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00409a49
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.004147b9
cmp dword [ebp - 0x14], 0x10
mov esi, eax
jb 0x40bade
push dword [ebp - 0x28]
call fcn.004befe9
add esp, 4
mov eax, esi
jmp 0x40baeb
mov edx, esi
mov ecx, edi
call fcn.0040b8f9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004befee
mov esp, ebp
pop ebp
ret
Function at 0x40e489
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push esi
push edi
mov edi, ecx
movsx eax, dl
mov esi, dword [edi]
xor eax, esi
and eax, 0xff
shr esi, 8
mov eax, dword [eax*4 + 0x587ff0]
xor eax, esi
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul ecx, eax, 0x8088405
mov eax, dword [edi + 8]
inc ecx
mov dword [edi + 4], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x587ff0]
mov dword [edi + 8], eax
pop edi
pop esi
ret

Function at 0x40e4d9
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ebx
push esi
mov bl, dl
mov edx, ecx
push edi
mov edi, dword [edx + 8]
mov esi, edi
mov ecx, dword [edx]
and esi, 0xfffd
or esi, 2
mov eax, esi
xor eax, 1
imul eax, esi
shr eax, 8
xor bl, al
movsx eax, bl
xor eax, ecx
shr ecx, 8
and eax, 0xff
mov eax, dword [eax*4 + 0x587ff0]
xor eax, ecx
mov dword [edx], eax
movzx eax, al
add eax, dword [edx + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
and eax, 0xff
xor edi, dword [eax*4 + 0x587ff0]
mov al, bl
mov dword [edx + 8], edi
pop edi
pop esi
pop ebx
ret

Function at 0x40ecc9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov dword [ebp - 8], ebx
mov edi, 1
cmp byte [esi], 0
je 0x40ed04
push 0
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 1]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40ecff
mov byte [esi + 8], 1
mov edi, dword [ebp - 8]
jmp 0x40ed31
mov ebx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea eax, [ebx + 1]
cmp eax, ecx
jbe 0x40ed15
mov edi, ecx
sub edi, ebx
mov eax, dword [esi + 0x14]
add eax, ebx
push edi
push eax
lea eax, [ebp - 1]
push eax
call fcn.004c1b29
lea eax, [ebx + edi]
add esp, 0xc
mov ebx, dword [ebp - 8]
mov dword [esi + 0x1c], eax
cmp edi, 1
jne 0x40ed45
movzx eax, byte [ebp - 1]
mov dword [ebx], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0
je 0x40ed3c
cmp byte [esi + 8], 0
je 0x40ed3c
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40fd69
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
push edi
cmp dword [esi], 0
jne 0x40fe04
cmp dword [esi + 4], 0xffffffff
jne 0x40fe04
lea edi, [esi + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40fd9b
sub ecx, edx
mov al, byte [ecx + esi + 0x13f]
cmp al, 0x5c
je 0x40fdc6
cmp al, 0x2f
je 0x40fdc6
push 0x587d74
push 0x104
push edi
call fcn.004c04b7
add esp, 0xc
lea eax, [ebp - 4]
push eax
push ecx
mov ecx, dword [ebp + 8]
call fcn.0040eba9
add esp, 8
test eax, eax
jne 0x40fde5
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov ecx, eax
call fcn.0040efc9
xor ecx, ecx
mov dword [esi], eax
test eax, eax
mov edx, 0x200
cmove ecx, edx
mov eax, ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
pop edi
mov eax, 0x1000000
pop esi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x410549
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x5a0440]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov ebx, edx
test edi, edi
je 0x41057b
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41057b
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [ebx]
test al, al
je 0x41063c
push esi
mov esi, ebx
mov ecx, ebx
cmp al, 0x2f
je 0x410592
cmp al, 0x5c
jne 0x410594
mov esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x41058a
cmp esi, ebx
je 0x4105d4
sub esi, ebx
lea eax, [ebp - 0x20c]
push esi
push ebx
push eax
call fcn.004c1b29
add esp, 0xc
cmp esi, 0x104
jae 0x41064c
lea edx, [ebp - 0x20c]
mov byte [ebp + esi - 0x20c], 0
mov ecx, edi
call fcn.00410549
mov byte [ebp - 0x108], 0
pop esi
test edi, edi
je 0x410606
mov ecx, edi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4105e9
sub ecx, edx
push edi
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.004c036b
add esp, 0xc
push ebx
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.004c04b7
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41063c
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004befee
mov esp, ebp
pop ebp
ret
call fcn.004c0185
int3
Function at 0x413129
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55aceb
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x5a0440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
push 0x104
lea eax, [ebp - 0x118]
mov dword [ebp - 0x134], 0
push 0
push eax
call fcn.004c2179
add esp, 0xc
lea eax, [ebp - 0x118]
push 1
push esi
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
js 0x413225
cmp byte [ebp - 0x118], 0
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
jne 0x4131bc
xor ecx, ecx
jmp 0x4131d2
lea ecx, [ebp - 0x118]
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4131c9
sub ecx, edx
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x130]
call fcn.00409a49
push 1
push 0x587d74
lea ecx, [ebp - 0x130]
mov dword [ebp - 4], 0
call fcn.0040b459
lea eax, [ebp - 0x130]
mov ecx, edi
push eax
call fcn.0040a859
cmp dword [ebp - 0x11c], 0x10
jb 0x413244
push dword [ebp - 0x130]
call fcn.004befe9
add esp, 4
jmp 0x413244
push 0
mov dword [edi + 0x14], 0xf
mov ecx, edi
mov dword [edi + 0x10], 0
push 0x587d5f
mov byte [edi], 0
call fcn.00409a49
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004befee
mov esp, ebp
pop ebp
ret