joyce8/EMBER2024-capa huggingface dataset:
Function at 0x409304
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x40935e
inc esi
xor edi, edi
cmp edi, 1
jne 0x40932a
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x409338
cmp edi, 1
jle 0x409338
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00408de8
test eax, eax
jne 0x40935e
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x40935e
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x40935e
inc edi
dec esi
jne 0x40931a
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8

Function at 0x4095f0
Capabilities:
Identify system language via api

Disassembly:
push ebx
push esi
push edi
push ebp
cmp dword [0x40cca4], 0
je 0x409639
mov edi, dword [0x40cddc]
dec edi
test edi, edi
jl 0x409639
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cdd8]
mov edx, dword [edx + eax]
mov eax, dword [0x40cca4]
call fcn.00404b64
test eax, eax
jne 0x409635
mov eax, esi
call fcn.004095a4
jmp 0x4096fe
inc esi
dec edi
jne 0x40960b
mov al, byte [0x40cdc4]
sub al, 1
jb 0x409646
je 0x40964f
jmp 0x409658
call fcn.00406f1c
mov ebp, eax
jmp 0x40965a
call sub.kernel32.dll_GetUserDefaultLangID
mov ebp, eax
jmp 0x40965a
xor ebp, ebp
test bp, bp
je 0x4096f7
mov edi, dword [0x40cddc]
dec edi
test edi, edi
jl 0x4096a6
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cdd8]
lea ebx, [edx + eax]
movzx eax, bp
cmp eax, dword [ebx + 0x28]
jne 0x4096a2
cmp dword [ebx + 0x2c], 0
je 0x409699
call sub.kernel32.dll_GetACP
cmp eax, dword [ebx + 0x2c]
jne 0x4096a2
mov eax, esi
call fcn.004095a4
jmp 0x4096fe
inc esi
dec edi
jne 0x409671
mov edi, dword [0x40cddc]
dec edi
test edi, edi
jl 0x4096f7
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cdd8]
lea ebx, [edx + eax]
mov eax, dword [ebx + 0x28]
and eax, 0x3ff
mov edx, ebp
and dx, 0x3ff
movzx edx, dx
cmp eax, edx
jne 0x4096f3
cmp dword [ebx + 0x2c], 0
je 0x4096ea
call sub.kernel32.dll_GetACP
cmp eax, dword [ebx + 0x2c]
jne 0x4096f3
mov eax, esi
call fcn.004095a4
jmp 0x4096fe
inc esi
dec edi
jne 0x4096b4
xor eax, eax
call fcn.004095a4
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x409790
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x409863
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x40987c
push ebx
push 0x409888
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.00403388
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.00402750
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.004033e8
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409810
mov al, 0x62
call fcn.00409368
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.00409764
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409819
call fcn.00409764
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40986a
lea eax, [ebp - 4]
call fcn.0040316c
ret

Function at 0x40991c
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4099d0
jmp 0x4099c5
cmp dword [esi + 0x10], 0x1000
jne 0x4099b1
test byte [esi + 0x15], 1
jne 0x4099b1
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x409970
cmp eax, 2
je 0x409970
cmp eax, 0x10
je 0x409970
cmp eax, 0x20
jne 0x409985
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x409985
mov bl, 1
xor ebp, ebp
jmp 0x409996
mov eax, dword [esi]
add eax, ebp
call fcn.00409914
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x409989
test bl, bl
je 0x4099b1
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4099d0
mov eax, dword [esi + 4]
cmp eax, edi
je 0x409948
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x40f854
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__read
mov ebx, eax
cmp eax, 0xffffffff
je 0x40f88c
mov eax, ebx
add esp, 0x1c
pop ebx
pop esi
pop edi
leave
ret
call sub.msvcrt.dll__errno
cmp dword [eax], 4
je 0x40f863
mov eax, ebx
add esp, 0x1c
pop ebx
pop esi
pop edi
leave
ret

Function at 0x414ad0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
test ecx, ecx
mov dword [ebp - 0xc], ebx
mov ebx, eax
mov dword [ebp - 8], esi
mov esi, edx
mov dword [ebp - 4], edi
mov edi, ecx
jne 0x414af6
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x38]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x414b8a
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x414b45
cmp eax, 0x40
je 0x414b45
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x414ae9
cmp eax, 0x40
je 0x414ae9
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
jmp 0x414ae9
mov dword [esp + 8], 0x34
mov dword [esp + 4], str..._.._runtime_pseudo_reloc.c
mov dword [esp], str.VirtualQuery__addr__b__sizeof_b__
call sub.msvcrt.dll__assert
lea esi, [esi]
lea edi, [edi]

Function at 0x4150b8
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [0x47b060]
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x4150f4
mov dword [ebx + 0x24], eax
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0041e380
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x28], eax
add esp, 0x14
pop ebx
leave
ret
call fcn.0041e2ec
jmp 0x4150e2
Function at 0x415218
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, eax
mov esi, edx
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x20], eax
mov edx, dword [ebx + 0x10]
mov dword [ebp - 0x1c], edx
mov eax, dword [esi]
jmp 0x415241
mov dword [eax + 0x20], edi
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [esi], eax
test eax, eax
je 0x415308
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x2c], eax
xor edi, edi
mov eax, 0xa
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebx
mov edx, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov dword [esp], 1
call dword [ebp - 0x20]
test eax, eax
jne 0x41532c
cmp edi, 5
je 0x415331
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x4152cb
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebx
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0xa
mov dword [esp], 1
call dword [ebp - 0x2c]
mov edi, eax
cmp eax, 7
je 0x415331
cmp eax, 8
jne 0x41532c
mov eax, dword [esi]
mov edi, dword [eax]
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
test edx, edx
js 0x41531c
test edx, edx
je 0x415238
mov dword [esp + 4], edi
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
test eax, eax
jne 0x41523b
call fcn.0041e2ec
jmp 0x41523b
mov dword [ebp - 0x2c], 0
mov edi, 5
mov al, 0x1a
jmp 0x415256
call fcn.004150fc
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
jmp 0x4152db
mov edi, 2
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x41550c
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [ebp + 8]
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
test edx, edx
js 0x4155f1
test edx, edx
jne 0x415590
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
test eax, eax
je 0x415583
lea esi, [ebp - 0x20]
jmp 0x415543
mov dword [ebp - 0x20], eax
mov eax, dword [eax + 0x18]
test eax, eax
je 0x41557a
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebx
mov edx, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 1
mov dword [esp], 1
call eax
cmp eax, 6
je 0x4155b8
cmp eax, 8
jne 0x4155e4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
test eax, eax
jne 0x415540
mov eax, 5
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov edi, dword [eax + 0x24]
call fcn.0041e2ec
mov esi, eax
mov dword [esp], edi
call sub.KERNEL32.dll_TlsGetValue
push edi
mov dword [esp], esi
mov dword [ebp - 0x2c], eax
call sub.KERNEL32.dll_SetLastError
push ecx
mov eax, dword [ebp - 0x2c]
jmp 0x41552f
mov dword [ebx + 0xc], 0
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov edx, esi
mov eax, ebx
call fcn.00415174
cmp eax, 7
jne 0x415588
lea eax, [ebp - 0x1c]
mov edx, esi
call fcn.0041533c
nop
mov eax, 3
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
call fcn.004150fc
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
jmp 0x415528
Function at 0x415604
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jne 0x415628
mov dword [esp], ebx
call fcn.0041550c
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
test edx, edx
js 0x41567c
test edx, edx
jne 0x415658
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
lea esi, [ebp - 0x20]
mov edx, esi
mov eax, ebx
call fcn.00415218
cmp eax, 7
je 0x41568c
call sub.msvcrt.dll_abort
nop
mov edi, dword [eax + 0x24]
call fcn.0041e2ec
mov esi, eax
mov dword [esp], edi
call sub.KERNEL32.dll_TlsGetValue
push edx
mov dword [esp], esi
mov dword [ebp - 0x2c], eax
call sub.KERNEL32.dll_SetLastError
push eax
mov eax, dword [ebp - 0x2c]
jmp 0x41563b
call fcn.004150fc
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
jmp 0x415634
lea eax, [ebp - 0x1c]
mov edx, esi
call fcn.0041533c
nop
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edi, dword [ebp + 8]
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
test edx, edx
js 0x415718
test edx, edx
jne 0x4156f4
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x1c], eax
lea esi, [ebp - 0x1c]
jmp 0x4156cd
cmp ebx, 5
je 0x4156ea
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
cmp eax, 1
sbb ebx, ebx
and ebx, 5
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
test eax, eax
je 0x4156c0
mov ebx, 3
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov esi, dword [eax + 0x24]
call fcn.0041e2ec
mov ebx, eax
mov dword [esp], esi
call sub.KERNEL32.dll_TlsGetValue
push esi
mov dword [esp], ebx
mov dword [ebp - 0x2c], eax
call sub.KERNEL32.dll_SetLastError
push ebx
mov eax, dword [ebp - 0x2c]
jmp 0x4156b7
call fcn.004150fc
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
jmp 0x4156b0

Function at 0x415728
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
test edx, edx
js 0x4157ac
test edx, edx
jne 0x415788
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov edi, dword [ebx + 0xc]
test edi, edi
jne 0x41576c
lea esi, [ebp - 0x20]
mov edx, esi
mov eax, ebx
call fcn.00415174
cmp eax, 7
je 0x41577d
call sub.msvcrt.dll_abort
nop
lea esi, [ebp - 0x20]
mov edx, esi
mov eax, ebx
call fcn.00415218
cmp eax, 7
jne 0x415765
lea eax, [ebp - 0x1c]
mov edx, esi
call fcn.0041533c
nop
mov edi, dword [eax + 0x24]
call fcn.0041e2ec
mov esi, eax
mov dword [esp], edi
call sub.KERNEL32.dll_TlsGetValue
push edx
mov dword [esp], esi
mov dword [ebp - 0x2c], eax
call sub.KERNEL32.dll_SetLastError
push eax
mov eax, dword [ebp - 0x2c]
jmp 0x415747
call fcn.004150fc
mov eax, dword [0x47b060]
mov edx, dword [eax + 0x28]
jmp 0x415740
Function at 0x401040
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 8]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
call fcn.00505f88
add esp, 0x10
pop ebp
ret 0xc

Function at 0x401660
Capabilities:
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x5afd40]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x24], 0x10
lea eax, [esi + 0x10]
jb 0x40167e
mov eax, dword [eax]
push eax
mov eax, dword [esi + 4]
push 0x2712
push eax
call fcn.0051f9e0
add esp, 0xc
push 0x4a
push str.Mozilla_5.0__Windows_NT_6.1__WOW64__rv:13.0__Gecko_20100101_Firefox_13.0.1
lea ecx, [ebp - 0x20]
mov dword [ebp - 0xc], 0xf
mov dword [ebp - 0x10], 0
mov byte [ebp - 0x20], 0
call fcn.00401530
cmp dword [ebp - 0xc], 0x10
mov eax, dword [ebp - 0x20]
jae 0x4016bd
lea eax, [ebp - 0x20]
mov ecx, dword [esi + 4]
push eax
push 0x2722
push ecx
call fcn.0051f9e0
mov edx, dword [esi + 4]
push 5
push 0x44
push edx
call fcn.0051f9e0
mov eax, dword [esi + 4]
push 1
push 0x34
push eax
call fcn.0051f9e0
mov ecx, dword [esi + 4]
push 1
push 0x63
push ecx
call fcn.0051f9e0
mov edx, dword [esi + 4]
push 0
push 0x2f
push edx
call fcn.0051f9e0
mov eax, dword [esi + 4]
push 0x4010e0
push 0x4e2b
push eax
call fcn.0051f9e0
mov ecx, dword [esi + 4]
add esp, 0x48
push esi
push 0x2711
push ecx
call fcn.0051f9e0
mov edx, dword [esi + 4]
push 0
push 0x40
push edx
call fcn.0051f9e0
mov eax, dword [esi + 4]
push 0
push 0x51
push eax
call fcn.0051f9e0
add esp, 0x24
cmp dword [ebp - 0xc], 0x10
pop esi
jb 0x401755
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004079bb
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00506513
mov esp, ebp
pop ebp
ret
Function at 0x402660
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x40266e
xor eax, eax
pop ebp
ret
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push esi
not eax
cmp edx, 8
jb 0x40274d
mov esi, edx
shr esi, 3
push edi
jmp 0x402690
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x567420]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x567420]
movzx edi, byte [ecx + 2]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x567420]
movzx edi, byte [ecx + 3]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x567420]
movzx edi, byte [ecx + 4]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x567420]
movzx edi, byte [ecx + 5]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x567420]
movzx edi, byte [ecx + 6]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x567420]
movzx edi, byte [ecx + 7]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x567420]
add ecx, 8
sub edx, 8
dec esi
jne 0x402690
pop edi
test edx, edx
je 0x40276a
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x567420]
inc ecx
dec edx
jne 0x402751
not eax
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
mov eax, dword [edx]
movsx ecx, byte [ebp + 0xc]
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x567420]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x567420]
mov dword [edx + 8], ecx
pop ebp
ret

Function at 0x402cd0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x14]
mov esi, ebx
imul esi, dword [ebp + 0x10]
cmp byte [edi], 0
je 0x402d10
mov ecx, dword [ebp + 8]
mov edx, dword [edi + 4]
push 0
lea eax, [ebp + 0xc]
push eax
push esi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402d04
mov byte [edi + 8], 1
mov eax, dword [ebp + 0xc]
pop edi
xor edx, edx
pop esi
div ebx
pop ebx
pop ebp
ret
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x18]
lea edx, [ecx + esi]
cmp edx, eax
jbe 0x402d21
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0x14]
add eax, ecx
mov ecx, dword [ebp + 8]
push esi
push eax
push ecx
call fcn.00505760
add dword [edi + 0x1c], esi
add esp, 0xc
pop edi
mov eax, esi
xor edx, edx
pop esi
div ebx
pop ebx
pop ebp
ret
Function at 0x403db0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x5afd40]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x403de4
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x403de4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [ebx]
test al, al
je 0x403e9e
push esi
mov esi, ebx
mov ecx, ebx
cmp al, 0x2f
je 0x403dfb
cmp al, 0x5c
jne 0x403dfd
mov esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x403df3
cmp esi, ebx
je 0x403e31
sub esi, ebx
push esi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.00505760
lea ecx, [ebp - 0x20c]
push ecx
push edi
mov byte [ebp + esi - 0x20c], 0
call fcn.00403db0
add esp, 0x14
mov byte [ebp - 0x108], 0
test edi, edi
je 0x403e50
lea edx, [ebp - 0x108]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403e46
mov eax, ebx
mov edx, ebx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403e54
lea edi, [ebp - 0x108]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403e64
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [ebp - 0x108]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
pop esi
cmp eax, 0xffffffff
jne 0x403e9e
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.00506513
mov esp, ebp
pop ebp
ret

Function at 0x4058e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
cmp dword [ebx], 0
jne 0x4059ab
cmp dword [ebx + 4], 0xffffffff
jne 0x4059ab
push edi
lea edi, [ebx + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405911
sub eax, edx
mov al, byte [eax + ebx + 0x13f]
cmp al, 0x5c
je 0x405941
cmp al, 0x2f
je 0x405941
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405930
mov ax, word [0x567944]
mov word [edi], ax
mov edi, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
cmp edi, 1
jne 0x40596b
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40596b
pop esi
pop edi
mov eax, 0x2000000
pop ebx
pop ebp
ret 0xc
mov edx, dword [ebp + 0xc]
lea ecx, [ebp + 0x10]
push ecx
push edi
push edx
push esi
call fcn.00402a90
add esp, 0x10
test eax, eax
jne 0x40598b
mov eax, dword [ebp + 0x10]
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
push eax
call fcn.00405340
add esp, 4
mov dword [ebx], eax
neg eax
sbb eax, eax
pop esi
and eax, 0xfffffe00
pop edi
add eax, 0x200
pop ebx
pop ebp
ret 0xc
mov eax, 0x1000000
pop ebx
pop ebp
ret 0xc
Function at 0x4061f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40620b
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x406242
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40623e
jmp 0x406230
cmp esi, eax
jae 0x406242
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x406230
cmp esi, eax
jb 0x406249
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x407060
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
push eax
push 0
mov esi, ecx
push 0
mov dword [esi], vtable.vmsSingleInstance.0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40709b
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0
mov eax, esi
pop esi
pop ebp
ret 4

Function at 0x407360
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0xc]
push esi
push edi
push 0x567be8
push eax
lea ecx, [ebp - 4]
push ecx
call fcn.005065f5
mov edx, dword [ebp - 4]
push 2
push 0
push edx
call fcn.0050792a
mov eax, dword [ebp - 4]
push eax
call fcn.0050783b
mov ecx, dword [ebp - 4]
push 0
push 0
push ecx
mov edi, eax
call fcn.0050792a
push edi
call fcn.004079b0
mov edx, dword [ebp - 4]
push edx
push edi
mov esi, eax
push 1
push esi
call fcn.0050768a
mov edi, eax
mov eax, dword [ebp - 4]
push eax
call fcn.0050606f
mov ecx, dword [ebp + 8]
add esp, 0x40
push ecx
push edi
push esi
call fcn.00407320
mov edx, dword [ebp + 0x10]
push 0x565f04
push edx
lea eax, [ebp - 8]
push eax
call fcn.005065f5
mov ecx, dword [ebp - 8]
push ecx
push edi
push 1
push esi
call fcn.00505f88
mov edx, dword [ebp - 8]
push edx
call fcn.0050606f
push esi
call fcn.004079bb
add esp, 0x30
pop edi
pop esi
mov esp, ebp
pop ebp
ret