joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41954a
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x34
mov eax, dword [esp + 0x38]
push ebp
xor ebp, ebp
push edi
cmp dword [eax + 8], 1
mov edi, ebp
mov dword [esp + 0x10], edi
mov dword [esp + 8], ebp
jne 0x4196e9
push esi
mov esi, dword [esp + 0x48]
test esi, esi
je 0x4196e8
push ebx
push ebp
push pe_nt_image_headers32
push 3
push ebp
push 7
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4196e7
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x200000
push ebp
push dword [0x4ef29c]
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
je 0x4196e0
call fcn.00448360
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
je 0x4196cd
lea eax, [esp + 0x20]
push eax
push esi
call sub.MSVCRT.dll__wstat
push 0x1a4
push edi
call fcn.00448970
lea eax, [esp + 0x30]
push eax
push edi
call fcn.00448cd0
mov esi, dword [esp + 0x60]
add esp, 0x18
mov eax, dword [esi + 0x20]
cmp dword [eax + 8], 1
je 0x419619
cmp dword [eax + 8], 3
je 0x419619
push dword [esp + 0x50]
push edi
call fcn.00447ef0
pop ecx
pop ecx
jmp 0x419637
push dword [esp + 0x50]
call fcn.004b3090
mov esi, eax
push esi
push edi
call fcn.00448960
pop ecx
pop ecx
push esi
call fcn.004b3080
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x14]
cdq
push edx
push eax
push edi
call fcn.00448a00
push 0x8000
push edi
call fcn.004487c0
push edi
push dword [esi]
call fcn.00448e40
add esp, 0x1c
lea eax, [esp + 0x4c]
push 0
push eax
push 0x200000
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x4c]
test eax, eax
jle 0x4196b4
mov edi, dword [esp + 0x10]
push eax
push ebp
push dword [esi]
call fcn.00448e00
add esp, 0xc
cmp eax, dword [esp + 0x4c]
jne 0x4196ac
add edi, dword [esp + 0x4c]
lea eax, [esp + 0x4c]
push 0
push eax
push 0x200000
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x4c]
test eax, eax
jg 0x41967a
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x10], eax
jne 0x4196c6
mov dword [esp + 0x18], 1
push edi
call fcn.004481b0
pop ecx
push ebp
push 0
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop esi
mov eax, edi
pop edi
pop ebp
add esp, 0x34
ret 0xc

Function at 0x4197a3
Capabilities:
Delete file

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
xor edi, edi
test esi, esi
je 0x419805
cmp word [esi], di
je 0x419805
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.00449940
push dword [esp + 0x1c]
mov ebx, eax
push ebx
call dword [esp + 0x20]
push esi
push ebx
call fcn.00449b50
add esp, 0x10
test eax, eax
jne 0x419804
push 0x24
push 8
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov eax, dword [esp + 0x10]
mov dword [ecx + 0x14], edi
mov edi, ecx
mov dword [ecx], ebx
mov dword [ecx + 8], 1
mov dword [ecx + 0x20], eax
mov dword [eax + 4], ecx
pop ebx
mov eax, edi
pop edi
pop esi
ret 0x10
Function at 0x419cff
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
push ebp
push esi
push edi
push dword [esp + 0x38]
xor esi, esi
mov dword [esp + 0x10], esi
call fcn.004b3090
mov edi, dword [esp + 0x34]
mov dword [esp + 0x10], eax
lea eax, [edi + 0x18]
push eax
push esi
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
je 0x419dfe
push ebx
mov ebx, dword [esp + 0x30]
lea eax, [edi + 0x18]
push esi
push dword [ebx + 0x18]
push eax
push ebp
push edi
push dword [esp + 0x48]
call fcn.0041a1ee
mov esi, eax
add esp, 0x18
test esi, esi
je 0x419d62
cmp esi, edi
jge 0x419d62
mov dword [esp + 0x34], ebp
jmp 0x419d64
mov esi, edi
push dword [esp + 0x14]
call sub.MSVCRT.dll_strlen
mov word [esp + 0x2c], ax
mov eax, edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
cdq
mov dword [esp + 0x1c], eax
mov eax, esi
pop ecx
mov dword [esp + 0x1c], edx
cdq
push 0
mov dword [esp + 0x24], eax
lea eax, [esp + 0x40]
push eax
push 0x12
lea eax, [esp + 0x24]
mov dword [esp + 0x30], edx
push eax
push dword [ebx]
call edi
cmp dword [esp + 0x3c], 0x12
jne 0x419de3
push 0
lea eax, [esp + 0x40]
push eax
movsx eax, word [esp + 0x30]
push eax
push dword [esp + 0x20]
push dword [ebx]
call edi
movsx eax, word [esp + 0x28]
cmp eax, dword [esp + 0x3c]
jne 0x419de3
push 0
lea eax, [esp + 0x40]
push eax
push esi
push dword [esp + 0x40]
push dword [ebx]
call edi
cmp esi, dword [esp + 0x3c]
jne 0x419de3
xor esi, esi
inc esi
jmp 0x419de7
mov esi, dword [esp + 0x10]
push ebx
call fcn.0041a408
pop ecx
push ebp
push 0
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebx
push dword [esp + 0x10]
call fcn.004b3080
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0x1c
ret 0x10
Function at 0x41a039
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
or dword [esp], 0xffffffff
xor edx, edx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x2c]
mov esi, edx
test edi, edi
je 0x41a070
cmp word [edi], dx
je 0x41a070
push edi
call fcn.004b3090
mov ebp, dword [esp + 0x20]
mov edi, eax
push edi
push ebp
call fcn.0041a44d
pop ecx
pop ecx
mov esi, eax
xor edx, edx
jmp 0x41a086
mov ebp, dword [esp + 0x20]
cmp dword [ebp + 8], edx
je 0x41a19b
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 4]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x41a19b
cmp dword [esp + 0x30], 0
je 0x41a0aa
push dword [esi]
push edx
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov eax, dword [esi]
jmp 0x41a0b2
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x41a19f
cdq
cmp edx, dword [esi + 4]
jl 0x41a19f
jg 0x41a0d2
cmp eax, dword [esi]
jb 0x41a19f
push 0
lea eax, [esi + 0x14]
push eax
push dword [esi + 0x10]
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
cmp eax, dword [esi]
jne 0x41a124
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 4]
jne 0x41a124
push 0
lea eax, [esp + 0x30]
push eax
push dword [esi]
push ebx
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, dword [esp + 0x2c]
mov eax, ebp
cdq
cmp dword [esi], eax
jne 0x41a19f
cmp dword [esi + 4], edx
jne 0x41a19f
mov dword [esp + 0x10], ebp
jmp 0x41a1a3
push dword [esi + 8]
push 0
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x41a19f
push 0
lea ecx, [esp + 0x30]
push ecx
push dword [esi + 8]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x2c]
cdq
cmp dword [esi + 8], eax
jne 0x41a183
cmp dword [esi + 0xc], edx
jne 0x41a183
push dword [esp + 0x14]
push ebx
push dword [esp + 0x20]
call fcn.0041a6ae
cdq
add esp, 0xc
cmp eax, dword [esi]
jne 0x41a183
cmp edx, dword [esi + 4]
jne 0x41a183
mov ebp, dword [esi]
mov dword [esp + 0x10], ebp
jmp 0x41a187
mov ebp, dword [esp + 0x10]
push dword [esp + 0x18]
push 0
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x41a1a3
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x41a1cf
cmp ebp, 0xffffffff
jne 0x41a1c9
test ebx, ebx
je 0x41a1c3
push ebx
push 0
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov ebx, eax
jmp 0x41a1d5
mov eax, dword [esi]
mov dword [ecx], eax
jmp 0x41a1d3
mov ebx, dword [esp + 0x10]
xor eax, eax
test edi, edi
je 0x41a1e4
cmp word [edi], ax
je 0x41a1e4
push edi
call fcn.004b3080
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xc
ret
Function at 0x41a48d
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
mov esi, dword [esp + 0x48]
xor ebx, ebx
push 0x40
pop ebp
cmp dword [esi + 4], ebx
jne 0x41a610
push edi
push 0x100
push ebx
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
push ebx
push 4
pop edi
mov dword [esi + 4], eax
mov dword [esi + 0xc], ebx
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esi + 0x14], 0x706c7a31
lea eax, [esp + 0x4c]
push 0
push eax
jne 0x41a522
push 0x18
lea eax, [esp + 0x3c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x4c], 0x18
jne 0x41a60f
mov eax, dword [esp + 0x30]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
mov ax, word [esp + 0x40]
mov word [esp + 0x2c], ax
jmp 0x41a53c
push 0x12
lea eax, [esp + 0x28]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x4c], 0x12
jne 0x41a60f
cmp dword [esi + 0xc], ebp
jl 0x41a55e
add ebp, 0x40
mov eax, ebp
shl eax, 2
push eax
push dword [esi + 4]
push 8
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esi + 4], eax
movsx eax, word [esp + 0x2c]
add eax, 0x19
push eax
push 0
push dword [0x4ef29c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [esp + 0x1c]
mov edx, eax
push 0
lea eax, [esp + 0x50]
mov dword [esp + 0x14], edx
push eax
mov dword [edx], ecx
mov ecx, dword [esp + 0x28]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x2c]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x30]
mov dword [edx + 0xc], ecx
movsx eax, word [esp + 0x34]
push eax
lea eax, [edx + 0x18]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, word [esp + 0x2c]
xor ecx, ecx
mov edx, dword [esp + 0x10]
mov byte [eax + edx + 0x18], cl
cmp dword [esi + 0x14], 0x706c7a31
movsx eax, word [esp + 0x2c]
jne 0x41a5d1
add eax, 0x18
jmp 0x41a5d4
add eax, 0x12
add edi, eax
mov dword [edx + 0x10], edi
adc ebx, ecx
mov dword [edx + 0x14], ebx
mov ecx, dword [esi + 0xc]
add edi, dword [esp + 0x24]
mov eax, dword [esi + 4]
adc ebx, dword [esp + 0x28]
push 1
mov dword [eax + ecx*4], edx
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
inc dword [esi + 0xc]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x1c], ecx
push ecx
jmp 0x41a4c4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
Function at 0x41c7c1
Capabilities:
Get graphical window text

Disassembly:
push ebx
push dword [esp + 8]
push dword [0x4f09ac]
call fcn.0042c97c
mov ebx, eax
test ebx, ebx
je 0x41c825
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 0x18]
test eax, eax
je 0x41c7ea
push dword [esp + 0xc]
push ebx
call eax
jmp 0x41c825
push esi
push edi
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
push dword [esp + 0x14]
mov edi, eax
push edi
call fcn.0042dd70
mov esi, eax
lea ecx, [edi + 1]
push ecx
xor eax, eax
push esi
mov word [esi], ax
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextW]
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
sub edi, eax
push edi
call fcn.0042de50
pop edi
pop esi
pop ebx
ret 8
Function at 0x421038
Capabilities:
Check os version

Disassembly:
sub esp, 0x350
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x114
xor ebx, ebx
mov esi, 0xc8
and dword [esp + 0x10], ebx
xor edi, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4211ae
mov eax, dword [esp + 0x24]
dec eax
je 0x421191
dec eax
jne 0x4211ae
lea eax, [esp + 0x128]
xor ebp, ebp
push eax
call fcn.00420ff1
pop ecx
test eax, eax
je 0x4210ef
mov ebx, dword [esp + 0x12c]
mov edi, dword [esp + 0x130]
mov eax, dword [esp + 0x134]
cmp byte [esp + 0x242], 1
jne 0x4210b2
xor ebp, ebp
inc ebp
sub ebx, 3
je 0x42118d
dec ebx
je 0x421189
dec ebx
je 0x421168
dec ebx
je 0x421122
sub ebx, 4
jne 0x4211ae
test edi, edi
jne 0x4211ae
cmp eax, 0x55f0
sbb esi, esi
and esi, 0xfffffff6
add esi, 0x78
jmp 0x4211ae
lea eax, [esp + 0x244]
mov dword [esp + 0x244], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
mov eax, dword [esp + 0x10]
je 0x4210b2
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
cmp byte [esp + 0x35e], 1
jmp 0x4210ad
sub edi, 0
je 0x42115a
dec edi
je 0x42114c
dec edi
je 0x42113e
dec edi
jne 0x4211ae
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x69
jmp 0x4211ae
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x5f
jmp 0x4211ae
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x55
jmp 0x4211ae
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x4b
jmp 0x4211ae
sub edi, 0
je 0x421185
dec edi
je 0x421181
dec edi
jne 0x4211ae
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x41
jmp 0x4211ae
push 0x3c
jmp 0x4211ad
push 0x32
jmp 0x4211ad
push 0x14
jmp 0x4211ad
push 5
jmp 0x4211ad
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4211ab
cmp eax, 0xa
je 0x4211a7
cmp eax, 0x5a
jne 0x4211ae
push 0x28
jmp 0x4211ad
push 0x1e
jmp 0x4211ad
push 0xa
pop esi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x350
ret
Function at 0x4218da
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
push dword [0x4f09dc]
call fcn.0042c97c
mov esi, eax
test esi, esi
je 0x4219b4
cmp dword [ebp + 0xc], 0
je 0x421926
push 4
push dword [esi]
call dword [sym.imp.USER32.dll_GetWindow]
test eax, eax
je 0x421917
cmp dword [esi + 0x1c], 0
jne 0x421917
push eax
call dword [sym.imp.USER32.dll_SetActiveWindow]
push 0
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x4219b4
test byte [ebp + 0x10], 3
je 0x421941
push 4
push dword [esi]
call dword [sym.imp.USER32.dll_GetWindow]
push eax
push dword [ebp + 0x10]
push dword [esi]
call fcn.00422363
cmp dword [esi + 0x3c], 0xffffffff
push ebx
je 0x421966
xor ebx, ebx
cmp dword [esi + 0x3c], 0x1000000
sete bl
xor ecx, ecx
cmp dword [esi + 0x3c], 0x20000000
sete cl
or dword [esi + 0x3c], 0xffffffff
jmp 0x42197a
push dword [esi]
call dword [sym.imp.USER32.dll_IsZoomed]
push dword [esi]
mov ebx, eax
call dword [sym.imp.USER32.dll_IsIconic]
mov ecx, eax
test dword [ebp + 0x10], 0x2000000
je 0x421997
test ebx, ebx
je 0x42198b
push 8
jmp 0x42199d
neg ecx
sbb ecx, ecx
and ecx, 3
add ecx, 4
jmp 0x4219aa
test ebx, ebx
je 0x4219a0
push 3
pop ecx
jmp 0x4219aa
xor eax, eax
test ecx, ecx
setne al
lea ecx, [eax + 1]
push ecx
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
pop ebx
pop esi
pop ebp
ret 0xc
Function at 0x422508
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
xor edi, edi
call dword [sym.imp.USER32.dll_GetFocus]
mov ebp, dword [esp + 0x3c]
mov ebx, eax
and dword [esp + 0x10], edi
push str.PB_WindowID
push ebp
call dword [sym.imp.USER32.dll_GetPropW]
mov esi, eax
push 9
pop eax
test esi, esi
je 0x4225a0
lea eax, [esp + 0x14]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x42259d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x14], eax
jne 0x42259d
lea eax, [esi - 1]
push eax
push dword [0x4f09dc]
call fcn.0042c97c
mov edi, eax
mov dword [esp + 0x10], 1
xor eax, eax
push 9
cmp dword [edi + 0x10], eax
jle 0x42259f
mov edx, dword [edi + 4]
xor ecx, ecx
pop esi
cmp word [ecx + edx + 2], si
jne 0x422594
mov esi, 0xfa01
push 9
cmp word [ecx + edx + 4], si
je 0x422687
pop esi
inc eax
add ecx, 6
cmp eax, dword [edi + 0x10]
jl 0x42257a
push 9
pop eax
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
test ebx, ebx
je 0x422646
push eax
call esi
test al, al
jns 0x422646
push 0x11
call esi
test al, al
js 0x422646
push 0x10
call esi
test al, al
js 0x422646
push 0x12
call esi
test al, al
js 0x422646
push 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
cmp dword [esp + 0x10], 0
jne 0x422646
push 5
lea eax, [esp + 0x1c]
push str.RichE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
je 0x42261a
push 4
lea eax, [esp + 0x1c]
push str.RICHE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x422631
push 0
push 0
push 0x44e
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, 0x800
je 0x422691
lea eax, [esp + 0x18]
push str.Scintilla
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x422691
test ebp, ebp
je 0x42266a
push 0x11
call esi
test al, al
js 0x422662
push 0x10
call esi
test al, al
js 0x422662
push 0x12
call esi
test al, al
jns 0x42266a
push 1
push ebp
call fcn.0042269d
test ebx, ebx
je 0x42267e
push str.PB_Hotkey
push ebx
call dword [sym.imp.USER32.dll_GetPropW]
test eax, eax
jne 0x422691
test edi, edi
je 0x422691
mov eax, dword [edi + 8]
jmp 0x422693
and dword [esp + 0x14], 0
jmp 0x42259f
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 4
Function at 0x422ad1
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x422c19
xor ecx, ecx
cmp word [eax], cx
je 0x422c19
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x422b2a
cmp eax, 3
jne 0x422b64
cmp word [esp + 0xa], 0x3a
jne 0x422b64
cmp eax, 2
jne 0x422b48
lea eax, [esp + 8]
push 0x4c46f0
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x422c19
push 0xfffffffffffffffe
pop edi
jmp 0x422c19
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x422b79
cmp ax, bx
jne 0x422b83
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x422b6c
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x422bc2
test byte [esp + 0x21c], 0x10
je 0x422ba9
push 0xfffffffffffffffe
pop edi
jmp 0x422bb9
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x422c17
cmp word [esp + 0x10], bp
jne 0x422bd0
cmp word [esp + 0x12], bp
je 0x422bef
cmp word [esp + 0x10], bx
jne 0x422bde
cmp word [esp + 0x12], bx
je 0x422bef
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x422c17
cmp word [esp + 0x12], ax
jne 0x422c17
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x422c04
test al, 0x10
je 0x422c17
jmp 0x422c14
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x422c17
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4

Function at 0x422e00
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
je 0x422e65
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x422e5d
push dword [esp + 0x10]
push dword [0x4f09f0]
call fcn.0042c97c
test eax, eax
je 0x422e53
cmp dword [eax + 4], 0
je 0x422e42
push edi
push esi
push eax
call fcn.00423870
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea ecx, [esp + 0xc]
push ecx
push edi
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
pop edi
xor eax, eax
pop esi
pop ecx
ret 0xc
xor eax, eax
pop esi
pop ecx
ret 0xc

Function at 0x423310
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x42334c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4
Function at 0x4234b0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x4f09f0]
call fcn.0042c97c
mov esi, eax
test esi, esi
je 0x42352f
cmp dword [esi + 4], 0
je 0x423500
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.00423980
test eax, eax
je 0x4234f4
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42353a
cmp dword [esp + 8], 0
je 0x42353a
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4

Function at 0x423870
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 4], 0
cmp dword [esi + 0x1c], 0
jne 0x423977
cmp dword [esi + 0x14], 1
jne 0x4238bb
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0xc]
push 1
neg eax
cdq
push ecx
push eax
push dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
push edi
mov edi, dword [esp + 0x20]
cmp eax, edi
jle 0x423938
mov ecx, dword [esi + 8]
add ecx, dword [esi + 4]
sub ecx, eax
mov eax, edi
dec eax
je 0x423923
dec eax
je 0x42390c
sub eax, 2
je 0x4238f7
push edi
push dword [esp + 0x20]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov ax, word [eax]
mov word [ecx], ax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov al, byte [eax]
mov byte [ecx], al
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
push esi
call fcn.00423310
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x423965
push 0
lea eax, [esp + 0xc]
push eax
push edi
push dword [esp + 0x28]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
add esp, 0xc
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
push edi
push dword [esp + 0x20]
add ecx, eax
jmp 0x4238e1
xor eax, eax
pop esi
add esp, 0xc
ret 0xc
Function at 0x423980
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x4239a1
push esi
call fcn.00423310
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x423a15
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x423a02
dec ecx
je 0x4239ed
sub ecx, 2
je 0x4239da
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x423a5a
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x423a7b
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc