joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403e50
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
xor esi, esi
cmp eax, 0x66767274
push edi
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
je 0x403e87
cmp eax, 0x72636e74
jne 0x403e8c
mov esi, str.SoftwareApple_Computer__Inc.QuickTimeRecent_Movies
jmp 0x403e8c
mov esi, str.SoftwareApple_Computer__Inc.QuickTimeFavorite_Movies
lea eax, [ebp - 0x18]
push eax
push 0x20019
push ebx
push str.SoftwareApple_Computer__Inc.QuickTimeRecent_Movies
push 0x80000002
mov dword [ebp - 0x18], ebx
call fcn.00404d10
add esp, 0x14
test eax, eax
jne 0x403eb9
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0xc]
push edx
push 0x20019
push ebx
push esi
push 0x80000002
call fcn.00404d10
add esp, 0x14
test eax, eax
jne 0x40401c
mov edx, dword [ebp - 0xc]
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x404012
mov esi, dword [ebp - 0x10]
cmp esi, ebx
mov dword [ebp - 0x18], ebx
jbe 0x404012
mov edi, dword [ebp - 0x14]
cmp edi, ebx
jbe 0x404012
inc esi
mov eax, esi
add eax, 3
inc edi
and eax, 0xfffffffc
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
call fcn.0040c0a0
mov eax, edi
add eax, 3
and eax, 0xfffffffc
mov dword [ebp - 0x1c], esp
call fcn.0040c0a0
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0x1c]
test esi, esi
mov ebx, esp
mov dword [ebp - 4], edi
je 0x404012
test ebx, ebx
je 0x404012
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
push ebx
push 0
push 0
lea ecx, [ebp - 8]
push ecx
push esi
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x404012
mov edi, dword [ebp + 8]
lea ebx, [ebx]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
inc ecx
test eax, eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], 0
jbe 0x403fe2
mov eax, dword [ebp - 4]
test eax, eax
jbe 0x403fe2
lea eax, [ebp - 0x1c]
push eax
push 0x41695c
push ebx
call fcn.0040c99e
mov eax, dword [ebp - 0x1c]
add esp, 0xc
dec eax
je 0x403fbe
dec eax
jne 0x403fc3
mov edi, 0x616c6973
jmp 0x403fc3
mov edi, 0x75726c20
push 0x2c
push ebx
call fcn.0040c8e0
add esp, 8
test eax, eax
je 0x403fe2
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x20]
inc eax
push eax
push esi
push edi
call fcn.00403840
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [ebp - 0xc]
push ebx
push 0
push 0
mov dword [ebp - 8], edx
lea edx, [ebp - 8]
push edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x18]
push esi
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
je 0x403f80
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea esp, [ebp - 0x2c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4045c0
Capabilities:
Check mutex on windows

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x484]
mov eax, 1
cmp ecx, eax
jne 0x40464b
cmp dword [esi + 8], 0x4000000
jl 0x404610
push 0
mov ecx, esi
call fcn.004044d0
cmp dword [esi + 8], 0x4100000
jge 0x4045f4
mov ecx, esi
call fcn.00402d40
push 0
call fcn.004053d0
mov eax, dword [esi + 8]
add esp, 4
cmp eax, 0x5500000
jge 0x40464b
mov ecx, esi
pop esi
jmp fcn.00404320
cmp dword [esi + 0x478], eax
jne 0x404643
call fcn.00403da0
test eax, eax
jne 0x40464b
push 0x10000000
call fcn.00405130
add esp, 4
test ax, ax
jne 0x40464b
push 0
call fcn.004053d0
add esp, 4
pop esi
jmp fcn.00405230
mov ecx, esi
pop esi
jmp fcn.00402c00
pop esi
ret

Function at 0x404650
Capabilities:
Check mutex on windows

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x484]
mov eax, 1
cmp ecx, eax
jne 0x4046d1
cmp dword [esi + 8], 0x5000000
jl 0x404693
push 0
mov ecx, esi
call fcn.004044d0
push 0x7563686b
call fcn.004053d0
mov eax, dword [esi + 8]
add esp, 4
cmp eax, 0x5500000
jge 0x4046d1
mov ecx, esi
pop esi
jmp fcn.00404320
cmp dword [esi + 0x478], eax
jne 0x4046c9
call fcn.00403da0
test eax, eax
jne 0x4046d1
push 0x10000000
call fcn.00405130
add esp, 4
test ax, ax
jne 0x4046d1
push 0x7563686b
call fcn.004053d0
add esp, 4
pop esi
jmp fcn.00405230
mov ecx, esi
pop esi
jmp fcn.00402c00
pop esi
ret

Function at 0x4046e0
Capabilities:
Check mutex on windows
Create process on windows

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x484]
mov eax, 1
cmp ecx, eax
jne 0x404771
cmp dword [esi + 8], 0x4000000
jl 0x404733
push 0
mov ecx, esi
call fcn.004044d0
cmp dword [esi + 8], 0x4100000
jge 0x404714
mov ecx, esi
call fcn.00402d40
push 0x73617373
call fcn.004053d0
mov eax, dword [esi + 8]
add esp, 4
cmp eax, 0x5500000
jge 0x404771
mov ecx, esi
pop esi
jmp fcn.00404320
cmp dword [esi + 0x478], eax
jne 0x404769
call fcn.00403da0
test eax, eax
jne 0x404771
push 0x10000000
call fcn.00405130
add esp, 4
test ax, ax
jne 0x404771
push 0x73617373
call fcn.004053d0
add esp, 4
pop esi
jmp fcn.00405230
mov ecx, esi
pop esi
jmp fcn.00402c00
pop esi
ret

Function at 0x404f50
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
test ebx, ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
je 0x404f63
mov dword [ebx], 0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x404f71
mov dword [eax], 0
lea eax, [esp + 0xc]
push eax
push ebp
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
test esi, esi
je 0x404fd7
push edi
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
push esi
push 0
push ebp
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x404fcf
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x10]
push edx
push 0x416674
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x404fcf
test ebx, ebx
mov ecx, dword [esp + 0xc]
je 0x404fc2
mov eax, dword [ecx + 8]
mov dword [ebx], eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404fcf
mov ecx, dword [ecx + 0xc]
mov dword [eax], ecx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
add esp, 0xc
ret
Function at 0x405130
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x100
push esi
push edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0xc]
push str.QTMLInitTermMutex_lx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 8]
push ecx
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
test edi, edi
je 0x405170
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x419fe0]
test eax, eax
jle 0x405181
inc eax
mov dword [0x419fe0], eax
jmp 0x4051da
push str.QuickTime.qts
call fcn.004028b0
add esp, 4
test eax, eax
mov dword [0x419fe4], eax
jne 0x4051f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xfffff7d3
mov eax, dword [0x419fe4]
test eax, eax
je 0x4051bc
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x419fe4], 0
mov eax, 0x404f40
mov dword [0x419040], 0x4050d0
mov dword [0x419050], eax
mov dword [0x419054], eax
mov dword [0x41904c], eax
test edi, edi
je 0x4051ec
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov ax, si
pop esi
add esp, 0x100
ret
call fcn.004050d0
mov esi, eax
test si, si
jne 0x4051a2
mov edx, dword [esp + 0x10c]
push edx
call fcn.00404f10
add esp, 4
mov esi, eax
test si, si
jne 0x4051a2
inc dword [0x419fe0]
jmp 0x4051da

Function at 0x405230
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x100
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 8]
push str.QTMLInitTermMutex_lx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 4]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
je 0x40526f
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x419fe0]
test eax, eax
jg 0x405284
mov dword [0x419fe0], 0
jmp 0x4052be
dec eax
test eax, eax
mov dword [0x419fe0], eax
jg 0x4052be
call fcn.00404f20
mov edx, dword [0x419fe4]
mov eax, 0x404f40
push edx
mov dword [0x419040], 0x4050d0
mov dword [0x419050], eax
mov dword [0x419054], eax
mov dword [0x41904c], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
je 0x4052d0
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
add esp, 0x100
ret
Function at 0x40bf26
Capabilities:
Terminate process

Disassembly:
push 8
push 0x416a40
call fcn.0040de50
push 8
call fcn.0040e5b5
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x41a038], esi
jne 0x40bf5a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x41a034], esi
mov al, byte [ebp + 0x10]
mov byte [0x41a030], al
cmp dword [ebp + 0xc], edi
jne 0x40bfa4
cmp dword [0x41a82c], edi
je 0x40bf94
mov eax, dword [0x41a828]
sub eax, 4
mov dword [0x41a828], eax
cmp eax, dword [0x41a82c]
jb 0x40bf94
mov eax, dword [eax]
cmp eax, edi
je 0x40bf75
call eax
jmp 0x40bf75
push 0x41902c
mov eax, 0x419024
call fcn.0040bea4
pop ecx
push 0x419038
mov eax, 0x419030
call fcn.0040bea4
pop ecx
or dword [ebp - 4], 0xffffffff
call fcn.0040bfd5
cmp dword [ebp + 0x10], edi
jne 0x40bfe3
mov dword [0x41a038], esi
push dword [ebp + 8]
call fcn.0040be62
xor edi, edi
xor esi, esi
inc esi
call fcn.0040de8b
ret

Function at 0x40c288
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40c2a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040eac6
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x40c2cb
test byte [esp + 8], 2
je 0x40c2cb
call fcn.0040eab4
mov dword [eax], 0xd
call fcn.0040eabd
mov dword [eax], 5
jmp 0x40c2a4
xor eax, eax
ret
Function at 0x40ca1b
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x416a60
call fcn.0040de50
mov edi, 0x94
mov eax, edi
call fcn.0040c0a0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x419ff8], ecx
mov eax, dword [esi + 4]
mov dword [0x41a004], eax
mov edx, dword [esi + 8]
mov dword [0x41a008], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x419ffc], esi
cmp ecx, 2
je 0x40ca7b
or esi, 0x8000
mov dword [0x419ffc], esi
shl eax, 8
add eax, edx
mov dword [0x41a000], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40cab6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40cab6
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40cace
cmp eax, 0x20b
je 0x40cabb
mov dword [ebp - 0x1c], esi
jmp 0x40cae2
cmp dword [ecx + 0x84], 0xe
jbe 0x40cab6
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40cadc
cmp dword [ecx + 0x74], 0xe
jbe 0x40cab6
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00410a3d
pop ecx
test eax, eax
jne 0x40caf6
push 0x1c
call fcn.0040c9f7
pop ecx
call fcn.0040d424
test eax, eax
jne 0x40cb07
push 0x10
call fcn.0040c9f7
pop ecx
call fcn.0040e6d8
mov dword [ebp - 4], esi
call fcn.0040dfa5
test eax, eax
jge 0x40cb20
push 0x1b
call fcn.0040c9d2
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41a820], eax
call fcn.00410901
mov dword [0x41a03c], eax
call fcn.0041085f
test eax, eax
jge 0x40cb46
push 8
call fcn.0040c9d2
pop ecx
call fcn.0041062c
test eax, eax
jge 0x40cb57
push 9
call fcn.0040c9d2
pop ecx
push 1
call fcn.0040bebc
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40cb6d
push eax
call fcn.0040c9d2
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004105cf
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40cb8e
movzx eax, word [ebp - 0x40]
jmp 0x40cb91
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004023e0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40cbaf
push edi
call fcn.0040bfe9
call fcn.0040c00b
jmp 0x40cbe1
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040de8b
ret
Function at 0x40e9d1
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040c0a0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ea6c
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x419ff8]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40ea6c
cmp eax, 1
je 0x40ea8d
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ea6c
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40ea39
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40ea68
xor eax, eax
inc eax
jmp 0x40eaac
cmp edi, eax
jae 0x40ea70
xor eax, eax
jmp 0x40eaac
cmp eax, esi
jae 0x40ea77
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x419ff8]
jmp 0x40ea90
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4102bb
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x41976c]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x419780]
je 0x4102f0
inc eax
cmp eax, 0x13
jb 0x4102e1
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x419780]
jne 0x410416
mov eax, dword [0x41a044]
cmp eax, 1
je 0x4103ee
cmp eax, edx
jne 0x410320
cmp dword [0x4192f4], 1
je 0x4103ee
cmp ecx, 0xfc
je 0x410416
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x410356
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040e820
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00410230
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41038a
mov eax, edi
push eax
call fcn.00410230
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4171e8
push edi
call fcn.0040c2d0
add esp, 0x10
push edi
call fcn.00410230
push dword [esi + 0x419784]
mov ebx, eax
call fcn.00410230
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040c0a0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040e820
push edi
push ebx
call fcn.0040e830
push 0x4171c8
push ebx
call fcn.0040e830
push dword [esi + 0x419784]
push ebx
call fcn.0040e830
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00413d64
add esp, 0x2c
jmp 0x410416
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x419784]
push dword [esi]
call fcn.00410230
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00411a4e
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4122e5
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x412313
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x41231a
cmp ebx, dword [eax + 4]
jae 0x41231a
xor eax, eax
jmp 0x41250a
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x41232b
xor eax, eax
inc eax
jmp 0x412509
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x412341
cmp ecx, edx
jae 0x412486
cmp dword [eax + 4], 0
je 0x41234a
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x412332
cmp dword [ebp + 8], 0
je 0x41236c
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x412486
cmp eax, esi
jae 0x412486
mov eax, dword [0x41a358]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x412391
cmp dword [esi*4 + 0x41a360], edi
je 0x41248a
inc esi
cmp esi, eax
jl 0x41237f
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x412506
cmp dword [ebp - 8], 0x1000000
jne 0x412506
test byte [ebp - 0xc], 0xcc
je 0x41240f
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x412506
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x412506
cmp word [eax + 0x18], 0x10b
jne 0x412506
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x412506
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41240f
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41240f
test byte [ecx + 0x27], 0x80
jne 0x412486
push 1
push 0x41a3a0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x412323
mov ecx, dword [0x41a358]
test ecx, ecx
mov edx, ecx
jle 0x412443
lea eax, [ecx*4 + 0x41a35c]
cmp dword [eax], edi
je 0x412443
dec edx
sub eax, 4
test edx, edx
jg 0x412437
test edx, edx
jne 0x412474
push 0xf
pop ebx
cmp ecx, ebx
jg 0x412450
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x412468
lea eax, [edx*4 + 0x41a360]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x412456
cmp ecx, 0x10
jge 0x412474
inc ecx
mov dword [0x41a358], ecx
push 0
push 0x41a3a0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x412323
xor eax, eax
jmp 0x412509
test esi, esi
jle 0x412323
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41a3a0
call ebx
test eax, eax
jne 0x412323
cmp dword [esi*4 + 0x41a360], edi
je 0x4124e0
mov eax, dword [0x41a358]
lea esi, [eax - 1]
test esi, esi
jl 0x4124ce
cmp dword [esi*4 + 0x41a360], edi
je 0x4124ca
dec esi
jns 0x4124be
test esi, esi
jge 0x4124de
cmp eax, 0x10
jge 0x4124d9
inc eax
mov dword [0x41a358], eax
lea esi, [eax - 1]
jmp 0x4124e0
je 0x4124f8
xor ecx, ecx
test esi, esi
jl 0x4124f8
lea eax, [ecx*4 + 0x41a360]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4124e6
push 0
push 0x41a3a0
call ebx
jmp 0x412323
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x413184
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x41976c]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x4131b5
xor eax, eax
jmp 0x41333e
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x41a720]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4131f1
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00414aae
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4132cc
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x41330a
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x413255
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x413246
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x413226
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x413295
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x41329e
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x413217
jmp 0x4132a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x413339
cmp dword [ebp - 0x6c], edi
je 0x41330a
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x4132ff
call fcn.0040eab4
mov dword [eax], 9
call fcn.0040eabd
mov dword [eax], esi
jmp 0x413334
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4132f4
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x4132a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x4132a0
push dword [ebp - 0x6c]
call fcn.0040eac6
pop ecx
jmp 0x413334
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x413322
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x413322
xor eax, eax
jmp 0x41333c
call fcn.0040eab4
mov dword [eax], 0x1c
call fcn.0040eabd
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x41333c
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00411a4e
add ebp, 0x3a0
leave
ret
Function at 0x413d64
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41a3b4], ebx
push esi
push edi
jne 0x413de4
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x413e1f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4179a4
push edi
call esi
test eax, eax
mov dword [0x41a3b4], eax
je 0x413e1f
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x41a3b8], eax
call esi
cmp dword [0x419ff8], 2
mov dword [0x41a3bc], eax
jne 0x413de4
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41a3c4], eax
je 0x413de4
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x41a3c0], eax
mov eax, dword [0x41a3c0]
test eax, eax
je 0x413e29
call eax
test eax, eax
je 0x413e10
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41a3c4]
test eax, eax
je 0x413e10
test byte [ebp - 8], 1
jne 0x413e29
cmp dword [0x41a004], 4
jb 0x413e23
or byte [ebp + 0x12], 0x20
jmp 0x413e48
xor eax, eax
jmp 0x413e58
or byte [ebp + 0x12], 4
jmp 0x413e48
mov eax, dword [0x41a3b8]
test eax, eax
je 0x413e48
call eax
mov ebx, eax
test ebx, ebx
je 0x413e48
mov eax, dword [0x41a3bc]
test eax, eax
je 0x413e48
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41a3b4]
pop edi
pop esi
pop ebx
leave
ret