joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1015cfe1
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x58
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
call fcn.1015dae3
xor ecx, ecx
mov edx, eax
mov esi, dword [eax + 0x3c]
mov edi, edx
add edi, esi
mov esi, dword [eax + esi]
cmp esi, 0x4550
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], edi
je 0x1015d01d
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x78]
mov dword [0x101845b8], 0x370c
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
add ecx, dword [edx + eax + 0x20]
mov esi, dword [edx + eax + 0x24]
mov dword [0x101845b4], 0x1fed
mov edi, dword [edx + eax + 0x18]
cmp edi, 0
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], ebx
je 0x1015d091
jmp 0x1015d122
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x3c]
xor edx, edx
mov esi, dword [ebp - 0x28]
mov edi, dword [esi + eax*4]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], edx
jmp 0x1015d0f0
mov al, byte [ebp - 0x4d]
test al, 1
jne 0x1015d13d
jmp 0x1015d0c6
mov eax, dword [ebp - 0x34]
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x54]
add eax, 1
mov cl, byte [ebp - 0x55]
cmp cl, 0
setne dl
mov ch, byte [ebp - 0x4d]
and ch, dl
cmp eax, 0x20
setb dl
and ch, dl
test ch, 1
mov dword [ebp - 0x4c], eax
jne 0x1015d0f0
jmp 0x1015d084
xor eax, eax
mov ecx, dword [ebp - 0x40]
add ecx, 1
mov edx, dword [ebp - 0x44]
add edx, 2
mov esi, dword [ebp - 0x30]
cmp ecx, esi
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x34], eax
jb 0x1015d068
jmp 0x1015d091
mov eax, dword [ebp - 0x4c]
mov ecx, eax
mov edx, dword [ebp - 0x48]
add ecx, edx
mov esi, dword [ebp - 0x1c]
mov bl, byte [esi + ecx]
mov ecx, dword [ebp - 0x10]
mov bh, byte [ecx + eax]
cmp bl, bh
sete cl
cmp bl, 0
mov dword [ebp - 0x54], eax
mov byte [ebp - 0x55], bh
mov byte [ebp - 0x4d], cl
je 0x1015d084
jmp 0x1015d09c
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
add eax, ecx
mov dword [ebp - 0x5c], eax
xor eax, eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], eax
jmp 0x1015d068
mov eax, dword [ebp - 0x44]
movzx ecx, word [eax]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x24]
add edx, dword [edx + esi + 0x1c]
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x64], edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x60]
add eax, dword [ecx + edx*4]
mov dword [0x101845b4], 0x1415
mov dword [ebp - 0x34], eax
jmp 0x1015d091
Function at 0x1015d171
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
xor esi, esi
mov edi, dword [0x101845b8]
add edi, 0x53c
mov dword [0x101845b8], edi
mov dword [0x101845c0], 0
mov byte [0x101845c4], 0
mov dword [0x101845bc], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], esi
jmp 0x1015d26c
mov eax, dword [ebp - 0x20]
mov ecx, 0x100
mov dword [0x101845c8], 0
mov edx, dword [0x101845c0]
mov esi, dword [ebp - 0x18]
movzx edi, byte [esi + eax]
add edi, edx
mov dword [ebp - 0x24], eax
xor edx, edx
mov ebx, dword [ebp - 0x10]
div ebx
mov esi, dword [ebp - 0x14]
movzx edx, byte [esi + edx]
add edi, edx
mov dword [0x101845c8], edi
mov eax, edi
cdq
idiv ecx
mov dword [0x101845c0], edx
mov dword [0x101845b4], 0x918
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x24]
mov cl, byte [ecx + edi]
mov byte [0x101845c4], cl
mov ecx, dword [ebp - 0x18]
mov cl, byte [ecx + edx]
mov edx, dword [ebp - 0x18]
mov byte [edx + edi], cl
mov dword [0x101845b4], 0x16c8
mov cl, byte [0x101845c4]
mov edx, dword [0x101845c0]
mov esi, dword [ebp - 0x18]
mov byte [esi + edx], cl
mov edx, dword [0x101845bc]
add edx, 1
mov dword [0x101845bc], edx
cmp edx, 0x100
mov dword [ebp - 0x20], edx
jl 0x1015d1c3
jmp 0x1015d2ad
mov eax, dword [ebp - 0x1c]
mov dword [0x101845b8], 0x1e35
mov ecx, eax
mov dl, cl
mov ecx, dword [ebp - 0x18]
mov byte [ecx + eax], dl
mov eax, dword [0x101845b8]
add eax, 0x325
mov dword [0x101845b8], eax
mov eax, dword [0x101845bc]
add eax, 1
mov dword [0x101845bc], eax
cmp eax, 0x100
mov dword [ebp - 0x1c], eax
jl 0x1015d26c
jmp 0x1015d2bf
mov dword [0x101845b4], 0x26c
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
mov dword [0x101845b4], 0x182
mov dword [0x101845bc], 0
mov dword [ebp - 0x20], eax
jmp 0x1015d1c3
Function at 0x1015d2dd
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 4], 0
mov eax, dword fs:[0x30]
mov dword [ebp - 4], eax
xor ecx, ecx
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x10]
mov edx, dword [edx + 0x3c]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], ecx
jmp 0x1015d370
mov eax, dword [ebp - 0x14]
add eax, 1
cmp eax, 0x104
mov ecx, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], eax
jl 0x1015d370
jmp 0x1015d386
mov dword [0x101845b4], 0x982
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x1015d3f9
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
cmp word [eax + ecx*2 - 0x16], 0x61
je 0x1015d3ac
jmp 0x1015d322
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
cmp word [eax + ecx*2 - 0xe], 0x6c
sete dl
mov byte [ebp - 0x21], dl
mov eax, 1
mov cl, byte [ebp - 0x21]
test cl, 1
mov dword [ebp - 0x1c], eax
jne 0x1015d3f9
jmp 0x1015d322
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
cmp word [ecx + eax*2], 0
mov edx, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edx
jne 0x1015d309
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
cmp word [ecx + eax*2 - 0x1a], 0x6c
mov dword [ebp - 0x20], eax
jne 0x1015d322
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
cmp word [eax + ecx*2 - 0x18], 0x6f
je 0x1015d336
jmp 0x1015d322
mov eax, dword [0x101845b4]
add eax, 0xfffff36e
mov dword [0x101845b4], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
cmp word [eax + ecx*2 - 0x14], 0x64
jne 0x1015d322
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
cmp word [eax + ecx*2 - 0x12], 0x64
jne 0x1015d322
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
cmp word [eax + ecx*2 - 0x10], 0x6c
je 0x1015d347
jmp 0x1015d322
mov eax, dword [ebp - 0x1c]
add esp, 0x24
pop ebp
ret
Function at 0x1015d764
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [0x101845bc], 0
mov dword [0x101845c0], 0
mov dword [0x101845cc], 0
mov dword [0x101845b4], 0x53e
cmp eax, 0
mov ebx, edi
mov dword [ebp - 0x10], eax
mov eax, edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], edi
je 0x1015d8b3
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov esi, 0x100
mov dword [0x101845b8], 0xb88
add ecx, 1
mov dword [ebp - 0x2c], eax
mov eax, ecx
mov dword [ebp - 0x30], edx
cdq
idiv esi
mov dword [0x101845bc], edx
mov ecx, dword [ebp - 0x20]
movzx edi, byte [ecx + edx]
mov ebx, dword [ebp - 0x30]
add edi, ebx
mov eax, edi
mov dword [ebp - 0x34], edx
cdq
idiv esi
mov dword [0x101845c0], edx
mov esi, dword [ebp - 0x34]
mov cl, byte [ecx + esi]
mov byte [0x101845c4], cl
mov edi, dword [ebp - 0x20]
mov cl, byte [edi + edx]
mov byte [edi + esi], cl
mov edx, dword [0x101845b4]
add edx, 0x20cc
mov dword [0x101845b4], edx
mov cl, byte [0x101845c4]
mov edx, dword [0x101845c0]
mov byte [edi + edx], cl
mov edx, dword [0x101845bc]
movzx edx, byte [edi + edx]
mov ebx, dword [0x101845c0]
movzx ebx, byte [edi + ebx]
add ebx, edx
and ebx, 0xff
mov dword [0x101845cc], ebx
mov dword [0x101845b4], 0x395
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x2c]
mov cl, byte [edx + ecx]
xor cl, byte [edi + ebx]
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x2c]
mov byte [ebx + edx], cl
add edx, 1
mov ecx, dword [ebp - 0x10]
cmp edx, ecx
mov dword [ebp - 0x38], edx
je 0x1015d8b3
mov eax, dword [0x101845bc]
mov ecx, dword [0x101845c0]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], edx
jmp 0x1015d7c7
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x1015d9b8
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x54
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
xor edx, edx
mov esi, dword [0x101845b8]
mov edi, esi
add edi, 0xffffdf43
mov dword [0x101845b4], edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], edx
jmp 0x1015da26
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x34]
add ecx, 0xffffe336
mov dword [0x101845b8], ecx
mov dword [ebp - 0x3c], eax
call fcn.1015d401
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
call fcn.1015dce8
cmp eax, 0
mov dword [ebp - 0x40], eax
jne 0x1015da4e
xor eax, eax
add esp, 0x54
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x38]
mov cl, byte [eax + 0x1015f634]
mov dl, byte [eax + 0x1015f605]
sub dl, cl
mov byte [ebp + eax - 0x28], dl
add eax, 1
cmp eax, 0xe
mov dword [ebp - 0x38], eax
je 0x1015d9ea
jmp 0x1015da26
mov eax, dword [ebp - 0x40]
mov ecx, esp
mov dword [ecx + 0xc], 0x40
mov dword [ecx + 8], 0x1000
mov dword [ecx + 4], 0x6000
mov dword [ecx], 0
call eax
sub esp, 0x10
mov dword [esp], eax
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 4], ecx
mov dword [ebp - 0x44], eax
call fcn.1015d8bb
xor eax, eax
mov ecx, dword [ebp - 0x44]
mov word [ecx], 0x5a4d
mov dword [ecx + 0x3c], 0xc0
mov dword [ecx + 0xc0], 0x4550
add ecx, 0xffc00000
mov dword [0x101845b4], 0x21cb
mov edx, dword [ebp - 0x30]
mov dword [edx + 0x48], ecx
mov ecx, dword [ebp - 0x44]
mov dword [edx + 0x14], ecx
add ecx, 0x19d2
mov esi, dword [ebp - 0x44]
cmp esi, 0
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x4c], eax
je 0x1015dad9
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
add esp, 0x54
pop esi
pop edi
pop ebp
ret
Function at 0x403711
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x466078]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x14]
xor ebx, ebx
mov word [ebp - 8], 0x500
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
call fcn.0040389f
cmp dword [ebp - 0x14], ebx
je 0x40374d
mov dword [esi], 1
jmp 0x403781
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [esi], eax
test eax, eax
je 0x403781
push esi
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x403781
mov dword [esi], ebx
cmp dword [ebp - 0x10], 0
pop esi
pop ebx
je 0x403791
push dword [ebp - 0x10]
call fcn.004027ab
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.00437d83
mov esp, ebp
pop ebp
ret 4

