joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41afba
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x4d4], ebx
je 0x41b022
cmp dword [ebp + 8], 0x100
jne 0x41b011
cmp word [ebp + 0xc], 0xd
jne 0x41b011
cmp byte [esi + 0x4da], bl
je 0x41aff8
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x41b011
cmp byte [esi + 0x4db], bl
jne 0x41b011
mov ecx, dword [esi + 0x40]
cmp ecx, ebx
je 0x41b00d
push ebx
push ebx
push ebx
push 0x451970
push esi
call fcn.00407d35
xor eax, eax
jmp 0x41b025
mov eax, dword [esi + 0x4d4]
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx]
pop esi
pop ebx
pop ebp
jmp dword [eax + 0xc]
xor eax, eax
inc eax
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x42536f
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x464ce4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp byte [esi + 0x18], bl
je 0x4253e0
cmp dword [esi + 0x10], ebx
je 0x4253e0
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea edi, [eax + 1]
lea eax, [edi + edi]
call fcn.0043c7a0
mov dword [ebp - 8], esp
cmp esp, ebx
je 0x4253e0
push edi
push dword [ebp - 8]
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [esi + 0x10]
push dword [ebp - 8]
add ecx, 0x1b8
call fcn.0040bac8
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx]
push ebx
push ebx
push ebx
push str.textchanged
push ecx
call dword [eax + 0x1c]
mov ecx, eax
call fcn.00407d35
xor eax, eax
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043836a
leave
ret 0x10
Function at 0x431906
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, eax
mov eax, dword [esi + 8]
push edi
mov edi, eax
and edi, 7
je 0x43192b
cmp eax, edi
jge 0x431923
mov eax, esi
call fcn.004312c4
mov ecx, edi
shr dword [esi + 0xc], cl
sub dword [esi + 8], edi
mov edi, dword [esi + 8]
xor ecx, ecx
test edi, edi
jle 0x431958
mov eax, dword [esi + 0xc]
push ebx
mov dl, byte [esi + 0xc]
sub edi, 8
mov byte [ebp + ecx - 4], dl
shr eax, 8
mov ebx, edi
inc ecx
mov dword [esi + 0xc], eax
test ebx, ebx
jg 0x431938
mov dword [esi + 8], ebx
pop ebx
cmp ecx, 4
jge 0x431977
mov edi, dword [esi + 4]
mov eax, dword [esi]
cmp eax, edi
jb 0x431965
xor eax, eax
jmp 0x43196d
mov dl, byte [eax]
inc eax
mov dword [esi], eax
movzx eax, dl
mov byte [ebp + ecx - 4], al
inc ecx
cmp ecx, 4
jl 0x43195b
movzx edi, byte [ebp - 3]
movzx eax, byte [ebp - 4]
movzx ecx, byte [ebp - 2]
shl edi, 8
add edi, eax
movzx eax, byte [ebp - 1]
shl eax, 8
add eax, ecx
mov ecx, edi
xor ecx, 0xffff
cmp eax, ecx
je 0x4319a9
mov eax, str.zlib_corrupt
call fcn.0042eb9a
jmp 0x4319e4
mov eax, dword [esi]
add eax, edi
cmp eax, dword [esi + 4]
jbe 0x4319b9
mov eax, str.read_past_buffer
jmp 0x4319a2
mov eax, dword [esi + 0x10]
add eax, edi
cmp eax, dword [esi + 0x18]
jbe 0x4319ce
mov ecx, edi
call fcn.004312fa
test eax, eax
je 0x4319e4
push edi
push dword [esi]
push dword [esi + 0x10]
call fcn.0043c390
add dword [esi], edi
add dword [esi + 0x10], edi
xor eax, eax
add esp, 0xc
inc eax
pop edi
pop esi
leave
ret
Function at 0x43836a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x464ce4]
jne 0x438374
repz ret
jmp fcn.0043d2d1

