joyce8/EMBER2024-capa huggingface dataset:
Function at 0x412b20
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x412b4c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x43c720]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x412b87
push 2
push ebp
push ecx
call fcn.00412a20
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x412ce9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x412c31
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x412be2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x412bcf
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x412bb2
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x412cda
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x412c2d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x412bae
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x412cc9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x412c85
cmp eax, 5
jne 0x412c6e
call fcn.0040cc80
mov dword [eax], 9
call fcn.0040cc90
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.0040cc00
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x412ca5
cmp byte [ebp], 0x1a
jne 0x412ca5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.0040cc80
mov dword [eax], 0x1c
call fcn.0040cc90
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x412c2d
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x412d1a
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x412c31
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x412c31
Function at 0x415bd0
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.0040a7a0
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.00412a20
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x415d10
push 2
push ebp
push ebx
call fcn.00412a20
add esp, 0xc
cmp eax, 0xffffffff
je 0x415d10
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x415cb1
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.004168b0
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x415c56
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00412b20
add esp, 0xc
cmp eax, 0xffffffff
je 0x415c72
sub esi, eax
test esi, esi
jle 0x415c8a
jmp 0x415c47
call fcn.0040cc90
cmp dword [eax], 5
jne 0x415c87
call fcn.0040cc80
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.004168b0
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.00412a20
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x415cf7
push 0
push ecx
push ebx
call fcn.00412a20
add esp, 0xc
push ebx
call fcn.00413260
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x415cf7
call fcn.0040cc80
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.0040cc90
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.00412a20
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x416420
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x43b690]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x416468
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x416448
mov eax, 2
jmp 0x416463
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x416548
mov eax, 1
mov dword [0x43b690], eax
cmp eax, 2
jne 0x416488
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 1
jne 0x41655a
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x4164a3
mov ecx, dword [0x43b5f8]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov edi, eax
test edi, edi
jne 0x4164c2
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.0040ac40
mov esi, eax
add esp, 4
test esi, esi
jne 0x4164d9
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x41653f
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x416520
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x220
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x41653f
push esi
call fcn.0040ad10
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push 0xffffffffffffffff
push esi
push 0x220
push edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x41654f
push esi
call fcn.0040ad10
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.0040ad10
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x416c20
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x416dde
push 0x3d
push edi
call fcn.0040ab70
mov esi, eax
add esp, 8
test esi, esi
je 0x416dde
cmp edi, esi
je 0x416dde
mov dl, byte [esi + 1]
mov ecx, dword [0x43b20c]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x43b208]
cmp eax, ecx
jne 0x416c77
push eax
call fcn.00416eb0
add esp, 4
mov dword [0x43b208], eax
test eax, eax
jne 0x416cf2
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x416c9e
mov eax, dword [0x43b210]
test eax, eax
je 0x416c9e
call fcn.00416010
test eax, eax
je 0x416ced
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x416caa
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.0040ac40
add esp, 4
mov dword [0x43b208], eax
test eax, eax
je 0x416dde
mov dword [eax], 0
mov eax, dword [0x43b210]
test eax, eax
jne 0x416ced
push 4
call fcn.0040ac40
add esp, 4
mov dword [0x43b210], eax
test eax, eax
je 0x416dde
mov dword [eax], 0
mov eax, dword [0x43b208]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.00416e30
mov esi, eax
add esp, 8
test esi, esi
jl 0x416def
cmp dword [ebx], 0
je 0x416def
test ebp, ebp
je 0x416de7
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.0040ad10
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x416d49
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x416d38
lea eax, [esi*4]
push eax
push ebx
call fcn.0040df20
add esp, 8
test eax, eax
je 0x416d63
mov dword [0x43b208], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x416dd6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.0040ac40
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x416dd6
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
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
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.0040ad10
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x416d67
test ebp, ebp
jne 0x416dd6
test esi, esi
jge 0x416df9
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.0040df20
add esp, 8
test eax, eax
je 0x416dde
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x43b208], eax
jmp 0x416d67
Function at 0x418780
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x418799
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41879b
xor eax, eax
test eax, eax
je 0x4187ac
push eax
call fcn.0040cc00
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x419a8d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x419ab0
cmp dword [edi + 0x3c], 0
jne 0x419ab0
movzx eax, word [edi + 0x40]
mov dword [edi + 0x3c], eax
call fcn.004286dd
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.00419add
pop edi
pop esi
pop ebx
ret 8

Function at 0x419e09
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x42a2a4
call fcn.0040aaf0
push ecx
sub esp, 0x14
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x14], eax
call fcn.004286dd
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x419e57
call fcn.004286dd
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x419e65
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x419e73
or eax, 0xffffffff
jmp 0x419f5f
mov ecx, esi
call fcn.00419d94
mov edi, eax
mov dword [ebp - 0x20], edi
call fcn.0041abb2
push edi
call fcn.0041a655
and dword [ebp - 0x1c], 0
test edi, edi
je 0x419ead
push edi
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x419ead
push 0
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x1c], 1
and dword [ebp - 4], 0
push esi
call fcn.0041ab66
push edi
call fcn.0041a655
push ebx
push eax
push dword [ebp - 0x14]
mov ecx, esi
call fcn.00419b2b
xor ebx, ebx
cmp eax, ebx
je 0x419f26
test byte [esi + 0x24], 0x10
je 0x419ef1
push 4
mov ecx, esi
pop ebx
call fcn.0041d027
test ah, 1
je 0x419ee7
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.0041cc17
xor ebx, ebx
cmp dword [esi + 0x1c], ebx
je 0x419f26
push 0x97
push ebx
push ebx
push ebx
push ebx
push ebx
mov ecx, esi
call fcn.0041d0b6
jmp 0x419f26
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1c], ebx
je 0x419f38
push 1
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
cmp edi, ebx
je 0x419f4e
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x419f4e
push edi
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x60]
mov ecx, esi
call fcn.00419dcb
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x41cb0d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x41cb4f
call fcn.004286dd
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x41cb4f
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x41cb46
xor eax, eax
jmp 0x41cb57
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0041cb5d
pop edi
pop esi
pop ebx
ret 4

Function at 0x41eaa3
Capabilities:
Clear file content

Disassembly:
push esi
mov esi, ecx
push 0
mov eax, dword [esi]
push dword [esp + 0xc]
call dword [eax + 0x30]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x41eacb
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042078a
pop esi
ret 4

Function at 0x41ed76
Capabilities:
Get file system object information

Disassembly:
mov eax, 0x42a964
call fcn.0040aaf0
sub esp, 0x168
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
push 0x800
push 0x160
mov byte [eax], bl
lea eax, [ebp - 0x174]
push eax
push ebx
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
test eax, eax
je 0x41ee9b
test byte [ebp - 0x16a], 1
je 0x41ee9b
lea eax, [ebp + 0xc]
lea ecx, [ebp - 0x10]
push eax
push 0x42e3f0
push ebx
push 0x42e3e0
call fcn.0041eb4d
test eax, eax
jl 0x41ee9b
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x14]
push edx
push 0x42e3d0
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jl 0x41ee92
cmp edi, ebx
jne 0x41ee07
xor eax, eax
jmp 0x41ee28
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.0040a7a0
mov eax, esp
push esi
push edi
push eax
call fcn.0041dd63
mov ecx, dword [ebp - 0x14]
push ebx
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
test eax, eax
jl 0x41ee89
mov eax, dword [ebp + 8]
cmp eax, ebx
jne 0x41ee42
xor eax, eax
jmp 0x41ee45
mov eax, dword [eax + 0x1c]
mov ecx, dword [ebp + 0xc]
push 2
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x4c]
test eax, eax
jl 0x41ee89
mov eax, dword [ebp + 0xc]
push ebx
push ebx
push dword [ebp + 0x14]
mov ecx, dword [eax]
push dword [ebp + 0x10]
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0041eb3f
push 1
pop eax
jmp 0x41eea9
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0041eb3f
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x180]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x41f540
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
xor edi, edi
push dword [ebp + 8]
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x41f571
push edi
call ebx
push eax
call fcn.0042078a
mov esi, dword [ebp + 0xc]
movzx eax, byte [esi + 0x10]
cmp eax, dword [ebp - 4]
je 0x41f59a
test byte [ebp - 4], 1
je 0x41f59a
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x41f59a
push edi
call ebx
push eax
call fcn.0042078a
cmp dword [esi + 4], edi
lea eax, [esi + 4]
je 0x41f640
lea ecx, [ebp - 0x24]
push ecx
push eax
call fcn.0041f491
cmp dword [esi + 8], edi
lea eax, [esi + 8]
pop ecx
pop ecx
je 0x41f5cc
lea ecx, [ebp - 0x14]
push ecx
push eax
call fcn.0041f491
pop ecx
lea eax, [ebp - 0x14]
pop ecx
mov dword [ebp - 8], eax
cmp dword [esi], edi
je 0x41f5e2
lea eax, [ebp - 0x1c]
push eax
push esi
call fcn.0041f491
pop ecx
lea eax, [ebp - 0x1c]
pop ecx
mov dword [ebp - 0xc], eax
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x41f60c
push 0
call ebx
push eax
call fcn.0042078a
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x41f62a
push eax
call ebx
push eax
call fcn.0042078a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x41f63e
push eax
call ebx
push eax
call fcn.0042078a
xor edi, edi
movzx eax, byte [esi + 0x10]
cmp eax, dword [ebp - 4]
je 0x41f666
test byte [ebp - 4], 1
jne 0x41f666
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x41f666
push edi
call ebx
push eax
call fcn.0042078a
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x421173
Capabilities:
Get file attributes

Disassembly:
push esi
mov esi, ecx
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
mov eax, dword [esi]
push 1
je 0x42118b
push 0
jmp 0x42118e
push dword [esi + 0x20]
mov ecx, esi
call dword [eax + 0xa0]
test eax, eax
jne 0x42119c
pop esi
ret
push 1
pop eax
pop esi
ret
Function at 0x4215c7
Capabilities:
Get common file path
Get disk size
Timestomp file

Disassembly:
mov eax, 0x42a650
call fcn.0040aaf0
sub esp, 0x240
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x10]
mov ecx, edi
call fcn.0041d893
test byte [ebp + 0xd], 0x10
je 0x421698
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call fcn.0041f3df
test eax, eax
je 0x421698
lea ecx, [ebp - 0x10]
call fcn.0041d7bd
lea eax, [ebp - 0x10]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call fcn.0041ef99
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x421637
mov ebx, dword [ebp - 0x2c]
imul ebx, dword [ebp - 0x30]
imul ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x13c]
add eax, eax
cmp ebx, eax
jle 0x42168c
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24c]
push eax
push 0x104
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov eax, dword [ebp - 0x1c]
push 0x105
mov ecx, edi
and byte [eax], 0
call fcn.0041dc45
push eax
push 0
lea eax, [ebp - 0x24c]
push 0x42dc7c
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0xffffffffffffffff
mov ecx, edi
call fcn.0041dc94
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0041d908
mov eax, dword [edi]
xor ebx, ebx
cmp dword [eax - 8], ebx
je 0x421755
push dword [ebp + 0x10]
mov ecx, esi
push dword [ebp + 0xc]
push eax
call fcn.0041e7ca
test eax, eax
je 0x421755
push dword [ebp + 8]
lea ecx, [esi + 0xc]
call fcn.0041da50
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x421706
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.0041f491
pop ecx
lea eax, [ebp - 0x20]
pop ecx
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
lea eax, [ebp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
push eax
push ebx
push ebx
push 4
push dword [ebp + 8]
mov dword [ebp + 0xc], ebx
call esi
test eax, eax
je 0x421750
push dword [ebp + 0xc]
call fcn.0041988e
mov ebx, eax
pop ecx
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0xc]
push ebx
push 4
push dword [ebp + 8]
call esi
test eax, eax
je 0x421749
push ebx
push 4
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
push ebx
call fcn.004198ca
pop ecx
push 1
pop eax
jmp 0x42176c
mov ecx, edi
call fcn.0041d893
push dword [ebp + 0x10]
mov ecx, esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0041e7ca
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc
Function at 0x422da3
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push edi
xor edi, edi
cmp dword [ebp + 8], edi
jne 0x422dc0
cmp dword [0x43b1a4], edi
jne 0x422f12
cmp word [0x43b1b0], di
mov dword [0x43b1a4], 1
jne 0x422df2
push str.MSH_SCROLL_LINES_MSG
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
xor ecx, ecx
cmp eax, edi
setne cl
inc ecx
mov dword [0x43b1ac], eax
mov word [0x43b1b0], cx
cmp word [0x43b1b0], 2
jne 0x422e2e
push str.Magellan_MSWHEEL
push str.MouseZ
call dword [sym.imp.USER32.dll_FindWindowA]
cmp eax, edi
je 0x422e2e
mov ecx, dword [0x43b1ac]
cmp ecx, edi
je 0x422e2e
push edi
push edi
push ecx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [0x43b1a8], eax
jmp 0x422f17
push 0x94
lea eax, [ebp - 0x9c]
push edi
push eax
call fcn.0040ab10
add esp, 0xc
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x94
mov dword [0x43b1a8], 3
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x422f12
cmp dword [ebp - 0x8c], 1
je 0x422e82
cmp dword [ebp - 0x8c], 2
jne 0x422f12
cmp dword [ebp - 0x98], 4
jae 0x422ef1
lea eax, [ebp + 8]
push eax
push 1
push edi
push str.Control_PanelDesktop
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x422f12
lea eax, [ebp - 4]
mov dword [ebp - 4], pe_nt_image_headers32
push eax
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 8]
push eax
push edi
push str.WheelScrollLines
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x422ee6
push 0xa
lea eax, [ebp - 0x11c]
push edi
push eax
call fcn.0040b210
add esp, 0xc
mov dword [0x43b1a8], eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x422f12
cmp dword [ebp - 0x8c], 2
jne 0x422f12
cmp dword [ebp - 0x98], 4
jb 0x422f12
push edi
push 0x43b1a8
push edi
push 0x68
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [0x43b1a8]
pop edi
leave
ret

Function at 0x4241fb
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x7c], 0
je 0x42423f
push dword [ebp + 8]
call fcn.00428034
mov esi, eax
test esi, esi
je 0x42426a
lea eax, [ebp + 0x10]
push 4
push eax
push 4
push 0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test edi, edi
sete al
jmp 0x42426a
push dword [ebp + 0x10]
lea eax, [ebp - 0x10]
push 0x43483c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10]
push dword [esi + 0x90]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
pop edi
pop esi
leave
ret 0xc