Function at 0x4037a3
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x466078]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x120]
push edi
mov edi, dword [ebp + 0xc]
mov ebx, 0x11c
push ebx
push 0
push eax
call fcn.00438fc0
mov eax, dword [0x467444]
add esp, 0xc
test eax, eax
jne 0x403883
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
movzx ecx, word [ebp - 0xc]
movzx eax, word [ebp - 0xa]
shl ecx, 0x10
push 4
or ecx, eax
pop edx
mov dword [0x467448], ecx
cmp dword [ebp - 0x11c], edx
jne 0x403819
xor eax, eax
inc eax
jmp 0x40387e
cmp dword [ebp - 0x11c], 5
jne 0x403844
mov ecx, dword [ebp - 0x118]
test ecx, ecx
jne 0x403830
push 2
jmp 0x40387d
cmp ecx, 1
jne 0x403839
push 3
jmp 0x40387d
push 9
cmp ecx, 2
pop eax
cmove eax, edx
jmp 0x40387e
cmp dword [ebp - 0x11c], 6
jne 0x40387b
cmp dword [ebp - 0x118], 0
jne 0x403864
xor eax, eax
cmp byte [ebp - 6], 1
setne al
add eax, 5
jmp 0x40387e
cmp dword [ebp - 0x118], 1
jne 0x40387b
xor eax, eax
cmp byte [ebp - 6], 1
setne al
add eax, 7
jmp 0x40387e
push 9
pop eax
mov dword [0x467444], eax
mov ecx, dword [ebp - 4]
mov dword [esi], eax
xor ecx, ebp
mov eax, dword [0x467448]
mov dword [edi], eax
pop edi
pop esi
pop ebx
call fcn.00437d83
mov esp, ebp
pop ebp
ret 8
Function at 0x403aa2
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x466078]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x20c]
push esi
push edi
mov edi, dword [ebp + 0x10]
push 0x208
push 0
push eax
call fcn.00438fc0
add esp, 0xc
lea eax, [ebp - 0x20c]
mov esi, 0x104
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x403b40
push 0x5c
pop ecx
cmp cx, word [ebp + eax*2 - 0x20e]
je 0x403b17
push 1
push 0x448848
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.00403920
mov esi, eax
test esi, esi
js 0x403b77
mov esi, 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0040396f
mov esi, eax
test esi, esi
js 0x403b77
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebx], eax
test eax, eax
jne 0x403b5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x403b77
mov esi, 0x80004005
jmp 0x403b77
test edi, edi
je 0x403b77
push 0x104
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.004022f7
mov esi, eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00437d83
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4042ec
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 0xc]
mov edi, dword [ebp + 8]
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4043b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x404325
cmp eax, 3
je 0x40432c
push esi
push edi
call fcn.004043ba
test eax, eax
je 0x40432c
xor esi, esi
jmp 0x4043b2
movzx eax, word [edi]
mov ecx, edi
push ebx
xor ebx, ebx
test ax, ax
je 0x40439f
push 0x5c
pop edx
cmp ax, dx
cmove ebx, ecx
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x40433c
test ebx, ebx
je 0x40439f
push dword [ebp + 0xc]
xor eax, eax
push edi
mov word [ebx], ax
call fcn.004042ec
mov esi, eax
push 0x5c
pop eax
mov word [ebx], ax
test esi, esi
js 0x4043b1
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40439b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40438b
xor esi, esi
inc esi
jmp 0x4043b1
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x4043b1
xor esi, esi
jmp 0x4043b1
mov esi, 0x80070003
push esi
push 0x72
push str.dirutil.cpp
call fcn.00403a8b
pop ebx
pop edi
mov eax, esi
pop esi
pop ebp
ret 8

