joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Check if file exists
Create process on windows
Print debug messages

Disassembly:
sub esp, 0xb0
mov eax, dword [0x41d2b0]
xor eax, esp
mov dword [esp + 0xac], eax
push ebx
push esi
push edi
lea ecx, [esp + 0x9c]
call fcn.00402180
mov ebx, str.UB.exe
lea ecx, [esp + 0x9c]
lea esi, [esp + 0x64]
call fcn.004016b0
mov eax, dword [esp + 0x68]
mov edi, 8
cmp dword [esp + 0x7c], edi
jae 0x40104b
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40109a
cmp dword [esp + 0x7c], edi
jb 0x401069
mov eax, dword [esp + 0x68]
push eax
call fcn.00406e6d
add esp, 4
mov dword [esp + 0x78], 0
xor ecx, ecx
mov dword [esp + 0x7c], 7
mov word [esp + 0x68], cx
cmp dword [esp + 0xb4], edi
jb 0x40124f
mov edx, dword [esp + 0xa0]
push edx
jmp 0x401247
push 0x40
xor ebx, ebx
lea eax, [esp + 0x28]
push ebx
push eax
mov dword [esp + 0x2c], 0x44
call fcn.004090b0
mov ecx, 5
add esp, 0xc
mov word [esp + 0x50], cx
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x4c], 1
cmp dword [esp + 0xb4], edi
jae 0x4010dd
lea ecx, [esp + 0xa0]
mov eax, dword [esp + 0x68]
cmp dword [esp + 0x7c], edi
jae 0x4010eb
lea eax, [esp + 0x68]
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0x24]
push edx
push ecx
push ebx
push 0x20
push ebx
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40112f
push str.CreateProcess
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [esp + 0x7c], edi
jb 0x401126
mov eax, dword [esp + 0x68]
push eax
call fcn.00406e6d
add esp, 4
mov dword [esp + 0x78], ebx
jmp 0x401071
mov eax, dword [esp + 0x10]
push 0x4e20
push eax
call dword [sym.imp.USER32.dll_WaitForInputIdle]
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x10]
xor eax, eax
push edx
mov dword [esp + 0xa0], 7
mov dword [esp + 0x9c], ebx
mov word [esp + 0x8c], ax
call fcn.00401270
add esp, 8
test al, al
jne 0x4011a2
push 0x12
push 0x41a364
lea ecx, [esp + 0x88]
mov esi, 0xa0
call fcn.004015c0
jmp 0x4011a6
mov esi, dword [esp + 0xc]
imul esi, esi, 0x3e8
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], edi
jae 0x4011ca
lea eax, [esp + 0x84]
push 5
push ebx
push ebx
push eax
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp dword [esp + 0x98], edi
jb 0x4011f4
mov eax, dword [esp + 0x84]
push eax
call fcn.00406e6d
add esp, 4
xor ecx, ecx
mov dword [esp + 0x98], 7
mov dword [esp + 0x94], ebx
mov word [esp + 0x84], cx
cmp dword [esp + 0x7c], edi
jb 0x401223
mov edx, dword [esp + 0x68]
push edx
call fcn.00406e6d
add esp, 4
xor eax, eax
mov dword [esp + 0x7c], 7
mov dword [esp + 0x78], ebx
mov word [esp + 0x68], ax
cmp dword [esp + 0xb4], edi
jb 0x40124f
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.00406e6d
add esp, 4
mov ecx, dword [esp + 0xb8]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00406e5e
add esp, 0xb0
ret 0x10
Function at 0x4016b0
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x4178d8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push edi
mov eax, dword [0x41d2b0]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
xor edi, edi
push 0xffffffffffffffff
push edi
xor eax, eax
push ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x14], edi
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], edi
mov word [esp + 0x1c], ax
call fcn.00401d70
mov eax, ebx
mov dword [esp + 0x30], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401703
sub eax, edx
sar eax, 1
push eax
push ebx
lea ecx, [esp + 0x14]
call fcn.00401790
push 0xffffffffffffffff
push edi
xor edx, edx
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], edi
push eax
mov ecx, esi
mov word [esi + 4], dx
call fcn.00401d70
cmp dword [esp + 0x24], 8
jb 0x40174c
mov eax, dword [esp + 0x10]
push eax
call fcn.00406e6d
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
add esp, 0x2c
ret

Function at 0x402180
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x417a1d
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x41d2b0]
xor eax, esp
mov dword [esp + 0x22c], eax
push ebx
push esi
mov eax, dword [0x41d2b0]
xor eax, esp
push eax
lea eax, [esp + 0x23c]
mov dword fs:[0], eax
xor esi, esi
mov ebx, ecx
push 0x206
mov dword [esp + 0x248], esi
lea ecx, [esp + 0x36]
xor eax, eax
push esi
mov dword [esp + 0x14], esi
push ecx
mov dword [esp + 0x1c], ebx
mov word [esp + 0x3c], ax
call fcn.004090b0
add esp, 0xc
push 0x104
lea edx, [esp + 0x34]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebx + 0x18], 7
mov dword [ebx + 0x14], esi
mov word [ebx + 4], ax
lea eax, [esp + 0x30]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x402210
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x34]
push ecx
mov ecx, ebx
call fcn.004015c0
mov dword [esp + 0x244], esi
push 1
mov dword [esp + 0x10], 1
call fcn.004024f0
inc eax
push eax
push esi
lea edx, [esp + 0x1c]
push edx
mov ecx, ebx
call fcn.004023a0
push 0xffffffffffffffff
push esi
push eax
mov ecx, ebx
mov dword [esp + 0x250], 1
call fcn.00401d70
cmp dword [esp + 0x2c], 8
jb 0x40227b
mov eax, dword [esp + 0x18]
push eax
call fcn.00406e6d
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x23c]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x22c]
xor ecx, esp
call fcn.00406e5e
add esp, 0x23c
ret

Function at 0x4022b0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x210
mov eax, dword [0x41d2b0]
xor eax, esp
mov dword [esp + 0x20c], eax
lea eax, [esp + 4]
push eax
push 0x104
mov dword [esp + 8], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor ecx, ecx
lea eax, [esp + 4]
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], 0
mov word [esi + 4], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4022f7
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 8]
push edx
mov ecx, esi
call fcn.004015c0
mov ecx, dword [esp + 0x20c]
xor ecx, esp
mov eax, esi
call fcn.00406e5e
add esp, 0x210
ret
Function at 0x402ba0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4179bb
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x41d2b0]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41d2b0]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
mov eax, dword [esp + 0x148]
mov ebx, dword [esp + 0x14c]
mov esi, ecx
mov edi, edx
push 0x41a428
push eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], ebx
call fcn.00407390
mov ebp, eax
xor eax, eax
add esp, 8
cmp ebp, eax
jne 0x402c4e
cmp edi, eax
je 0x402c47
lea esi, [esp + 0x28]
call fcn.004031a0
push 0xffffffffffffffff
push 0
push eax
mov ecx, edi
mov dword [esp + 0x14c], 0
call fcn.00401d70
cmp dword [esp + 0x40], 8
jb 0x402c47
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00406e6d
add esp, 4
xor al, al
jmp 0x402d85
cmp ebx, eax
je 0x402c5a
mov edx, dword [ebx]
mov dword [esp + 0x18], edx
jmp 0x402c5e
mov dword [esp + 0x18], eax
xor ecx, ecx
push 0xffffffffffffffff
mov word [esp + 0x48], cx
push eax
mov ecx, esi
mov dword [esp + 0x4e], eax
mov dword [esp + 0x52], eax
mov dword [esp + 0x56], eax
mov dword [esp + 0x5a], eax
mov dword [esp + 0x5e], eax
mov dword [esp + 0x62], eax
mov dword [esp + 0x66], eax
mov dword [esp + 0x6a], eax
mov dword [esp + 0x6e], eax
mov word [esp + 0x72], ax
call fcn.004019c0
push 2
push 0
push ebp
call fcn.00407d0c
push ebp
call fcn.00407f2e
push 0
push 0
push ebp
mov esi, eax
call fcn.00407d0c
add esp, 0x1c
xor ebx, ebx
test esi, esi
je 0x402d2b
push esi
call fcn.004050ac
push ebp
push 1
mov edi, eax
push esi
push edi
call fcn.0040769a
push esi
mov edx, edi
xor ecx, ecx
call fcn.00403010
mov ebx, eax
xor ecx, ecx
lea eax, [ebx + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004050ac
push esi
mov edx, edi
mov ecx, eax
mov dword [esp + 0x34], eax
call fcn.00403010
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x40]
add esp, 0x20
push ebx
push eax
call fcn.004015c0
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00406ef5
push edi
call fcn.00406ef5
mov edi, dword [esp + 0x24]
add esp, 8
push ebx
push esi
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x78]
push str._s_d_bytes_to__d_wide_chars
push eax
call fcn.00407232
add esp, 0x14
test edi, edi
je 0x402d6c
lea eax, [esp + 0x6c]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402d50
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x70]
push ecx
mov ecx, edi
call fcn.004015c0
push ebp
call fcn.0040772e
mov eax, dword [esp + 0x28]
add esp, 4
test eax, eax
je 0x402d83
mov edx, dword [esp + 0x18]
mov dword [eax], edx
mov al, 1
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.00406e5e
add esp, 0x130
ret
Function at 0x4031a0
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x417991
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push edi
mov eax, dword [0x41d2b0]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov dword [esp + 0xc], 0
lea ebx, [esi + 4]
xor eax, eax
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], 0
mov dword [esp + 0x10], esi
mov word [ebx], ax
mov dword [esp + 0x38], eax
mov dword [esp + 0xc], 1
call fcn.00408611
mov ecx, dword [eax]
push ecx
call fcn.0040855c
mov ecx, eax
add esp, 4
lea edi, [ecx + 2]
jmp 0x403210
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x403210
sub ecx, edi
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.004015c0
xor edi, edi
cmp edi, dword [esi + 0x14]
jge 0x4032bb
jbe 0x40323a
call fcn.004087b7
cmp dword [esi + 0x18], 8
jb 0x403244
mov eax, dword [ebx]
jmp 0x403246
mov eax, ebx
cmp word [eax + edi*2], 0xd
je 0x403284
cmp edi, dword [esi + 0x14]
jbe 0x403257
call fcn.004087b7
cmp dword [esi + 0x18], 8
jb 0x403261
mov eax, dword [ebx]
jmp 0x403263
mov eax, ebx
cmp word [eax + edi*2], 0xa
je 0x403284
inc edi
cmp edi, dword [esi + 0x14]
jl 0x403233
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
add esp, 0x30
ret
push edi
push 0
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call fcn.004023a0
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
mov dword [esp + 0x44], 1
call fcn.00401d70
cmp dword [esp + 0x2c], 8
jb 0x4032bb
mov eax, dword [esp + 0x18]
push eax
call fcn.00406e6d
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
add esp, 0x30
ret
Function at 0x406e5e
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41d2b0]
jne 0x406e68
repz ret
jmp fcn.00409308

Function at 0x413aac
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.0040dc01
and dword [ebp - 4], 0
cmp dword [0x41f058], 0
mov ebx, eax
jne 0x413b5d
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x413c0e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x413c0e
push eax
call fcn.0040db8f
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x41f058], eax
call esi
push eax
call fcn.0040db8f
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x41f05c], eax
call esi
push eax
call fcn.0040db8f
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x41f060], eax
call esi
push eax
call fcn.0040db8f
pop ecx
mov dword [0x41f068], eax
test eax, eax
je 0x413b5d
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040db8f
pop ecx
mov dword [0x41f064], eax
mov eax, dword [0x41f064]
cmp eax, ebx
je 0x413bb5
cmp dword [0x41f068], ebx
je 0x413bb5
push eax
call fcn.0040dc0a
push dword [0x41f068]
mov esi, eax
call fcn.0040dc0a
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x413bb5
test edi, edi
je 0x413bb5
call esi
test eax, eax
je 0x413bac
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x413bac
test byte [ebp - 0xc], 1
jne 0x413bb5
or dword [ebp + 0x10], 0x200000
jmp 0x413bee
mov eax, dword [0x41f05c]
cmp eax, ebx
je 0x413bee
push eax
call fcn.0040dc0a
pop ecx
test eax, eax
je 0x413bee
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x413bee
mov eax, dword [0x41f060]
cmp eax, ebx
je 0x413bee
push eax
call fcn.0040dc0a
pop ecx
test eax, eax
je 0x413bee
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x41f058]
call fcn.0040dc0a
pop ecx
test eax, eax
je 0x413c0e
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x413c10
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4055ad
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
test esi, esi
jbe 0x4055da
test cl, 7
je 0x4055da
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4305a0]
dec esi
inc ecx
jmp 0x4055bb
cmp esi, 8
jb 0x40567d
mov edx, esi
shr edx, 3
mov dword [ebp + 8], edx
push ebx
mov edx, dword [ecx + 4]
xor eax, dword [ecx]
mov ebx, edx
shr ebx, 0x10
movzx edi, bl
mov edi, dword [edi*4 + 0x4309a0]
mov ebx, edx
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x4305a0]
mov ebx, edx
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x430da0]
mov ebx, eax
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x4315a0]
mov ebx, eax
shr ebx, 0x10
movzx ebx, bl
xor edi, dword [ebx*4 + 0x4319a0]
mov ebx, eax
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x431da0]
movzx edx, dl
xor edi, dword [edx*4 + 0x4311a0]
movzx eax, al
xor edi, dword [eax*4 + 0x4321a0]
sub esi, 8
add ecx, 8
dec dword [ebp + 8]
mov eax, edi
jne 0x4055ec
pop ebx
jmp 0x40567d
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4305a0]
dec esi
inc ecx
test esi, esi
ja 0x405669
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x40593e
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d0
push ebx
push esi
mov esi, dword [ebp + 0xc]
push 0x40
pop ebx
cmp esi, ebx
jbe 0x405988
lea eax, [ebp - 0x1d0]
push eax
call fcn.004102a4
push esi
push dword [ebp + 8]
lea eax, [ebp - 0x1d0]
push eax
call fcn.004105a6
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x1d0]
push eax
call fcn.0041061f
lea eax, [ebp - 0x80]
push 0x20
mov dword [ebp + 8], eax
pop esi
xor ecx, ecx
push edi
test esi, esi
jbe 0x4059a8
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x40]
sub edi, eax
lea eax, [ebp + ecx - 0x40]
mov dl, byte [edi + eax]
xor dl, 0x36
inc ecx
mov byte [eax], dl
cmp ecx, esi
jb 0x405997
cmp esi, ebx
jae 0x4059c0
mov ecx, ebx
sub ecx, esi
push ecx
lea eax, [ebp + esi - 0x40]
push 0x36
push eax
call fcn.0041a3a0
add esp, 0xc
lea eax, [ebp - 0xf0]
push eax
call fcn.004102a4
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.004105a6
push dword [ebp + 0x14]
lea eax, [ebp - 0xf0]
push dword [ebp + 0x10]
push eax
call fcn.004105a6
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.0041061f
lea eax, [ebp - 0x160]
push eax
call fcn.004102a4
xor ecx, ecx
test esi, esi
jbe 0x405a2a
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x40]
sub edi, eax
lea eax, [ebp + ecx - 0x40]
mov dl, byte [edi + eax]
xor dl, 0x5c
inc ecx
mov byte [eax], dl
cmp ecx, esi
jb 0x405a19
pop edi
cmp esi, ebx
jae 0x405a43
mov ecx, ebx
sub ecx, esi
push ecx
lea eax, [ebp + esi - 0x40]
push 0x5c
push eax
call fcn.0041a3a0
add esp, 0xc
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.004105a6
push 0x20
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.004105a6
push dword [ebp + 0x18]
lea eax, [ebp - 0x160]
push eax
call fcn.0041061f
pop esi
pop ebx
leave
ret 0x14
Function at 0x40c1f2
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
push 0x20
push dword [ebp + 8]
mov edi, ecx
mov ebx, dword [edi + 4]
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 4], edi
sub ebx, 6
call fcn.0041be10
xor eax, eax
add esp, 0xc
xor edx, edx
cmp ebx, eax
mov dword [ebp + 8], eax
jle 0x40c262
cmp edx, dword [edi + 4]
jg 0x40c3b0
cmp eax, ebx
jge 0x40c253
lea ecx, [ebp + eax*4 - 0x38]
mov esi, dword [ebp + 8]
cmp esi, 4
jge 0x40c253
lea esi, [esi + edx*4]
lea edi, [edi + esi*4 + 0x18]
mov esi, ecx
inc eax
add ecx, 4
inc dword [ebp + 8]
cmp eax, ebx
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 4]
jl 0x40c233
cmp dword [ebp + 8], 4
jne 0x40c25e
inc edx
and dword [ebp + 8], 0
cmp eax, ebx
jl 0x40c222
cmp edx, dword [edi + 4]
jg 0x40c3b0
mov eax, ebx
shl eax, 2
lea ecx, [ebp + eax - 0x3b]
mov dword [ebp - 0xc], ecx
lea ecx, [ebp + eax - 0x3a]
mov dword [ebp - 0x10], ecx
lea ecx, [ebp + eax - 0x39]
lea eax, [ebp + eax - 0x3c]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 0x4375e0
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax]
mov al, byte [ebp - 0x38]
xor al, byte [ecx + 0x437700]
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 0x38], al
movzx ecx, byte [ecx]
mov cl, byte [ecx + 0x437700]
xor byte [ebp - 0x37], cl
mov ecx, dword [ebp - 0x14]
movzx ecx, byte [ecx]
mov cl, byte [ecx + 0x437700]
xor byte [ebp - 0x36], cl
mov ecx, dword [ebp - 0x18]
movzx ecx, byte [ecx]
mov cl, byte [ecx + 0x437700]
xor byte [ebp - 0x35], cl
mov ecx, dword [ebp - 8]
xor al, byte [ecx]
inc dword [ebp - 8]
mov byte [ebp - 0x38], al
cmp ebx, 8
je 0x40c304
cmp ebx, 1
jle 0x40c365
lea ecx, [ebp - 0x34]
lea edi, [ebx - 1]
xor esi, esi
mov al, byte [ecx + esi - 4]
xor byte [ecx + esi], al
inc esi
cmp esi, 4
jl 0x40c2ef
add ecx, 4
dec edi
jne 0x40c2ed
jmp 0x40c362
push 3
lea ecx, [ebp - 0x34]
pop edi
push 4
pop esi
mov al, byte [ecx - 4]
xor byte [ecx], al
inc ecx
dec esi
jne 0x40c30d
dec edi
jne 0x40c30a
movzx eax, byte [ebp - 0x2c]
mov al, byte [eax + 0x437700]
xor byte [ebp - 0x28], al
movzx eax, byte [ebp - 0x2b]
mov al, byte [eax + 0x437700]
xor byte [ebp - 0x27], al
movzx eax, byte [ebp - 0x2a]
mov al, byte [eax + 0x437700]
xor byte [ebp - 0x26], al
movzx eax, byte [ebp - 0x29]
mov al, byte [eax + 0x437700]
xor byte [ebp - 0x25], al
push 3
lea ecx, [ebp - 0x24]
pop edi
push 4
pop esi
mov al, byte [ecx - 4]
xor byte [ecx], al
inc ecx
dec esi
jne 0x40c356
dec edi
jne 0x40c353
mov edi, dword [ebp - 4]
xor ecx, ecx
test ebx, ebx
jle 0x40c3a7
cmp edx, dword [edi + 4]
jg 0x40c3b0
cmp ecx, ebx
jge 0x40c398
lea eax, [ebp + ecx*4 - 0x38]
mov esi, dword [ebp + 8]
cmp esi, 4
jge 0x40c398
lea esi, [esi + edx*4]
lea edi, [edi + esi*4 + 0x18]
mov esi, eax
inc ecx
add eax, 4
inc dword [ebp + 8]
cmp ecx, ebx
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 4]
jl 0x40c378
cmp dword [ebp + 8], 4
jne 0x40c3a3
inc edx
and dword [ebp + 8], 0
cmp ecx, ebx
jl 0x40c36b
cmp edx, dword [edi + 4]
jle 0x40c293
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x41cf44
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cf75
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cf5d
add dl, dl
jne 0x41cf80
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cfd1
xor eax, eax
add dl, dl
jne 0x41cf8d
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d06e
add dl, dl
jne 0x41cf9c
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cfa7
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cfb2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cfbd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cfc7
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cf6c
mov eax, 1
add dl, dl
jne 0x41cfdf
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cfea
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cfd6
sub eax, ebx
mov ebx, 1
jne 0x41d01d
mov ecx, 1
add dl, dl
jne 0x41d003
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41d00e
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cffa
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cf6c
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41d034
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41d03f
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41d02b
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cf6c
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41d08f
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cf6c
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41f0a0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, edx
xor edx, edx
push ebp
push 0x7aa58e
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
mov dword [ebp - 8], edx
mov esi, ebx
xor ecx, ecx
cmp byte [eax + 0x6a], 0
je 0x41f0ef
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x88]
test edx, edx
je 0x41f10e
mov ecx, edx
add ecx, ebx
jmp 0x41f10e
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41f10e
mov ecx, edx
add ecx, ebx
test ecx, ecx
je 0x41f180
mov esi, dword [ecx + 0x18]
mov eax, dword [ecx + 0x1c]
add eax, ebx
mov dword [ebp - 0x10], eax
mov edi, dword [ecx + 0x20]
add edi, ebx
mov eax, dword [ecx + 0x24]
add eax, ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
cmp eax, 0xffff
jbe 0x41f169
test esi, esi
jbe 0x41f180
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088ec
test eax, eax
jne 0x41f15b
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41f180
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41f138
jmp 0x41f180
mov edx, eax
sub edx, dword [ecx + 0x10]
cmp edx, dword [ecx + 0x14]
jae 0x41f180
mov eax, edx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x7aa595
ret