joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41f967
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x435084], ebx
push esi
push edi
jne 0x41f9e7
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x41fa22
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x435084], eax
je 0x41fa22
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x435088], eax
call esi
cmp dword [0x434e98], 2
mov dword [0x43508c], eax
jne 0x41f9e7
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x435094], eax
je 0x41f9e7
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x435090], eax
mov eax, dword [0x435090]
test eax, eax
je 0x41fa2c
call eax
test eax, eax
je 0x41fa13
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x435094]
test eax, eax
je 0x41fa13
test byte [ebp - 8], 1
jne 0x41fa2c
cmp dword [0x434ea4], 4
jb 0x41fa26
or byte [ebp + 0x12], 0x20
jmp 0x41fa4b
xor eax, eax
jmp 0x41fa5b
or byte [ebp + 0x12], 4
jmp 0x41fa4b
mov eax, dword [0x435088]
test eax, eax
je 0x41fa4b
call eax
mov ebx, eax
test ebx, ebx
je 0x41fa4b
mov eax, dword [0x43508c]
test eax, eax
je 0x41fa4b
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x435084]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4208e1
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x431d24]
push esi
mov esi, dword [ebp + 8]
xor eax, ebp
test esi, esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
je 0x420969
push esi
call fcn.00421ef5
test eax, eax
pop ecx
jne 0x420931
call fcn.0041b70d
mov dword [eax], 0xf
call fcn.0041b704
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0041428f
leave
ret
and word [ebp - 6], 0
lea eax, [ebp - 0x218]
push eax
add esi, 0x40
lea eax, [ebp - 0x214]
push eax
mov word [ebp - 0xc], si
mov esi, 0x104
push esi
lea eax, [ebp - 0xc]
push eax
mov word [ebp - 0xa], 0x3a
mov word [ebp - 8], 0x2e
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
jmp 0x42097c
lea eax, [ebp - 0x214]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x420921
inc eax
cmp eax, esi
ja 0x420921
test edi, edi
mov ecx, edi
jne 0x4209b2
cmp eax, dword [ebp + 0x10]
jg 0x420993
mov eax, dword [ebp + 0x10]
add eax, eax
push eax
call fcn.004147b9
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x4209c7
call fcn.0041b704
mov dword [eax], 0xc
jmp 0x420921
cmp eax, dword [ebp + 0x10]
jle 0x4209c7
call fcn.0041b704
mov dword [eax], 0x22
jmp 0x420921
lea eax, [ebp - 0x214]
push eax
push ecx
call fcn.00414f86
pop ecx
pop ecx
jmp 0x420923
Function at 0x420e13
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x420fe9
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4353c0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x420fe9
test cl, 0x48
je 0x420e7e
cmp byte [eax + 5], 0xa
je 0x420e7e
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x420ed0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x420eb8
call fcn.0041b704
mov dword [eax], 9
call fcn.0041b70d
mov dword [eax], esi
jmp 0x420ec8
cmp eax, 0x6d
je 0x420fe9
push eax
call fcn.0041b716
pop ecx
or eax, 0xffffffff
jmp 0x420feb
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x420fe4
test eax, eax
je 0x420ef7
cmp byte [ebx], 0xa
jne 0x420ef7
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x420f00
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x420fde
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x420fce
cmp al, 0xd
je 0x420f32
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x420fc0
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x420f4c
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x420f47
add dword [ebp + 0x10], 2
jmp 0x420fa0
mov dword [ebp + 0x10], eax
jmp 0x420fbc
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x420f74
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x420fbc
cmp dword [ebp - 0xc], 0
je 0x420fbc
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x420f95
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x420fa0
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x420fbf
cmp ebx, dword [ebp + 0xc]
jne 0x420fa5
cmp byte [ebp - 1], 0xa
jne 0x420fa5
mov byte [ebx], 0xa
jmp 0x420fbf
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00420b50
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x420fc0
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x420f16
jmp 0x420fde
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x420fde
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x420feb
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42123e
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x42c3b8
call fcn.00414104
xor edi, edi
xor ebx, ebx
inc ebx
cmp dword [0x435158], edi
jne 0x421282
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x42126d
mov dword [0x435158], ebx
jmp 0x421282
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x421282
mov dword [0x435158], 2
mov eax, dword [0x435158]
cmp eax, ebx
jne 0x4212a2
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
jmp 0x421365
cmp eax, 2
je 0x4212ab
cmp eax, edi
jne 0x4212d3
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
cmp dword [ebp + 0x18], edi
jne 0x4212be
mov eax, dword [0x435034]
mov dword [ebp + 0x18], eax
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x20], eax
cmp eax, edi
jne 0x4212da
xor eax, eax
jmp 0x421365
mov dword [ebp - 4], edi
add eax, 3
and eax, 0xfffffffc
call fcn.00414e00
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], esi
or dword [ebp - 4], 0xffffffff
jmp 0x42130d
cmp esi, edi
jne 0x421323
push dword [ebp - 0x20]
call fcn.004147b9
pop ecx
mov esi, eax
cmp esi, edi
je 0x4212d3
mov dword [ebp - 0x24], ebx
push dword [ebp - 0x20]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x421356
cmp dword [ebp + 0x14], edi
jne 0x421340
push edi
push edi
jmp 0x421346
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
push ebx
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x24], edi
je 0x421362
push esi
call fcn.00414568
pop ecx
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0x34]
call fcn.0041413f
ret
Function at 0x42136e
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x42c3c8
call fcn.00414104
xor esi, esi
cmp dword [0x43515c], esi
jne 0x4213b2
push esi
push esi
xor edi, edi
inc edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x42139d
mov dword [0x43515c], edi
jmp 0x4213b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4213b2
mov dword [0x43515c], 2
mov eax, dword [0x43515c]
cmp eax, 2
je 0x421493
cmp eax, esi
je 0x421493
cmp eax, 1
jne 0x4213f7
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
cmp dword [ebp + 0x18], esi
jne 0x4213e0
mov eax, dword [0x435034]
mov dword [ebp + 0x18], eax
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, esi
jne 0x4213fe
xor eax, eax
jmp 0x4214a5
mov dword [ebp - 4], esi
lea eax, [ebx + ebx]
add eax, 3
and eax, 0xfffffffc
call fcn.00414e00
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x28], edi
or dword [ebp - 4], 0xffffffff
jmp 0x421434
cmp edi, esi
jne 0x42144f
lea eax, [ebx + ebx]
push eax
call fcn.004147b9
pop ecx
mov edi, eax
cmp edi, esi
je 0x4213f7
mov dword [ebp - 0x20], 1
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x421482
push esi
push esi
cmp dword [ebp + 0x14], esi
jne 0x42146c
push esi
push esi
jmp 0x421472
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push edi
push esi
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], esi
je 0x42148e
push edi
call fcn.00414568
pop ecx
mov eax, dword [ebp - 0x1c]
jmp 0x4214a5
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea esp, [ebp - 0x34]
call fcn.0041413f
ret

Function at 0x421ef5
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x421f23
add al, 0x40
mov byte [ebp + 8], al
lea eax, [ebp + 8]
push eax
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x5c
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x421f28
cmp eax, 1
je 0x421f28
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x422787
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x4227a0
or eax, 0xffffffff
jmp 0x422801
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 8], esi
je 0x4227fd
push 0x3d
push esi
call fcn.00422988
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x4227fd
cmp esi, eax
je 0x4227fd
xor ecx, ecx
cmp byte [eax + 1], cl
mov eax, dword [0x434eb8]
sete cl
cmp eax, dword [0x434ebc]
mov dword [ebp - 4], ecx
jne 0x4227e3
mov edi, eax
call fcn.00422726
mov dword [0x434eb8], eax
cmp eax, ebx
jne 0x42283c
cmp dword [ebp + 0xc], ebx
je 0x422805
cmp dword [0x434ec0], ebx
je 0x422805
call fcn.004222a3
test eax, eax
je 0x42283c
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
je 0x42280e
xor eax, eax
jmp 0x422800
push 4
call fcn.004147b9
cmp eax, ebx
pop ecx
mov dword [0x434eb8], eax
je 0x4227fd
mov dword [eax], ebx
cmp dword [0x434ec0], ebx
jne 0x42283c
push 4
call fcn.004147b9
cmp eax, ebx
pop ecx
mov dword [0x434ec0], eax
je 0x4227fd
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
mov ebx, dword [0x434eb8]
sub edi, esi
push esi
call fcn.004226d9
mov edi, eax
test edi, edi
pop ecx
jl 0x4228a3
cmp dword [ebx], 0
je 0x4228a3
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.00414568
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x422883
mov ecx, dword [ebp - 8]
mov dword [esi], ecx
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 8]
mov dword [ecx], eax
jmp 0x4228e4
mov ecx, dword [esi + 4]
inc edi
mov dword [esi], ecx
lea esi, [ebx + edi*4]
cmp dword [esi], eax
jne 0x42287a
mov eax, edi
shl eax, 2
push eax
push dword [0x434eb8]
call fcn.00418320
test eax, eax
mov esi, dword [ebp - 8]
pop ecx
pop ecx
je 0x4228e4
jmp 0x4228df
cmp dword [ebp - 4], 0
jne 0x42294b
test edi, edi
jge 0x4228b3
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x434eb8]
call fcn.00418320
test eax, eax
pop ecx
pop ecx
je 0x4227fd
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov ecx, dword [ebp + 8]
and dword [ecx], 0
mov dword [0x434eb8], eax
cmp dword [ebp + 0xc], 0
je 0x422936
push esi
call fcn.00413f00
inc eax
inc eax
push eax
call fcn.004147b9
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x422936
push esi
push edi
call fcn.0041a860
mov eax, edi
sub eax, esi
add eax, dword [ebp - 0xc]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov byte [eax], 0
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x42292f
or dword [ebp - 0x10], 0xffffffff
push edi
call fcn.00414568
pop ecx
cmp dword [ebp - 4], 0
je 0x422943
push esi
call fcn.00414568
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x422800
push esi
call fcn.00414568
mov eax, dword [ebp + 8]
and dword [eax], 0
pop ecx
jmp 0x42280a
Function at 0x40a7f2
Capabilities:
Hash data with crc32

Disassembly:
push 0x400
push 0
call dword [ebp + 0x45a898]
or eax, eax
je 0x40a83a
mov dword [ebp + 0x45a7d4], eax
mov edx, eax
xor ebx, ebx
cmp ebx, 0x100
je 0x40a838
mov eax, ebx
mov ecx, 8
test eax, 1
je 0x40a82c
shr eax, 1
xor eax, 0xedb88320
jmp 0x40a82e
shr eax, 1
loop 0x40a81c
mov dword [edx], eax
add edx, 4
inc ebx
jmp 0x40a80d
clc
ret
stc
ret

Function at 0x40a83c
Capabilities:
Encode data using xor

Disassembly:
or edx, edx
je 0x40a85f
jecxz 0x40a85f
push esi
push ebx
mov esi, dword [ebp + 0x45a7d4]
movzx ebx, al
xor bl, byte [edx]
shr eax, 8
and eax, 0xffffff
xor eax, dword [ebx + esi]
inc edx
loop 0x40a84a
pop ebx
pop esi
ret
Function at 0x4012c0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 8
mov edx, ecx
push ebx
mov ebx, dword [esp + 0x10]
push ebp
xor ebp, ebp
cmp ebx, ebp
jne 0x4012db
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 8
push esi
push edi
mov edi, str.192.168.0.1
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
push ecx
lea ecx, [edx + 4]
call fcn.00401ff0
cmp eax, ebp
mov dword [esp + 0x1c], ebp
je 0x4013aa
mov edi, dword [eax + 0x14]
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
push ecx
push ebp
push 0xf003f
push ebp
push ebp
push ebp
push str.SOFTWAREMicrosoftWindowsCurrentVersionInternet_Settings
push connect
mov dword [esp + 0x44], ebp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebp
jne 0x40139b
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x10]
push 4
push eax
push 4
push ebp
push str.WebCAC
push esi
mov dword [esp + 0x28], edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp esi, ebp
je 0x40139b
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret 8
lea ecx, [esp + 0x14]
lea edx, [esp + 0x20]
push ecx
push edx
push ebp
push 0xf003f
push ebp
push ebp
push ebp
push str.SOFTWAREMicrosoftWindowsCurrentVersionInternet_Settings
push connect
mov dword [esp + 0x44], ebp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebp
jne 0x40139b
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
push ebp
push str.WebCAC
push esi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40141f
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x4210d0
push ebx
call fcn.00409fbe
add esp, 0xc
cmp esi, ebp
je 0x40139b
jmp 0x401394
Function at 0x4019d0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 4]
xor esi, esi
cmp eax, esi
push edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
jne 0x4019f4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
mov ecx, ebx
call fcn.00401b40
mov eax, dword [ebx + 4]
push esi
push esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebx + 4]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 4
mov dword [esp + 0x1c], edi
jae 0x401a28
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
mov ecx, dword [ebx + 4]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x10]
push esi
push edx
lea eax, [esp + 0x1c]
push 4
push eax
push ecx
call ebp
test eax, eax
jne 0x401a4d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x14]
lea edx, [eax + eax*2]
shl edx, 4
add edx, 4
cmp edi, edx
jae 0x401a68
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
cmp eax, esi
mov dword [esp + 0x18], esi
jle 0x401acd
push 0x30
call fcn.00413ab1
mov esi, eax
add esp, 4
mov ecx, 0xc
xor eax, eax
mov edi, esi
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 4]
lea eax, [esp + 0x14]
push eax
push 0x30
push esi
push ecx
call ebp
cmp dword [esp + 0x10], 0x30
jne 0x401b26
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 4]
mov eax, dword [esp + 0x1c]
add edx, ecx
cmp edx, eax
jg 0x401aba
push esi
lea ecx, [ebx + 8]
call fcn.00413769
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x401a70
xor esi, esi
mov edi, dword [ebx + 0xc]
cmp edi, esi
je 0x401b19
mov eax, edi
mov edi, dword [edi]
mov esi, dword [eax + 8]
mov eax, dword [esi + 4]
push eax
call fcn.00413ab1
mov ecx, dword [esi + 0x10]
add esp, 4
mov dword [esi + 0x14], eax
mov edx, dword [ebx + 4]
push 0
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x14]
lea eax, [esp + 0x10]
push 0
push eax
mov eax, dword [ebx + 4]
push ecx
push edx
push eax
call ebp
test eax, eax
je 0x401b2f
test edi, edi
jne 0x401ad4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret
push esi
call fcn.00413ada
add esp, 4
mov ecx, ebx
call fcn.00401b40
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
Function at 0x401b80
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x10c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x120]
xor ebp, ebp
cmp edi, ebp
mov ebx, ecx
mov dword [esp + 0x14], ebp
jne 0x401ba0
lea edi, [ebx + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x18]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [esp + 0x18]
test al, al
jne 0x401bd8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret 4
lea ecx, [esp + 0x18]
push 0x421124
push ecx
call fcn.00410b70
add esp, 8
test eax, eax
jne 0x401bfb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 4
push ebp
push 0x80
push 2
push ebp
push ebp
lea edx, [esp + 0x2c]
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebx + 4], eax
jne 0x401c2f
pop edi
mov dword [ebx + 4], ebp
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret 4
mov esi, dword [ebx + 0x14]
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], esi
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [esi + esi*2]
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
shl esi, 4
push eax
add esi, 4
call ebp
test eax, eax
jne 0x401c79
mov eax, dword [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov dword [ebx + 4], 0
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret 4
mov edi, dword [ebx + 0xc]
test edi, edi
je 0x401cab
mov eax, edi
mov edi, dword [edi]
lea ecx, [esp + 0x10]
push 0
mov ebp, dword [eax + 8]
push ecx
push 0x30
push ebp
mov dword [ebp + 0x10], esi
mov edx, dword [ebx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
add esi, dword [ebp + 4]
test edi, edi
jne 0x401c80
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x401cd2
mov eax, esi
mov esi, dword [esi]
lea ecx, [esp + 0x10]
push 0
mov eax, dword [eax + 8]
push ecx
mov ecx, dword [ebx + 4]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x14]
push edx
push eax
push ecx
call ebp
test esi, esi
jne 0x401cb2
mov edx, dword [ebx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov dword [ebx + 4], 0
pop ebp
mov eax, 1
pop ebx
add esp, 0x10c
ret 4
Function at 0x401dd0
Capabilities:
Delete file
Move file
Write file on windows

Disassembly:
sub esp, 0x20c
push ebx
push ebp
mov ebp, dword [esp + 0x218]
push esi
push edi
push ebp
call fcn.00401f90
mov ebx, eax
test ebx, ebx
jne 0x401dfa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret 8
mov edi, dword [esp + 0x224]
test edi, edi
je 0x401e7d
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x421208
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x14]
push 0x421124
push eax
call fcn.00410b70
add esp, 8
test eax, eax
jne 0x401ea0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret 8
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 2
push 0
push 0
lea ecx, [esp + 0x28]
push 0x40000000
push ecx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x401f40
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x401f31
lea edx, [esp + 0x14]
push str..old
push edx
lea eax, [esp + 0x120]
push str._s_s
push eax
call fcn.00409fbe
add esp, 0x10
lea ecx, [esp + 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x118]
lea eax, [esp + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push 0
push 0x80
push 4
push 0
push 0
lea ecx, [esp + 0x28]
push 0x40000000
push ecx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x401f40
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20c
ret 8
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x14]
lea edx, [esp + 0x10]
push 0
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test edi, edi
je 0x401f6b
add ebx, 8
push ebx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret 8