Function at 0x4043ba
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4043de
test al, 0x10
je 0x4043de
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x4043db
mov dword [ecx], eax
xor esi, esi
inc esi
mov eax, esi
pop esi
pop ebp
ret 8
Function at 0x4050e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.004393b0
mov eax, dword [0x466078]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push ebx
mov ebx, dword [ebp + 0x18]
push esi
movlpd qword [ebp - 0x100c], xmm0
xor esi, esi
mov ecx, dword [ebp - 0x1008]
mov dword [ebp - 0x1014], eax
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp - 0x100c]
mov dword [ebp - 0x1018], eax
mov dword [ebp - 0x1010], ecx
cmp dword [ebp + 0x10], 0
jne 0x405141
cmp dword [ebp + 0x14], 0
jne 0x405141
mov eax, 0x1000
jmp 0x40516c
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
sub eax, edi
sbb edx, ecx
test edx, edx
jb 0x405166
ja 0x405158
cmp eax, 0x1000
jbe 0x405166
and dword [ebp - 0x1008], 0
mov eax, 0x1000
jmp 0x40516c
mov dword [ebp - 0x1008], edx
push 0
lea ecx, [ebp - 0x1008]
mov dword [ebp - 0x1008], eax
push ecx
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 0x1014]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4051ec
mov eax, dword [ebp - 0x1008]
test eax, eax
je 0x4051bc
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 0x1018]
call fcn.00406020
mov esi, eax
test esi, esi
js 0x40521a
mov eax, dword [ebp - 0x1008]
mov ecx, dword [ebp - 0x1010]
add edi, eax
adc ecx, 0
mov dword [ebp - 0x1010], ecx
cmp ecx, dword [ebp + 0x14]
ja 0x4051e1
jb 0x4051d9
cmp edi, dword [ebp + 0x10]
jae 0x4051e1
test eax, eax
jne 0x40512e
test ebx, ebx
je 0x40521a
mov dword [ebx], edi
mov dword [ebx + 4], ecx
jmp 0x40521a
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
push esi
push 0x407
push str.fileutil.cpp
call fcn.00403a8b
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00437d83
mov esp, ebp
pop ebp
ret 0x14
Function at 0x40522f
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
test edi, edi
sete al
push eax
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x405306
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x405275
cmp eax, 0x50
je 0x40526d
cmp eax, 0xb7
jne 0x405275
xor esi, esi
inc esi
jmp 0x405306
cmp eax, 3
jne 0x4052f8
movzx eax, word [ebx]
mov edi, esi
mov ecx, ebx
test ax, ax
je 0x4052f1
push 0x5c
pop edx
cmp ax, dx
cmove edi, ecx
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x405289
test edi, edi
je 0x4052f1
push esi
xor eax, eax
push ebx
mov word [edi], ax
call fcn.004042ec
mov esi, eax
push 0x5c
pop eax
mov word [edi], ax
test esi, esi
js 0x405306
push dword [ebp + 0x10]
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x405306
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x405306
push esi
push 0x44c
push str.fileutil.cpp
call fcn.00403a8b
jmp 0x405306
mov esi, 0x80070003
jmp 0x405306
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x405360
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 4]
push esi
push eax
push dword [ebp + 8]
xor esi, esi
call fcn.00405645
test eax, eax
je 0x4053e7
test byte [ebp - 4], 7
push ebx
mov ebx, 0x80070000
je 0x4053b5
push 0x80
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x4053b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, ebx
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x4053b5
push esi
push 0x5bc
jmp 0x4053dc
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4053e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, ebx
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x4053e6
push esi
push 0x5c2
push str.fileutil.cpp
call fcn.00403a8b
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x4053f0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor esi, esi
xor eax, eax
mov ebx, esi
inc eax
cmp dword [ebp + 0x10], ebx
cmovne ebx, eax
cmp dword [ebp + 0x14], esi
je 0x40540a
or ebx, 2
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4054f9
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp dword [ebp + 0x10], esi
jne 0x405442
cmp edi, 0x50
je 0x40543a
cmp edi, 0xb7
jne 0x405442
xor esi, esi
inc esi
jmp 0x4054f8
cmp edi, 2
jne 0x40545b
push esi
push dword [ebp + 8]
call fcn.00405645
test eax, eax
je 0x4054ea
push 3
pop edi
cmp edi, 3
jne 0x4054ea
mov eax, dword [ebp + 0xc]
mov edi, esi
mov edx, eax
movzx ecx, word [eax]
test cx, cx
je 0x4054e3
mov dword [ebp + 0x10], 0x5c
cmp cx, word [ebp + 0x10]
cmove edi, edx
add edx, 2
movzx ecx, word [edx]
test cx, cx
jne 0x40547a
test edi, edi
je 0x4054e3
push esi
xor ecx, ecx
push eax
mov word [edi], cx
call fcn.004042ec
mov esi, eax
mov eax, dword [ebp + 0x10]
mov word [edi], ax
test esi, esi
js 0x4054f8
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4054f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x4054f8
push esi
push 0x4cc
push str.fileutil.cpp
call fcn.00403a8b
jmp 0x4054f8
mov esi, 0x80070003
jmp 0x4054f8
movzx esi, di
or esi, 0x80070000
test edi, edi
cmovle esi, edi
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x405c62
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
lea eax, [ebp - 4]
xor edi, edi
push eax
push dword [ebp + 8]
mov esi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov ebx, eax
test ebx, ebx
jne 0x405cb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x405cb7
push esi
push 0x115
push str.fileutil.cpp
call fcn.00403a8b
jmp 0x405d5e
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
jne 0x405cd2
mov esi, 0x8007000e
push esi
push 0x119
jmp 0x405ca8
push edi
push ebx
push dword [ebp - 4]
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
jne 0x405d03
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x405d03
push esi
push 0x11d
jmp 0x405d38
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0x448848
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
jne 0x405d44
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x405d44
push esi
push 0x122
push str.fileutil.cpp
call fcn.00403a8b
jmp 0x405d57
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [edx + 8]
mov dword [eax], ecx
mov ecx, dword [ebp + 0x10]
mov edx, dword [edx + 0xc]
mov dword [ecx], edx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x406020
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
and dword [ebp - 4], esi
push edi
xor edi, edi
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x10]
sub eax, edi
push eax
lea eax, [edi + ebx]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406066
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x406070
add edi, dword [ebp - 4]
cmp edi, dword [ebp + 0x10]
jb 0x406031
jmp 0x406080
push esi
push 0x3e7
push str.fileutil.cpp
call fcn.00403a8b
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc