joyce8/EMBER2024-capa huggingface dataset:
Function at 0xf5a8150
Capabilities:
Allocate or change rwx memory
Contain obfuscated stackstrings
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
push edi
push 0xf0000000
push 1
xor ebx, ebx
mov dword [ebp - 8], ecx
push ebx
push ebx
lea eax, [ebp - 4]
mov edi, edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0xf5a8269
xor ecx, ecx
lea ecx, [ecx]
lea eax, [ecx + 0x61]
mov word [ebp + ecx*2 - 0x64], ax
inc ecx
cmp ecx, 0x1a
jb 0xf5a8180
push 0x40
push 0x3000
lea ebx, [edi + 1]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0xf5a8272
cmp edi, ebx
jae 0xf5a8272
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x2c], 0x70797243
push eax
mov dword [ebp - 0x28], 0x6e654774
mov dword [ebp - 0x24], 0x646e6152
mov word [ebp - 0x20], 0x6d6f
mov byte [ebp - 0x1e], 0
mov dword [ebp - 0x1c], 0x61766441
mov dword [ebp - 0x18], 0x32336970
mov dword [ebp - 0x14], 0x6c6c642e
mov byte [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0xf5a8207
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0xf5a824e
lea ecx, [ebp - 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0xf5a824e
push esi
push edi
push dword [ebp - 4]
call eax
test eax, eax
je 0xf5a824e
xor ecx, ecx
test edi, edi
je 0xf5a8247
mov ebx, dword [ebp - 8]
mov dword [ebp - 0xc], 0x1a
movzx eax, byte [esi + ecx]
cdq
idiv dword [ebp - 0xc]
mov ax, word [ebp + edx*2 - 0x64]
mov word [ebx + ecx*2], ax
inc ecx
cmp ecx, edi
jb 0xf5a8231
mov ebx, 1
jmp 0xf5a8250
xor ebx, ebx
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0xf5a82a0
Capabilities:
Allocate or change rwx memory
Contain obfuscated stackstrings
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
push 0xf0000000
push 1
xor edi, edi
mov dword [ebp - 0xc], ecx
push edi
push edi
lea eax, [ebp - 4]
mov ebx, edx
push eax
mov dword [ebp - 8], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0xf5a8392
xor ecx, ecx
lea eax, [ecx + 0x61]
mov byte [ebp + ecx - 0x38], al
inc ecx
cmp ecx, 0x1a
jb 0xf5a82d0
push 0x40
push 0x3000
inc ebx
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0xf5a839b
cmp dword [ebp - 8], ebx
jae 0xf5a839b
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x2c], 0x70797243
push eax
mov dword [ebp - 0x28], 0x6e654774
mov dword [ebp - 0x24], 0x646e6152
mov word [ebp - 0x20], 0x6d6f
mov byte [ebp - 0x1e], 0
mov dword [ebp - 0x1c], 0x61766441
mov dword [ebp - 0x18], 0x32336970
mov dword [ebp - 0x14], 0x6c6c642e
mov byte [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0xf5a8355
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0xf5a8379
lea ecx, [ebp - 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0xf5a8379
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp - 4]
call eax
test eax, eax
mov ecx, 1
cmovne edi, ecx
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4027da
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
push 0
push 0x400000
call fcn.004015ac
mov dword [0x414040], eax
cmp dword [0x414014], 0
jne 0x403e75
push eax
call dword [sym.imp.MSVCR110_CLR0400.dll_exit]
push esi
mov esi, ecx
call dword [sym.imp.ole32.dll_CoReleaseServerProcess]
test eax, eax
jne 0x401692
mov dword [esi + 4], 1
pop esi
ret
call 0x40171c
push 0x14
push 0x402908
call fcn.00402010
and dword [ebp - 0x20], 0
call sub.MSVCR110_CLR0400.dll___crtGetShowWindowMode
movzx ebx, ax
and dword [ebp - 4], 0
mov eax, dword fs:[0x18]
mov edx, dword [eax + 4]
xor edi, edi
mov esi, 0x414148
mov ecx, edx
xor eax, eax
lock cmpxchg dword [esi], ecx
test eax, eax
jne 0x403dd8
xor esi, esi
inc esi
cmp dword [0x41414c], esi
je 0x403dea
cmp dword [0x41414c], 0
jne 0x402931
mov dword [0x41414c], esi
push 0x402904
push 0x4028f0
call sub.MSVCR110_CLR0400.dll__initterm_e
pop ecx
pop ecx
test eax, eax
jne 0x403df7
cmp dword [0x41414c], esi
jne 0x402879
push 0x4028ec
push 0x4028cc
call fcn.004a5000
pop ecx
pop ecx
mov dword [0x41414c], 2
test edi, edi
jne 0x402886
xor eax, eax
mov ecx, 0x414148
xchg dword [ecx], eax
cmp dword [0x414158], 0
jne 0x403e08
mov eax, dword [sym.imp.MSVCR110_CLR0400.dll__acmdln]
mov esi, dword [eax]
mov dword [ebp - 0x1c], esi
mov edi, dword [ebp - 0x20]
mov cl, byte [esi]
cmp cl, 0x20
jbe 0x402924
cmp cl, 0x22
je 0x403e2c
movzx eax, cl
push eax
call dword [sym.imp.MSVCR110_CLR0400.dll__ismbblead]
pop ecx
test eax, eax
jne 0x403e3d
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x4028a0
test cl, cl
je 0x40293c
test edi, edi
je 0x40293c
jmp 0x4028a7
mov dword [0x414268], esi
jmp 0x402856
mov al, byte [esi]
test al, al
je 0x401657
cmp al, 0x20
ja 0x401657
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x40293c
cmp eax, edx
jne 0x40280b
xor esi, esi
inc esi
mov edi, esi
jmp 0x40281e
push 0x1f
call sub.MSVCR110_CLR0400.dll__amsg_exit
pop ecx
jmp 0x402856
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x403e90
push 0x414158
call fcn.0040f0a8
pop ecx
test eax, eax
je 0x402893
push 0
push 2
push 0
call dword [0x414158]
jmp 0x402893
xor eax, eax
test edi, edi
sete al
mov edi, eax
mov dword [ebp - 0x20], edi
jmp 0x4028b0
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x4028c3
cmp dword [0x414268], 0
jne 0x403e89
call dword [sym.imp.MSVCR110_CLR0400.dll__cexit]
mov eax, dword [0x414040]
mov dword [ebp - 4], 0xfffffffe
call fcn.004017d6
ret
Function at 0x432005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
call 0x43200c
nop
nop
nop
nop
nop
pop eax
add eax, 0x40729f
nop
nop
sub eax, 0x407245
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
jl 0x432030
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
nop
jne 0x43201e
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0xf02de0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, 0xb68015
lea edi, [esi - 0x767015]
push edi
or ebp, 0xffffffff
jmp 0xf02e02
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0xf02e09
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xf02df8
mov eax, 1
add ebx, ebx
jne 0xf02e1b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0xf02e2c
jne 0xf02e4b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xf02e4b
dec eax
add ebx, ebx
jne 0xf02e38
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0xf02e10
add ebx, ebx
jne 0xf02e47
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0xf02e9d
xor ecx, ecx
sub eax, 3
jb 0xf02e63
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0xf02ed2
sar eax, 1
mov ebp, eax
jmp 0xf02e6e
add ebx, ebx
jne 0xf02e6e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xf02e3c
inc ecx
add ebx, ebx
jne 0xf02e7c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xf02e3c
add ebx, ebx
jne 0xf02e89
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0xf02e7e
jne 0xf02e9a
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0xf02e7e
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0xf02ebc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0xf02eae
jmp 0xf02dfe
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0xf02ebc
add edi, ecx
jmp 0xf02dfe
pop esi
mov edi, esi
mov ecx, 0x19820
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0xf02eda
cmp byte [edi], 0x4f
jne 0xf02eda
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0xf02edf
lea edi, [esi + 0xae4000]
mov eax, dword [edi]
or eax, eax
je 0xf02f4e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xb02000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xb02028]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0xf02f0c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xb02030]
or eax, eax
je 0xf02f48
mov dword [ebx], eax
add ebx, 4
jmp 0xf02f29
call dword [esi + 0xb0202c]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0xf02f88
cmp al, 0xef
ja 0xf02f72
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0xf02f54
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
or eax, eax
jne 0xf02f61
mov eax, dword [edi]
add edi, 4
jmp 0xf02f61
mov ebp, dword [esi + 0xb02034]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x19f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0xf02fbc
sub esp, 0xffffff80
jmp 0x469a70
Function at 0x40375d
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x410300
call fcn.00404484
mov edi, 0x94
mov eax, edi
call fcn.00406be0
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 [0x415298], ecx
mov eax, dword [esi + 4]
mov dword [0x4152a4], eax
mov edx, dword [esi + 8]
mov dword [0x4152a8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41529c], esi
cmp ecx, 2
je 0x4037bd
or esi, 0x8000
mov dword [0x41529c], esi
shl eax, 8
add eax, edx
mov dword [0x4152a0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4037f8
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4037f8
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x403810
cmp eax, 0x20b
je 0x4037fd
mov dword [ebp - 0x1c], esi
jmp 0x403824
cmp dword [ecx + 0x84], 0xe
jbe 0x4037f8
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40381e
cmp dword [ecx + 0x74], 0xe
jbe 0x4037f8
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.004047e8
pop ecx
test eax, eax
jne 0x403838
push 0x1c
call fcn.00403739
pop ecx
call fcn.00405e12
test eax, eax
jne 0x403849
push 0x10
call fcn.00403739
pop ecx
call fcn.00406b57
mov dword [ebp - 4], esi
call fcn.00406959
test eax, eax
jge 0x403862
push 0x1b
call fcn.00403714
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x416b58], eax
call fcn.00406837
mov dword [0x415118], eax
call fcn.00406795
test eax, eax
jge 0x403888
push 8
call fcn.00403714
pop ecx
call fcn.00406562
test eax, eax
jge 0x403899
push 9
call fcn.00403714
pop ecx
push 1
call fcn.00406084
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4038af
push eax
call fcn.00403714
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00406505
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4038d0
movzx eax, word [ebp - 0x40]
jmp 0x4038d3
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00402760
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4038f1
push edi
call fcn.004061b1
call fcn.004061d3
jmp 0x403923
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004044bf
ret
Function at 0x4060ee
Capabilities:
Terminate process

Disassembly:
push 8
push 0x410670
call fcn.00404484
push 8
call fcn.0040479d
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x4152d8], esi
jne 0x406122
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4152d4], esi
mov al, byte [ebp + 0x10]
mov byte [0x4152d0], al
cmp dword [ebp + 0xc], edi
jne 0x40616c
cmp dword [0x416b28], edi
je 0x40615c
mov eax, dword [0x416b24]
sub eax, 4
mov dword [0x416b24], eax
cmp eax, dword [0x416b28]
jb 0x40615c
mov eax, dword [eax]
cmp eax, edi
je 0x40613d
call eax
jmp 0x40613d
push 0x41404c
mov eax, 0x414044
call fcn.0040606c
pop ecx
push 0x414058
mov eax, 0x414050
call fcn.0040606c
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40619d
cmp dword [ebp + 0x10], edi
jne 0x4061ab
mov dword [0x4152d8], esi
push dword [ebp + 8]
call fcn.0040602a
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x4061aa
push 8
call fcn.004046e8
pop ecx
ret
call fcn.004044bf
ret

Function at 0x4061f1
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4140e0]
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 + 0x414240]
je 0x406226
inc eax
cmp eax, 0x13
jb 0x406217
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x414240]
jne 0x40634c
mov eax, dword [0x415120]
cmp eax, 1
je 0x406324
cmp eax, edx
jne 0x406256
cmp dword [0x4140fc], 1
je 0x406324
cmp ecx, 0xfc
je 0x40634c
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 0x40628c
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00407440
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00407190
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4062c0
mov eax, edi
push eax
call fcn.00407190
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4103bc
push edi
call fcn.00407540
add esp, 0x10
push edi
call fcn.00407190
push dword [esi + 0x414244]
mov ebx, eax
call fcn.00407190
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00406be0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00407440
push edi
push ebx
call fcn.00407450
push 0x4103b8
push ebx
call fcn.00407450
push dword [esi + 0x414244]
push ebx
call fcn.00407450
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00407345
add esp, 0x2c
jmp 0x40634c
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x414244]
push dword [esi]
call fcn.00407190
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.00403136
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x406d3c
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4140e0]
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 0x406d6d
xor eax, eax
jmp 0x406ef6
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 + 0x416a20]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x406da9
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040913f
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x406e84
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x406ec2
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 0x406e0d
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x406dfe
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 0x406dde
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 0x406e4d
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x406e56
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x406dcf
jmp 0x406e58
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x406ef1
cmp dword [ebp - 0x6c], edi
je 0x406ec2
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x406eb7
call fcn.00407928
mov dword [eax], 9
call fcn.00407931
mov dword [eax], esi
jmp 0x406eec
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 0x406eac
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x406e58
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x406e58
push dword [ebp - 0x6c]
call fcn.0040793a
pop ecx
jmp 0x406eec
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x406eda
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x406eda
xor eax, eax
jmp 0x406ef4
call fcn.00407928
mov dword [eax], 0x1c
call fcn.00407931
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x406ef4
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00403136
add ebp, 0x3a0
leave
ret
Function at 0x407345
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4153f0], ebx
push esi
push edi
jne 0x4073c5
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x407400
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x4153f0], eax
je 0x407400
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x4153f4], eax
call esi
cmp dword [0x415298], 2
mov dword [0x4153f8], eax
jne 0x4073c5
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x415400], eax
je 0x4073c5
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4153fc], eax
mov eax, dword [0x4153fc]
test eax, eax
je 0x40740a
call eax
test eax, eax
je 0x4073f1
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x415400]
test eax, eax
je 0x4073f1
test byte [ebp - 8], 1
jne 0x40740a
cmp dword [0x4152a4], 4
jb 0x407404
or byte [ebp + 0x12], 0x20
jmp 0x407429
xor eax, eax
jmp 0x407439
or byte [ebp + 0x12], 4
jmp 0x407429
mov eax, dword [0x4153f4]
test eax, eax
je 0x407429
call eax
mov ebx, eax
test ebx, ebx
je 0x407429
mov eax, dword [0x4153f8]
test eax, eax
je 0x407429
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4153f0]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407664
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 0x407692
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 0x407699
cmp ebx, dword [eax + 4]
jae 0x407699
xor eax, eax
jmp 0x407889
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4076aa
xor eax, eax
inc eax
jmp 0x407888
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4076c0
cmp ecx, edx
jae 0x407805
cmp dword [eax + 4], 0
je 0x4076c9
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4076b1
cmp dword [ebp + 8], 0
je 0x4076eb
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x407805
cmp eax, esi
jae 0x407805
mov eax, dword [0x415408]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x407710
cmp dword [esi*4 + 0x415410], edi
je 0x407809
inc esi
cmp esi, eax
jl 0x4076fe
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407885
cmp dword [ebp - 8], 0x1000000
jne 0x407885
test byte [ebp - 0xc], 0xcc
je 0x40778e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x407885
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407885
cmp word [eax + 0x18], 0x10b
jne 0x407885
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x407885
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40778e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40778e
test byte [ecx + 0x27], 0x80
jne 0x407805
push 1
push 0x415450
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4076a2
mov ecx, dword [0x415408]
test ecx, ecx
mov edx, ecx
jle 0x4077c2
lea eax, [ecx*4 + 0x41540c]
cmp dword [eax], edi
je 0x4077c2
dec edx
sub eax, 4
test edx, edx
jg 0x4077b6
test edx, edx
jne 0x4077f3
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4077cf
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4077e7
lea eax, [edx*4 + 0x415410]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4077d5
cmp ecx, 0x10
jge 0x4077f3
inc ecx
mov dword [0x415408], ecx
push 0
push 0x415450
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4076a2
xor eax, eax
jmp 0x407888
test esi, esi
jle 0x4076a2
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x415450
call ebx
test eax, eax
jne 0x4076a2
cmp dword [esi*4 + 0x415410], edi
je 0x40785f
mov eax, dword [0x415408]
lea esi, [eax - 1]
test esi, esi
jl 0x40784d
cmp dword [esi*4 + 0x415410], edi
je 0x407849
dec esi
jns 0x40783d
test esi, esi
jge 0x40785d
cmp eax, 0x10
jge 0x407858
inc eax
mov dword [0x415408], eax
lea esi, [eax - 1]
jmp 0x40785f
je 0x407877
xor ecx, ecx
test esi, esi
jl 0x407877
lea eax, [ecx*4 + 0x415410]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x407865
push 0
push 0x415450
call ebx
jmp 0x4076a2
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret