joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401bee
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x22c
mov eax, dword [0x42c040]
xor eax, esp
mov dword [esp + 0x224], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x23c]
mov ebx, edx
xor ebp, ebp
mov dword [esp + 0x28], ecx
push edi
mov dword [esp + 0x24], ebx
mov ecx, ebp
xor edx, edx
mov byte [esp + ecx + 0x30], cl
push 0x17
mov eax, ecx
pop edi
div edi
mov al, byte [edx + esi]
mov byte [esp + ecx + 0x130], al
inc ecx
cmp ecx, 0x100
jl 0x401c1b
mov edi, ebp
mov esi, ebp
mov dl, byte [esp + esi + 0x30]
movzx eax, byte [esp + esi + 0x130]
add edi, eax
movzx ecx, dl
add edi, ecx
and edi, 0x800000ff
jns 0x401c62
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [esp + edi + 0x30]
mov byte [esp + esi + 0x30], al
inc esi
mov byte [esp + edi + 0x30], dl
cmp esi, 0x100
jl 0x401c3f
mov edi, ebp
mov dword [esp + 0x10], ebp
mov eax, ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], eax
mov esi, 0x3e8
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], edi
cmp eax, edi
je 0x401ca3
mov dword [eax], ebx
add eax, 4
mov dword [esp + 0x1c], eax
jmp 0x401cba
lea ecx, [esp + 0x24]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004046e8
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
sub esi, 1
jne 0x401c94
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x14], edi
cmp dword [ebx], ebp
jle 0x401d3d
mov edi, ebp
inc edi
and edi, 0x800000ff
jns 0x401cde
dec edi
or edi, 0xffffff00
inc edi
mov cl, byte [esp + edi + 0x30]
mov edx, dword [esp + 0x10]
movzx esi, cl
add edx, esi
and edx, 0x800000ff
jns 0x401cfb
dec edx
or edx, 0xffffff00
inc edx
mov al, byte [esp + edx + 0x30]
mov byte [esp + edi + 0x30], al
mov eax, ebp
xor eax, 4
mov dword [esp + 0x10], edx
push 0
push eax
mov byte [esp + edx + 0x38], cl
call fcn.004024d0
push eax
call fcn.0040384a
movzx eax, byte [esp + edi + 0x34]
add eax, esi
pop ecx
mov ecx, dword [esp + 0x2c]
movzx eax, al
mov al, byte [esp + eax + 0x30]
xor byte [ecx + ebp], al
inc ebp
cmp ebp, dword [ebx]
jl 0x401ccd
mov edi, dword [esp + 0x14]
sub edi, ebx
and edi, 0xfffffffc
push edi
push ebx
call fcn.004041f3
pop ecx
pop ecx
mov ecx, dword [esp + 0x234]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004069e6
add esp, 0x22c
ret
Function at 0x401f34
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x24
mov eax, dword [0x42c040]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
push esi
mov esi, dword [0x486f48]
xor ebp, ebp
push edi
mov eax, dword [esi + 0x3c]
mov ebx, dword [eax + esi + 0x78]
add ebx, esi
mov edi, dword [ebx + 0x20]
mov eax, dword [ebx + 0x18]
add edi, esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x401f98
mov eax, dword [edi]
lea ecx, [esp + 0x14]
add eax, esi
push eax
call fcn.00402617
lea ecx, [esp + 0x14]
call fcn.00401d64
cmp eax, 0x8aafdc01
je 0x401fb0
lea ecx, [esp + 0x14]
add edi, 4
call fcn.00402edc
inc ebp
cmp ebp, dword [esp + 0x10]
jb 0x401f67
xor edi, edi
mov ecx, dword [esp + 0x2c]
lea eax, [esi + edi]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004069e6
add esp, 0x24
ret
mov edx, str.QwruxAA
call fcn.0040387c
push eax
call fcn.0040384a
mov eax, dword [ebx + 0x24]
pop ecx
lea eax, [eax + ebp*2]
movzx ecx, word [eax + esi]
mov eax, dword [ebx + 0x1c]
lea eax, [eax + ecx*4]
mov edi, dword [eax + esi]
lea ecx, [esp + 0x14]
call fcn.00402edc
jmp 0x401f9a
Function at 0x41833a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00407930
mov eax, dword [0x42c040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00414735
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x41837c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4184d8
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00421750
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x486b40]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00418760
mov ecx, dword [esi*4 + 0x486b40]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x4184d1
cmp eax, dword [edi + ecx + 0x24]
jne 0x4184d1
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4184d1
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00418760
add esp, 0x14
test edx, edx
jl 0x4184d1
jg 0x418447
test eax, eax
jb 0x4184d1
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4184d1
jl 0x418461
cmp dword [ebp - 0x1008], eax
ja 0x4184d1
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41847f
test ebx, ebx
je 0x4184b8
cmp ecx, edi
jae 0x4184b8
mov al, byte [ecx]
cmp al, 0xd
jne 0x418499
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4184a5
cmp byte [ecx + 1], 0xa
jne 0x4184a5
inc ecx
jmp 0x4184a5
movzx eax, al
movsx eax, byte [eax + 0x42c9b0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41847f
cmp edx, ebx
jne 0x41847f
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4184d6
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004069e6
leave
ret
Function at 0x4198c3
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x42c040]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x41990e
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00419a62
test al, al
jne 0x419908
sub edx, 2
cmp edx, edi
jne 0x4198ee
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x419930
lea eax, [edi + 2]
cmp edx, eax
je 0x419930
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0041980f
add esp, 0x10
jmp 0x419a2a
push esi
lea ecx, [ebp - 0x255]
call fcn.00419a62
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x419973
push dword [ebp - 0x25c]
jmp 0x419920
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x4199b0
cmp word [ebp - 0x226], 0
je 0x4199d1
cmp word [ebp - 0x226], ax
jne 0x4199b0
cmp word [ebp - 0x224], 0
je 0x4199d1
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0041980f
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x419a1d
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x41998a
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x419a05
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x419a2a
push 0x41963f
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.0041f630
add esp, 0x10
jmp 0x4199fa
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004069e6
leave
ret
Function at 0x41eace
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x486b40]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41eb0e
cmp byte [ebx], 0xa
jne 0x41eb0e
or byte [eax + edi + 0x28], 4
jmp 0x41eb13
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x41ec11
mov al, byte [edx]
cmp al, 0x1a
je 0x41ebf3
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x41eb42
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x41eb67
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x41eb71
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x41eb24
jmp 0x41ec11
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41ebee
cmp dword [ebp - 0xc], 0
je 0x41ebee
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x486b40]
test byte [eax + edi + 0x28], 0x48
je 0x41ebc8
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41ebb3
mov byte [esi], dl
jmp 0x41ebc4
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x486b40]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41ec11
cmp byte [ebp - 1], 0xa
jne 0x41ebd7
cmp esi, ebx
jne 0x41ebd7
mov byte [esi], 0xa
jmp 0x41ec10
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041877e
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41ec11
mov byte [esi], 0xd
jmp 0x41ec10
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x486b40]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41ec0d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41ec11
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41ec1a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x486b40]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41ec5d
cmp word [esi], dx
jne 0x41ec5d
or byte [edi + eax + 0x28], 4
jmp 0x41ec62
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x41edb5
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x41ed95
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x41eca4
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41ecda
cmp eax, edx
jae 0x41ece6
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x41ec7c
jmp 0x41edb5
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41ed91
cmp dword [ebp - 0x14], 0
je 0x41ed91
mov eax, dword [ebx*4 + 0x486b40]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x41ed69
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x41ed32
mov word [esi], cx
jmp 0x41ed65
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x486b40]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x486b40]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x486b40]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x41edb5
pop ebx
cmp word [ebp - 4], bx
jne 0x41ed7a
cmp esi, dword [ebp + 0xc]
jne 0x41ed7a
mov word [esi], bx
jmp 0x41edb2
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041877e
add esp, 0x10
cmp word [ebp - 4], bx
je 0x41edb5
push 0xd
jmp 0x41edae
mov ecx, dword [ebx*4 + 0x486b40]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41edac
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41edb5
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x404390
Capabilities:
Check os version
Get common file path

Disassembly:
sub esp, 0x2d4
mov eax, dword [0x46a164]
xor eax, esp
mov dword [esp + 0x2d0], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp ax, 6
je 0x4043da
push str.SetDefaultDllDirectories
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4043da
push 0xc00
call eax
test eax, eax
jne 0x404466
push 0x106
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x404466
cmp eax, 0x104
ja 0x404466
cmp word [esp + eax*2 - 2], 0x5c
je 0x404407
mov ecx, 0x5c
mov word [esp + eax*2], cx
inc eax
cmp byte [str.userenv], 0
push esi
mov esi, str.userenv
je 0x404465
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push ebp
push edi
lea edi, [esp + 0x10]
lea edi, [edi + eax*2]
mov al, byte [esi]
mov ecx, edi
inc esi
test al, al
je 0x404440
nop
movzx eax, al
mov word [ecx], ax
add ecx, 2
mov al, byte [esi]
inc esi
test al, al
jne 0x404430
xor eax, eax
mov dword [ecx], 0x64002e
push 8
push eax
mov word [ecx + 8], ax
lea eax, [esp + 0x18]
push eax
mov dword [ecx + 4], 0x6c006c
call ebx
cmp byte [esi], 0
jne 0x404426
pop edi
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x2d0]
xor ecx, esp
call fcn.0044c020
add esp, 0x2d4
ret
Function at 0x409850
Capabilities:
Hash data using sha256

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [0x46a0ec]
mov dword [ecx], eax
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 0x20], 0x6a09e667
mov dword [ecx + 0x24], 0xbb67ae85
mov dword [ecx + 0x28], 0x3c6ef372
mov dword [ecx + 0x2c], 0xa54ff53a
mov dword [ecx + 0x30], 0x510e527f
mov dword [ecx + 0x34], 0x9b05688c
mov dword [ecx + 0x38], 0x1f83d9ab
mov dword [ecx + 0x3c], 0x5be0cd19
ret 4

Function at 0x409950
Capabilities:
Hash data using sha256

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
mov edx, dword [esi + 8]
and edx, 0x3f
mov byte [edx + esi + 0x40], 0x80
inc edx
cmp edx, 0x38
jbe 0x409998
cmp edx, 0x40
je 0x40998a
mov ecx, 0x40
lea edi, [esi + 0x40]
sub ecx, edx
add edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi]
lea edx, [esi + 0x40]
push 1
lea ecx, [esi + 0x20]
call eax
xor edx, edx
mov eax, 0x38
sub eax, edx
push eax
lea eax, [esi + 0x40]
add eax, edx
push 0
push eax
call fcn.0044da50
mov ecx, dword [esi + 8]
lea edx, [esi + 0x40]
mov eax, dword [esi + 0xc]
add esp, 0xc
shld eax, ecx, 3
shl ecx, 3
bswap eax
bswap ecx
mov dword [esi + 0x78], eax
mov eax, dword [esi]
mov dword [esi + 0x7c], ecx
lea ecx, [esi + 0x20]
push 1
call eax
mov edi, dword [esp + 0x18]
lea edx, [esi + 0x20]
mov ebx, 4
nop
mov ecx, dword [edx + 4]
lea edi, [edi + 8]
mov eax, dword [edx]
lea edx, [edx + 8]
bswap eax
mov dword [edi - 8], eax
bswap ecx
mov dword [edi - 4], ecx
sub ebx, 1
jne 0x4099e0
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
pop edi
mov dword [esi + 0x20], 0x6a09e667
mov dword [esi + 0x24], 0xbb67ae85
mov dword [esi + 0x28], 0x3c6ef372
mov dword [esi + 0x2c], 0xa54ff53a
mov dword [esi + 0x30], 0x510e527f
mov dword [esi + 0x34], 0x9b05688c
mov dword [esi + 0x38], 0x1f83d9ab
mov dword [esi + 0x3c], 0x5be0cd19
pop esi
pop ebp
pop ebx
ret 8

Function at 0x40a150
Capabilities:
Create thread

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0
push dword [esp + 0x18]
push dword [esp + 0x18]
push 0
push 0
call fcn.004516f1
mov ecx, dword [esp + 0x20]
add esp, 0x18
mov dword [ecx], eax
test eax, eax
je 0x40a17b
xor eax, eax
pop ecx
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 1
cmovne ecx, eax
mov eax, ecx
pop ecx
ret 0xc
Function at 0x4106a0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45b138
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x46a164]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
call fcn.0040cf20
lea esi, [edi + 0xc]
mov dword [ebp - 4], 0
lea ecx, [esi + 4]
mov dword [ebp - 0x14], esi
mov dword [esi], 0
call fcn.0040cf20
mov dword [esi + 0x10], 0
mov eax, edi
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x412400
Capabilities:
Set file attributes

Disassembly:
sub esp, 0xc
cmp byte [0x46cf90], 0
jne 0x412442
push esi
push dword [esp + 0x14]
lea eax, [esp + 8]
push eax
call fcn.0040dfa0
push dword [esp + 0x18]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [esp + 4]
mov esi, eax
call fcn.0044c236
add esp, 4
test esi, esi
pop esi
je 0x41245c
mov al, 1
add esp, 0xc
ret 8
push dword [esp + 0x14]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x41245c
mov al, 1
add esp, 0xc
ret 8
xor al, al
add esp, 0xc
ret 8

Function at 0x412490
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45b41e
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push esi
mov eax, dword [0x46a164]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp byte [0x46cf90], 0
push dword [ebp + 0xc]
jne 0x412517
lea eax, [ebp - 0x24]
push eax
call fcn.0040dfa0
mov esi, eax
push dword [ebp + 8]
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
call fcn.0040dfa0
push dword [esi]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push dword [ebp - 0x18]
mov esi, eax
call fcn.0044c236
push dword [ebp - 0x24]
call fcn.0044c236
add esp, 8
test esi, esi
je 0x412538
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x412538
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x4125a0
Capabilities:
Delete directory

Disassembly:
sub esp, 0xc
cmp byte [0x46cf90], 0
jne 0x4125de
push esi
push dword [esp + 0x14]
lea eax, [esp + 8]
push eax
call fcn.0040dfa0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push dword [esp + 4]
mov esi, eax
call fcn.0044c236
add esp, 4
test esi, esi
pop esi
je 0x4125f4
mov al, 1
add esp, 0xc
ret 4
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x4125f4
mov al, 1
add esp, 0xc
ret 4
xor al, al
add esp, 0xc
ret 4
Function at 0x412600
Capabilities:
Create directory

Disassembly:
sub esp, 0xc
cmp byte [0x46cf90], 0
jne 0x412640
push esi
push dword [esp + 0x14]
lea eax, [esp + 8]
push eax
call fcn.0040dfa0
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push dword [esp + 4]
mov esi, eax
call fcn.0044c236
add esp, 4
test esi, esi
pop esi
je 0x412658
mov al, 1
add esp, 0xc
ret 4
push 0
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x412658
mov al, 1
add esp, 0xc
ret 4
xor al, al
add esp, 0xc
ret 4
Function at 0x412660
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45b449
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x46a164]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
push esi
call fcn.00413970
cmp eax, 0xffffffff
je 0x4126b0
test al, 0x10
je 0x4126b0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call fcn.004156b0
test al, al
je 0x4126d0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call fcn.00415990
push esi
lea ecx, [ebp - 0x18]
mov ebx, eax
call fcn.0040d0c0
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.0040d670
test eax, eax
js 0x412716
mov edx, dword [ebp - 0x14]
lea ecx, [edx - 1]
cmp eax, ecx
jne 0x412716
cmp edx, 1
jne 0x41270a
mov bl, dl
jmp 0x412827
mov eax, dword [ebp - 0x18]
xor edx, edx
mov dword [ebp - 0x14], ecx
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x24]
call fcn.0040d120
push dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00413540
test al, al
jne 0x4127a8
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [eax + eax]
call edi
cmp eax, 0xb7
je 0x412848
lea ecx, [ebp - 0x18]
call fcn.0040d670
mov esi, eax
test esi, esi
js 0x412848
je 0x412848
mov ecx, dword [ebp - 0x18]
cmp esi, 1
jne 0x412782
movzx eax, word [ecx]
cmp eax, 0x5c
je 0x412848
cmp eax, 0x2f
je 0x412848
lea eax, [esi + 1]
cmp ebx, eax
jae 0x412848
cmp esi, dword [ebp - 0x14]
jae 0x41279e
xor eax, eax
mov dword [ebp - 0x14], esi
mov word [ecx + esi*2], ax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00413540
test al, al
je 0x412740
cmp esi, dword [ebp - 0x20]
jge 0x41281a
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0x24]
lea eax, [eax + esi*2]
add eax, 2
push eax
call fcn.004152a0
test eax, eax
jns 0x4127cb
mov esi, dword [ebp - 0x20]
jmp 0x4127ce
inc esi
add esi, eax
push esi
push dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
call fcn.0040d2b0
cmp byte [0x46cf90], 0
jne 0x41280a
push dword [ebp - 0x18]
lea eax, [ebp - 0x30]
push eax
call fcn.0040dfa0
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push dword [ebp - 0x30]
mov edi, eax
call fcn.0044c236
add esp, 4
test edi, edi
jmp 0x412813
push 0
push dword [ebp - 0x18]
call ebx
test eax, eax
je 0x412848
cmp esi, dword [ebp - 0x20]
jl 0x4127b3
mov bl, 1
push dword [ebp - 0x24]
call fcn.0044c236
add esp, 4
push dword [ebp - 0x18]
call fcn.0044c236
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor bl, bl
jmp 0x41281c
Function at 0x412850
Capabilities:
Delete file

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
push esi
call fcn.00413970
cmp eax, 0xffffffff
je 0x41287b
mov ecx, eax
and cl, 0x11
cmp cl, 1
jne 0x41287b
and eax, 0xfffffffe
push eax
push esi
call fcn.00412400
test al, al
je 0x4128c5
cmp byte [0x46cf90], 0
push esi
jne 0x4128b2
lea eax, [esp + 8]
push eax
call fcn.0040dfa0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [esp + 4]
mov esi, eax
call fcn.0044c236
add esp, 4
test esi, esi
je 0x4128c5
mov al, 1
pop esi
add esp, 0xc
ret 4
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4128c5
mov al, 1
pop esi
add esp, 0xc
ret 4
xor al, al
pop esi
add esp, 0xc
ret 4

Function at 0x412c00
Capabilities:
Set current directory

Disassembly:
sub esp, 0xc
cmp byte [0x46cf90], 0
jne 0x412c3d
push esi
push dword [esp + 0x14]
lea eax, [esp + 8]
push eax
call fcn.0040dfa0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [esp + 4]
mov esi, eax
call fcn.0044c236
add esp, 4
test esi, esi
setne al
pop esi
add esp, 0xc
ret 4
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
neg eax
sbb eax, eax
neg eax
add esp, 0xc
ret 4