joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4022ad
Capabilities:
Check os version
Delete registry value
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
mov edi, 0x80000000
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
xor ebx, ebx
test eax, eax
jne 0x4023c8
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x108]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 4]
mov dword [ebp - 8], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4023aa
push dword [ebp + 0x10]
mov esi, dword [sym.imp.MSVCR90.dll_wcslen]
call esi
mov ebx, eax
lea eax, [ebp - 0x108]
push eax
call esi
pop ecx
pop ecx
cmp eax, ebx
jae 0x402321
lea eax, [ebp - 0x108]
push eax
jmp 0x402324
push dword [ebp + 0x10]
call esi
pop ecx
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.MSVCR90.dll_wcsncmp]
add esp, 0xc
xor ebx, ebx
test eax, eax
jne 0x4023aa
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x108]
push eax
push ebx
push ebx
mov esi, str.Winamp_Back
push esi
push dword [ebp - 4]
mov dword [ebp - 8], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x402389
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 4]
call fcn.004019bc
pop ecx
pop ecx
test eax, eax
jne 0x4023aa
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x4023aa
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
mov dword [ebp - 4], ebx
push edi
call fcn.00401a08
pop ecx
pop ecx
cmp dword [ebp - 4], ebx
je 0x4023b8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0x18], ebx
jne 0x4023c8
push dword [ebp + 0x10]
push edi
call fcn.00401a08
pop ecx
pop ecx
lea eax, [ebp - 0x21c]
mov esi, 0x114
push eax
mov dword [ebp - 0x21c], esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x4023f5
push esi
lea eax, [ebp - 0x21c]
push ebx
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp dword [ebp - 0x218], 6
pop edi
pop esi
pop ebx
jb 0x40244c
push dword [ebp + 0x14]
lea eax, [ebp - 0x41c]
push str.SoftwareClientsMedia_sCapabilitiesFileAssociations
push 0x200
push eax
call fcn.00401253
add esp, 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x41c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x40244c
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
leave
ret 0x14
Function at 0x402822
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
lea eax, [ebp - 0x198]
push eax
mov dword [ebp - 0x198], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40285b
push 0x114
push eax
lea eax, [ebp - 0x198]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp dword [ebp - 0x194], 6
jb 0x4028ba
push dword [ebp + 0x10]
lea eax, [ebp - 4]
push eax
mov eax, str.CapabilitiesURLAssociations
call fcn.00402533
pop ecx
pop ecx
test eax, eax
jne 0x4028ba
push dword [ebp + 0xc]
lea eax, [ebp - 0x84]
push 0x80
push eax
call fcn.00401c7b
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.USER32.dll_CharUpperW]
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.004019e1
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
leave
ret 0xc

Function at 0x4028c0
Capabilities:
Check os version
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
lea eax, [ebp - 0x118]
push eax
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x4028f9
push 0x114
push eax
lea eax, [ebp - 0x118]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp dword [ebp - 0x114], 6
jb 0x40292e
push dword [ebp + 0x10]
lea eax, [ebp - 4]
push eax
mov eax, str.CapabilitiesURLAssociations
call fcn.00402533
pop ecx
pop ecx
test eax, eax
jne 0x40292e
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
leave
ret 0xc

Function at 0x402c12
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
push esi
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
mov esi, 0x80000000
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x402c72
push dword [ebp + 0x14]
push dword [ebp - 4]
call fcn.004019bc
pop ecx
pop ecx
push 4
lea ecx, [ebp + 0x14]
push ecx
xor eax, eax
push 3
push eax
push str.EditFlags
push dword [ebp - 4]
mov byte [ebp + 0x14], al
mov byte [ebp + 0x15], al
mov byte [ebp + 0x16], 1
mov byte [ebp + 0x17], al
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
call edi
lea eax, [ebp - 4]
push eax
push str.DefaultIcon
push dword [ebp + 0x10]
push esi
call fcn.00402934
add esp, 0x10
test eax, eax
jne 0x402cbe
push dword [ebp + 0x18]
lea eax, [ebp - 0x24c]
push dword [ebp + 0xc]
push str._s__d
push 0x124
push eax
call fcn.0040121f
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 4]
call fcn.004019bc
add esp, 0x1c
push dword [ebp - 4]
call edi
lea eax, [ebp - 4]
push eax
push str._shell
push dword [ebp + 0x10]
push esi
call fcn.00402934
add esp, 0x10
test eax, eax
jne 0x402ce9
push dword [ebp + 0x1c]
push dword [ebp - 4]
call fcn.004019bc
pop ecx
pop ecx
push dword [ebp - 4]
call edi
pop edi
xor eax, eax
pop esi
leave
ret 0x18
Function at 0x402d7a
Capabilities:
Persist via autoplayhandlers registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x510
push esi
push edi
push dword [ebp + 0x10]
lea eax, [ebp - 0x208]
push dword [ebp + 0xc]
push str.__s____d
push 0x208
push eax
call fcn.00401253
push dword [ebp + 0xc]
lea eax, [ebp - 0x510]
push str.__s___1
push 0x308
push eax
call fcn.00401253
add esp, 0x24
lea eax, [ebp + 0x10]
push eax
push str.DVD_shell
mov esi, 0x80000000
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x402dee
push dword [ebp + 0x18]
push dword [ebp + 0x10]
call fcn.004019bc
pop ecx
pop ecx
push dword [ebp + 0x10]
call edi
push ebx
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
mov ebx, str.DVD_shell_
push ebx
push esi
call fcn.00402934
add esp, 0x10
test eax, eax
jne 0x402e1b
push dword [ebp + 0x20]
push dword [ebp + 0x10]
call fcn.004019bc
pop ecx
pop ecx
push dword [ebp + 0x10]
call edi
lea eax, [ebp + 0x10]
push eax
push str.command
push dword [ebp + 0x18]
push ebx
push esi
call fcn.00402971
add esp, 0x14
pop ebx
test eax, eax
jne 0x402e4c
lea eax, [ebp - 0x510]
push eax
push dword [ebp + 0x10]
call fcn.004019bc
pop ecx
pop ecx
push dword [ebp + 0x10]
call edi
lea eax, [ebp + 0x10]
push eax
push str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerAutoplayHandlersEventHandlersPlayDVDMovieOnArrival
mov esi, 0x80000002
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x402e7b
push eax
push eax
push 1
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp + 0x10]
call edi
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x14]
push str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerAutoplayHandlersHandlers_
push esi
call fcn.00402934
add esp, 0x10
test eax, eax
jne 0x402ef2
push dword [ebp + 0x20]
push str.Action
push dword [ebp + 0x10]
call fcn.004019e1
lea eax, [ebp - 0x208]
push eax
push 0x404c6c
push dword [ebp + 0x10]
call fcn.004019e1
push 0x404e1c
push str.InvokeProgID
push dword [ebp + 0x10]
call fcn.004019e1
push dword [ebp + 0x18]
push str.InvokeVerb
push dword [ebp + 0x10]
call fcn.004019e1
push dword [ebp + 0x1c]
push str.Provider
push dword [ebp + 0x10]
call fcn.004019e1
add esp, 0x3c
push dword [ebp + 0x10]
call edi
pop edi
xor eax, eax
pop esi
leave
ret 0x1c

Function at 0x4030b5
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x22c], ax
lea eax, [ebp - 0x22a]
push eax
call sub.MSVCR90.dll_memset
push 0x1e
lea eax, [ebp - 0x20]
push 0
push eax
call sub.MSVCR90.dll_memset
push dword [ebp + 0xc]
lea eax, [ebp - 0x22c]
push str._s
push 0x104
push eax
call fcn.0040121f
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
mov eax, 0x1610
mov word [ebp - 0x10], ax
add esp, 0x28
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x1c], 1
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
neg eax
sbb eax, eax
and eax, 0x80004005
leave
ret 0xc
Function at 0x403138
Capabilities:
Delete registry value
Validate payment card number using luhn algorithm

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push esi
xor esi, esi
push esi
lea eax, [ebp - 4]
push eax
push esi
push 0x2001f
push esi
push esi
push esi
push str.SOFTWARENullsoftWinamp
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x403252
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
cmp word [eax], si
je 0x403189
push eax
push str.regname
push dword [ebp - 4]
call fcn.004019e1
add esp, 0xc
jmp 0x403193
push str.regname
push dword [ebp - 4]
call edi
mov eax, dword [ebp + 0x10]
cmp word [eax], si
je 0x40323a
push eax
push 0x20
lea eax, [ebp - 0x46]
push eax
call fcn.00401c49
xor edi, edi
push 0x7e
pop eax
inc edi
mov word [ebp - 0x48], ax
cmp word [ebp - 0x46], si
je 0x403224
push ebx
push 0x1b
lea esi, [ebp - 0x46]
pop ebx
movzx eax, word [esi]
push eax
call dword [sym.imp.MSVCR90.dll_towupper]
movzx eax, ax
pop ecx
lea ecx, [eax - 0x41]
cmp cx, 0x19
ja 0x4031eb
movzx eax, ax
lea eax, [eax + edi - 0x41]
push 0x1a
cdq
pop ecx
idiv ecx
add edx, 0x41
jmp 0x403204
lea ecx, [eax - 0x30]
cmp cx, 9
ja 0x403209
movzx eax, ax
lea eax, [eax + ebx - 0x30]
push 0xa
cdq
pop ecx
idiv ecx
add edx, 0x61
mov word [esi], dx
jmp 0x403215
cmp ax, 0x2d
jne 0x403215
push 0x2f
pop eax
mov word [esi], ax
inc edi
lea esi, [ebp + edi*2 - 0x48]
add ebx, 0x1b
cmp word [esi], 0
jne 0x4031c2
pop ebx
lea eax, [ebp - 0x48]
push eax
push str.regkey
push dword [ebp - 4]
call fcn.004019e1
add esp, 0xc
jmp 0x403244
push str.regkey
push dword [ebp - 4]
call edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
jmp 0x403257
mov eax, 0x80004005
pop esi
leave
ret 0xc

Function at 0x40333e
Capabilities:
Check os version
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
lea eax, [ebp - 0x114]
push eax
mov dword [ebp - 0x114], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x403377
push 0x114
push eax
lea eax, [ebp - 0x114]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp dword [ebp - 0x110], 6
jb 0x4033bd
push dword [ebp + 0xc]
lea eax, [ebp + 0xc]
push eax
mov eax, str.CapabilitiesFileAssociations
call fcn.00402533
pop ecx
pop ecx
test eax, eax
jne 0x4033bd
push dword [ebp + 0x14]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp + 0x10]
push dword [ebp + 0x14]
push dword [ebp + 0xc]
call fcn.004019e1
add esp, 0xc
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
leave
ret 0x10
Function at 0x401000
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 0xc]
push 5
push 0
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
ret 0x10

Function at 0x401020
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x402004
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x404048], eax
xor eax, eax
mov al, byte [0x404049]
mov dword [0x404054], eax
mov eax, dword [0x404048]
shr dword [0x404048], 0x10
and eax, 0xff
mov dword [0x404050], eax
shl eax, 8
add eax, dword [0x404054]
mov dword [0x40404c], eax
call fcn.00401fc0
test eax, eax
jne 0x401094
push 0x1c
call fcn.004011c0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00401de0
call fcn.00401dd0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x405080], eax
call fcn.00401980
mov dword [0x404028], eax
test eax, eax
je 0x4010c7
cmp dword [0x405080], 0
jne 0x4010d1
push 0xffffffffffffffff
call fcn.00401220
add esp, 4
call fcn.00401700
call fcn.00401610
call fcn.004011f0
mov esi, dword [0x405080]
mov al, byte [esi]
cmp al, 0x22
je 0x4010f8
cmp al, 0x20
jbe 0x401125
inc esi
cmp byte [esi], 0x20
ja 0x4010f0
jmp 0x401125
inc esi
cmp byte [esi], 0x22
je 0x401124
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x40111f
xor eax, eax
mov al, bl
push eax
call fcn.004015b0
add esp, 4
test eax, eax
je 0x401119
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x401101
cmp byte [esi], 0x22
jne 0x401125
inc esi
cmp byte [esi], 0
je 0x401135
cmp byte [esi], 0x20
ja 0x401135
inc esi
cmp byte [esi], 0
jne 0x40112a
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x401159
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.00401220
jmp 0x40119a
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401260
Capabilities:
Terminate process

Disassembly:
cmp dword [0x404084], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40127e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x404080], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x40407c], bl
jne 0x4012d8
cmp dword [0x405078], 0
je 0x4012c6
mov edi, dword [0x405074]
sub edi, 4
cmp edi, dword [0x405078]
jb 0x4012c6
mov eax, dword [edi]
test eax, eax
je 0x4012bb
call eax
sub edi, 4
cmp edi, dword [0x405078]
jae 0x4012b3
push 0x404014
push 0x404010
call fcn.00401310
add esp, 8
push 0x40401c
push 0x404018
call fcn.00401310
add esp, 8
test ebx, ebx
jne 0x4012ff
mov dword [0x404084], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x401980
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x404128], ebx
jne 0x4019cf
call esi
cmp eax, ebx
mov edi, eax
je 0x4019ad
mov dword [0x404128], 1
jmp 0x4019cf
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x4019c5
mov dword [0x404128], 2
jmp 0x4019cf
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x404128], 1
jne 0x401a7e
test edi, edi
jne 0x4019f2
call esi
mov edi, eax
test edi, edi
jne 0x4019f2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x401a0c
add esi, 2
cmp word [esi], 0
jne 0x4019fa
add esi, 2
cmp word [esi], 0
jne 0x4019fa
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x401a6d
push ebp
call fcn.00402370
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x401a6d
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x401a5c
push ebx
call fcn.00402320
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x404128], 2
jne 0x401b02
test ebx, ebx
jne 0x401aa1
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x401aa1
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x401ab6
inc ebp
cmp byte [ebp], 0
jne 0x401aa8
inc ebp
cmp byte [ebp], 0
jne 0x401aa8
sub ebp, ebx
inc ebp
push ebp
call fcn.00402370
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x401adb
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x402120
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x404358
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x402147
add eax, 8
inc ecx
cmp eax, 0x4043e8
jb 0x402138
cmp dword [ecx*8 + 0x404358], edx
lea ebx, [ecx*8]
jne 0x40230b
cmp dword [0x404034], 1
je 0x4022c7
cmp dword [0x404034], 0
jne 0x40217e
cmp dword [0x404038], 1
je 0x4022c7
cmp edx, 0xfc
je 0x40230b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x4021bb
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x4021ff
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x4032e0
push ebp
call fcn.00402c20
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4032c0
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x40435c]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00402b80
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x404f70], 0
je 0x4022dd
mov eax, dword [0x404f70]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x4022e7
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x40435c]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x401000
Capabilities:
Access peb ldr_data
Create process memory minidump
Delete file
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x44e518
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebp
push esi
push edi
mov eax, dword [0x46414c]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov eax, dword [0x46ecec]
mov edx, dword [eax + 0xc]
mov ecx, 0x46ecec
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], 0
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call ebp
push eax
push 0x45b440
lea edi, [esp + 0x1c]
call fcn.004018c0
mov eax, dword [0x46ecec]
mov edx, dword [eax + 0xc]
add esp, 8
mov ecx, 0x46ecec
call edx
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
mov byte [esp + 0x30], 1
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x40109f
mov ecx, 0x104
lea eax, [esp + 0x10]
call fcn.00401680
mov esi, dword [esp + 0x10]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004240ad
add esp, 8
test eax, eax
jl 0x4011f9
cmp eax, dword [esi - 8]
jg 0x4011f9
xor ecx, ecx
mov dword [esi - 0xc], eax
lea edx, [esp + 0x18]
mov word [esi + eax*2], cx
push 0x45b448
push edx
lea ecx, [esp + 0x1c]
call fcn.004014c0
add esp, 8
mov byte [esp + 0x30], 2
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea eax, [esp + 0x18]
push eax
call fcn.004016d0
mov byte [esp + 0x30], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401125
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0xb
push 0x45b44c
lea ecx, [esp + 0x18]
push ecx
call fcn.004016d0
mov edi, dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40119d
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [esp + 0x38]
push 0
push 0
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
push 0
push esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.dbghelp.dll_MiniDumpWriteDump
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [edi - 0x10]
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4011be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4011e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x24
ret
push 0x80070057
call fcn.00401960
int3