Function at 0x4467f9
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x464ce4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00440c14
and dword [ebp - 0x14], 0
cmp dword [0x46a66c], 0
mov dword [ebp - 0x18], eax
jne 0x4468ac
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x446954
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x459928
push ebx
call edi
test eax, eax
je 0x446954
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x46a66c], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x46a670], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x46a674], eax
call edi
push eax
call esi
mov dword [0x46a67c], eax
test eax, eax
je 0x4468ac
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x46a678], eax
mov eax, dword [0x46a678]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x446905
cmp dword [0x46a67c], ecx
je 0x446905
push eax
call esi
push dword [0x46a67c]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x446905
test ebx, ebx
je 0x446905
call edi
test eax, eax
je 0x4468fc
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x4468fc
test byte [ebp - 8], 1
jne 0x446905
or dword [ebp + 0x10], 0x200000
jmp 0x446938
mov eax, dword [0x46a670]
cmp eax, dword [ebp - 0x18]
je 0x446938
push eax
call esi
test eax, eax
je 0x446938
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x446938
mov eax, dword [0x46a674]
cmp eax, dword [ebp - 0x18]
je 0x446938
push eax
call esi
test eax, eax
je 0x446938
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x46a66c]
call esi
test eax, eax
je 0x446954
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x446956
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043836a
leave
ret
Function at 0x43e440
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x2c000]
push edi
jmp 0x43e45a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x43e461
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x43e450
mov eax, 1
add ebx, ebx
jne 0x43e473
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x43e468
jne 0x43e484
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x43e468
xor ecx, ecx
sub eax, 3
jb 0x43e498
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x43e50a
mov ebp, eax
add ebx, ebx
jne 0x43e4a3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x43e4b0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x43e4d4
inc ecx
add ebx, ebx
jne 0x43e4c0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x43e4b5
jne 0x43e4d1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x43e4b5
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x43e4f4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x43e4e5
jmp 0x43e456
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x43e4f4
add edi, ecx
jmp 0x43e456
pop esi
mov edi, esi
mov ecx, 0xa88
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x43e512
cmp byte [edi], 0x12
jne 0x43e512
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x43e517
lea edi, [esi + 0x3c000]
mov eax, dword [edi]
or eax, eax
je 0x43e58f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x53104]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x531e4]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x43e544
mov ecx, edi
jns 0x43e573
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x531ec]
or eax, eax
je 0x43e589
mov dword [ebx], eax
add ebx, 4
jmp 0x43e561
call dword [esi + 0x531e8]
mov ebp, dword [esi + 0x531f0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x17f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x43e5c3
sub esp, 0xffffff80
jmp 0x41c35f
Function at 0x401010
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push 0x20019
push ebx
mov edi, ecx
mov dword [ebp - 4], ebx
push str.SoftwareMicrosoftWindowsCurrentVersionThemesPersonalize
push 0x80000001
mov dword [edi + 0x10], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40107b
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 4
push eax
lea eax, [ebp - 8]
xor esi, esi
push eax
push ebx
push ebx
push str.AppsUseLightTheme
push dword [ebp - 4]
inc esi
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401072
cmp dword [ebp - 8], ebx
jne 0x401072
mov dword [edi + 0x10], esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [sym.imp.USER32.dll_DefWindowProcW]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
call esi
push 0x65
push ebx
mov dword [ebp - 0x24], eax
call esi
push eax
call dword [sym.imp.USER32.dll_LoadIconW]
cmp dword [edi + 0x10], ebx
mov ecx, 0x333333
mov dword [ebp - 0x20], eax
mov eax, 0xf7f7f7
cmovne eax, ecx
mov dword [ebp - 0x1c], ebx
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], str.AMORCE
call dword [sym.imp.USER32.dll_RegisterClassW]
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov dword [edi + 0xc], ebx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40233a
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
cmp dword [esp + 0x24], 0
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov dword [esp + 0x20], ebp
je 0x402358
mov eax, dword [ebp]
push dword [esp + 0x34]
call dword [eax + 8]
xorps xmm0, xmm0
xor esi, esi
cmp dword [esp + 0x30], 8
movlpd qword [esp + 0x18], xmm0
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x34], esi
jb 0x402402
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x1c]
push 8
pop ecx
sub ecx, edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x24], ecx
mov eax, dword [ebp + 0x1c]
mov ecx, dword [edx]
xor edi, dword [edx + 4]
xor ecx, ebx
xor ebx, ebx
mov dword [esp + 0x14], eax
mov edx, dword [eax + 4]
inc ebx
add edi, dword [eax]
add edx, ecx
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x18], eax
cmp eax, ebx
jl 0x4023db
mov ebp, dword [esp + 0x14]
mov esi, eax
xor edi, edx
mov ecx, edx
and ecx, 0x1f
rol edi, cl
add edi, dword [ebp + ebx*8]
xor edx, edi
mov ecx, edi
and ecx, 0x1f
rol edx, cl
add edx, dword [ebp + ebx*8 + 4]
inc ebx
cmp ebx, esi
jle 0x4023b4
mov esi, dword [esp + 0x34]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
xor ebx, ebx
or ebx, edx
add esi, 8
mov edx, dword [esp + 0x10]
mov dword [esp + 0x34], esi
mov dword [edx], ebx
mov dword [edx + 4], edi
add edx, 8
add eax, edx
mov dword [esp + 0x10], edx
cmp eax, dword [esp + 0x30]
jbe 0x40238b
cmp esi, dword [esp + 0x30]
jae 0x4024a7
mov edi, dword [esp + 0x2c]
mov al, byte [esi + edi]
xor al, bl
mov dword [esp + 0x24], 1
mov byte [esi + edi], al
mov bl, al
mov ecx, dword [ebp + 0x1c]
shr bl, 4
mov ah, byte [ecx + 4]
add bl, byte [ecx]
add ah, al
and bl, 0xf
and ah, 0xf
cmp dword [ebp + 0x18], 1
jl 0x402490
mov esi, dword [esp + 0x24]
mov edi, ecx
mov dl, ah
mov al, ah
xor dl, bl
and al, 3
mov bl, dl
mov cl, 4
sub cl, al
shr bl, cl
movzx ecx, ah
and ecx, 3
shl dl, cl
mov cl, 4
or bl, dl
mov dl, ah
add bl, byte [edi + esi*8]
and bl, 0xf
xor dl, bl
mov al, bl
and al, 3
mov ah, dl
sub cl, al
shr ah, cl
movzx ecx, bl
and ecx, 3
shl dl, cl
or ah, dl
add ah, byte [edi + esi*8 + 4]
and ah, 0xf
inc esi
cmp esi, dword [ebp + 0x18]
jle 0x402441
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x2c]
shl bl, 4
add bl, ah
mov byte [esi + edi], bl
inc esi
mov dword [esp + 0x34], esi
cmp esi, dword [esp + 0x30]
jb 0x402410
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
Function at 0x4024b1
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
cmp dword [esp + 0x24], 0
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], esi
je 0x4024ce
mov eax, dword [esi]
push dword [esp + 0x34]
call dword [eax + 8]
mov ebp, dword [esp + 0x2c]
xorps xmm0, xmm0
xor edi, edi
movlpd qword [esp + 0x20], xmm0
cmp dword [esp + 0x30], 8
jb 0x40257c
push 8
pop eax
sub eax, ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x18]
mov edx, dword [ebp]
mov ebx, dword [ebp + 4]
test eax, eax
jle 0x402539
mov ecx, dword [esi + 0x1c]
mov esi, ecx
mov dword [esp + 0x18], ecx
sub edx, dword [esi + eax*8 + 4]
mov ecx, ebx
and ecx, 0x1f
ror edx, cl
xor edx, ebx
sub ebx, dword [esi + eax*8]
mov ecx, edx
and ecx, 0x1f
ror ebx, cl
xor ebx, edx
dec eax
test eax, eax
jg 0x402517
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x1c]
xor ecx, ecx
add edi, 8
sub ebx, dword [eax]
sub edx, dword [eax + 4]
or ecx, ebx
mov eax, dword [ebp]
xor edx, dword [esp + 0x34]
xor ecx, dword [esp + 0x10]
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov dword [ebp], edx
mov dword [ebp + 4], ecx
add ebp, 8
add eax, ebp
cmp eax, dword [esp + 0x30]
jbe 0x402501
mov ebp, dword [esp + 0x2c]
jmp 0x402618
mov eax, dword [esp + 0x20]
mov dword [esp + 0x34], eax
jmp 0x402618
mov bl, byte [edi + ebp]
mov eax, dword [esi + 0x18]
mov dh, bl
shr dh, 4
mov cl, bl
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x4025fc
mov eax, dword [esi + 0x1c]
mov esi, eax
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
sub bl, byte [esi + ebp*8 + 4]
movzx eax, dh
and bl, 0xf
and eax, 3
mov dl, bl
push 4
pop ecx
sub ecx, eax
shl bl, cl
mov cl, dh
and cl, 3
shr dl, cl
or bl, dl
xor bl, dh
sub dh, byte [esi + ebp*8]
and dh, 0xf
movzx eax, bl
and eax, 3
mov dl, dh
push 4
pop ecx
sub ecx, eax
shl dh, cl
mov cl, bl
and cl, 3
shr dl, cl
or dh, dl
xor dh, bl
dec ebp
test ebp, ebp
jg 0x4025ab
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
mov cl, byte [edi + ebp]
mov eax, dword [esi + 0x1c]
sub bl, byte [eax + 4]
sub dh, byte [eax]
and bl, 0xf
shl dh, 4
add bl, dh
xor bl, byte [esp + 0x34]
mov byte [edi + ebp], bl
inc edi
mov byte [esp + 0x34], cl
cmp edi, dword [esp + 0x30]
jb 0x402589
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
Function at 0x40283c
Capabilities:
Encrypt data using rc6

Disassembly:
sub esp, 0x1c
movsd xmm0, qword [0x43c2d8]
push ebx
push ebp
push esi
push edi
push ecx
push ecx
mov edi, ecx
movsd qword [esp], xmm0
call fcn.0041d130
pop ecx
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
pop ecx
call fcn.0042cbd1
mov esi, eax
mov dword [esp + 0x20], eax
shl esi, 2
push esi
call fcn.0041cfdb
push esi
mov ebp, eax
xor ebx, ebx
push ebx
push ebp
mov dword [esp + 0x2c], ebp
call fcn.00417fd0
push 0x10
lea ecx, [edi + 8]
push ecx
push ebp
call fcn.00418130
mov eax, dword [edi + 0x18]
add esp, 0x1c
lea esi, [eax*2 + 2]
cmp dword [edi + 0x1c], ebx
je 0x4028b0
push dword [edi + 0x1c]
call fcn.0041cfd6
pop ecx
mov eax, esi
shl eax, 2
push eax
call fcn.0041cfdb
mov dword [edi + 0x1c], eax
pop ecx
test eax, eax
je 0x402962
xor edx, edx
mov dword [eax], 0xb7e15163
inc edx
cmp esi, edx
jbe 0x4028e8
mov ecx, dword [edi + 0x1c]
mov eax, dword [ecx + edx*4 - 4]
sub eax, 0x61c88647
mov dword [ecx + edx*4], eax
inc edx
cmp edx, esi
jb 0x4028d4
imul eax, esi, 3
mov edx, ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
test eax, eax
je 0x402958
mov ecx, dword [edi + 0x1c]
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x10]
mov eax, dword [ecx + eax*4]
add eax, edx
add eax, dword [esp + 0x14]
rol eax, 3
mov dword [ecx + ebp*4], eax
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
lea ecx, [edx + eax]
add edx, eax
mov eax, dword [esp + 0x10]
and ecx, 0x1f
add edx, dword [ebp + ebx*4]
rol edx, cl
inc eax
mov dword [ebp + ebx*4], edx
mov dword [esp + 0x24], edx
xor edx, edx
div esi
lea eax, [ebx + 1]
mov dword [esp + 0x10], edx
xor edx, edx
div dword [esp + 0x20]
sub dword [esp + 0x18], 1
mov ebx, edx
mov edx, dword [esp + 0x24]
jne 0x4028fd
push ebp
call fcn.0041cfd6
xor eax, eax
pop ecx
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x402dae
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x668
push ebx
push esi
push edi
mov edi, ecx
lea ecx, [edi + 0xc]
mov eax, dword [ecx + 0x20c]
test eax, eax
cmovne ecx, eax
call fcn.0040516d
test eax, eax
jne 0x402ef6
push 0x43afac
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x402ef6
push str.NtQueryInformationFile
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x402ef6
push 0x20e
xor ebx, ebx
lea eax, [ebp - 0x258]
push ebx
push eax
call fcn.00417fd0
add esp, 0xc
lea eax, [ebp - 0x258]
push 9
push 0x20c
push eax
lea eax, [ebp - 0x14]
push eax
push dword [edi + 0x21c]
call esi
test eax, eax
js 0x402ef6
mov eax, dword [ebp - 0x258]
xor ecx, ecx
shr eax, 1
mov word [ebp + eax*2 - 0x254], cx
lea eax, [ebp - 0x48]
push eax
push dword [edi + 0x21c]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x402ef6
push 0x410
lea eax, [ebp - 0x668]
push ebx
push eax
call fcn.00417fd0
add esp, 0xc
lea eax, [ebp - 0x668]
push eax
push 0x207
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov eax, dword [0x43afd8]
lea esi, [ebp - 0x668]
mov dword [ebp - 0xc], eax
mov eax, dword [0x43afdc]
mov dword [ebp - 8], eax
movzx eax, word [ebp - 0x668]
mov word [ebp - 0xc], ax
cmp ax, 0x41
je 0x402ee3
cmp ax, 0x42
je 0x402ee3
lea ecx, [ebp - 0xc]
call fcn.00404eae
cmp eax, 3
jne 0x402ee3
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 4]
mov dword [ebp - 4], ebx
push eax
push ebx
push ebx
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x2c]
je 0x402eff
movzx eax, word [esi]
add esi, 2
test ax, ax
jne 0x402ee3
movzx eax, word [esi]
test ax, ax
jne 0x402ea7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xc]
push 2
push eax
push esi
call fcn.0041ae94
push 0x102
lea eax, [ebp - 0x254]
push eax
lea eax, [esi + 4]
push eax
call fcn.0041ae94
xor eax, eax
add esp, 0x18
inc eax
jmp 0x402ef8
Function at 0x40302e
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, ecx
push 1
mov ecx, dword [edi + 8]
call fcn.00409365
cmp dword [esp + 0x10], 0
jne 0x403056
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40304e
and dword [ecx], 0
xor eax, eax
inc eax
jmp 0x40311e
push ebx
push 0
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push dword [edi + 0x21c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x18]
mov ebx, eax
mov eax, dword [esp + 8]
add dword [edi + 0x220], eax
adc dword [edi + 0x224], 0
test ecx, ecx
je 0x40308f
mov dword [ecx], eax
test ebx, ebx
jne 0x40311b
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 8]
mov esi, eax
push 3
call fcn.00409365
mov ecx, dword [edi + 8]
mov ebp, 0x43af60
push 1
push ebp
call fcn.0040923e
push ecx
mov ecx, dword [edi + 8]
push esi
call fcn.0040984f
push dword [edi + 0x21c]
push str._IXStream__Handle__p_
push dword [edi + 8]
call fcn.0040952d
push dword [edi + 0x230]
push str._IXStream__Access__x_
push dword [edi + 8]
call fcn.0040952d
add esp, 0x18
mov ecx, edi
call fcn.00402cd7
push eax
push 0x6d68
push ebp
push dword [edi + 8]
call fcn.0040939e
add esp, 0x10
mov ecx, edi
call fcn.00402cd7
mov ecx, dword [edi + 8]
push eax
push 1
call fcn.004095b3
pop esi
pop ebp
mov eax, ebx
pop ebx
pop edi
pop ecx
ret 0xc
Function at 0x403123
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push edi
push 1
mov ecx, dword [esi + 8]
call fcn.00409365
mov eax, dword [esp + 0x28]
lea ebx, [esp + 0x18]
test eax, eax
push 0
cmovne ebx, eax
xor ecx, ecx
push ebx
test eax, eax
mov eax, dword [esp + 0x2c]
push eax
push dword [esp + 0x2c]
sete cl
mov dword [esp + 0x20], eax
and dword [ebx], 0
push dword [esi + 0x21c]
mov dword [esp + 0x28], ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x24], 0
mov edi, eax
mov ebp, dword [ebx]
jbe 0x4031c6
test edi, edi
jne 0x4031c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x403196
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xa2
jne 0x4031c6
mov eax, dword [esp + 0x10]
sub eax, dword [ebx]
mov ecx, dword [esp + 0x20]
add ecx, dword [ebx]
push 0
push ebx
push eax
push ecx
push dword [esi + 0x21c]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
add ebp, dword [ebx]
mov edi, eax
cmp dword [esp + 0x10], 0
jne 0x403178
mov dword [ebx], ebp
add dword [esi + 0x220], ebp
adc dword [esi + 0x224], 0
test edi, edi
je 0x4031ed
cmp dword [esp + 0x28], 0
jne 0x4031e6
cmp ebp, dword [esp + 0x24]
jne 0x4031ed
mov eax, edi
jmp 0x4032aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 8]
mov ebx, eax
push 3
call fcn.00409365
mov ecx, dword [esi + 8]
push 1
push 0x43af60
call fcn.0040923e
mov ecx, dword [esi + 8]
push ecx
test edi, edi
je 0x40321a
push 0
jmp 0x40321b
push ebx
call fcn.0040984f
push dword [esi + 0x21c]
push str._IXStream__Handle__p_
push dword [esi + 8]
call fcn.0040952d
push dword [esp + 0x20]
push str._IXStream__bExact__d_
push dword [esi + 8]
call fcn.0040952d
push ebp
push dword [esp + 0x40]
push str._IXStream__A_lire__u___lu__u_
push dword [esi + 8]
call fcn.0040952d
mov ecx, dword [esi + 0x220]
mov eax, dword [esi + 0x224]
sub ecx, ebp
sbb eax, 0
push eax
push ecx
push str._IXStream__Offset__I64u_
push dword [esi + 8]
call fcn.0040952d
add esp, 0x38
mov ecx, esi
call fcn.00402cd7
push eax
push 0x6d63
push 0x43af60
push dword [esi + 8]
call fcn.0040939e
add esp, 0x10
mov ecx, esi
call fcn.00402cd7
mov ecx, dword [esi + 8]
push eax
push 1
call fcn.004095b3
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc