joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404f50
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x14
mov eax, dword [0x4131c0]
push ebx
push ebp
push esi
push edi
mov ebx, ecx
xor ebp, ebp
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x10], eax
mov edx, dword [ebx]
push 0
push 0
lea ecx, [ebp + 0x101]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebx]
push 0
lea eax, [esp + 0x18]
push eax
push 5
lea ecx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404fd4
mov ecx, 5
mov edi, str.ustar
lea esi, [esp + 0x18]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x404fc2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x404fe7
mov eax, dword [esp + 0x10]
add ebp, 0x100
cmp ebp, eax
jb 0x404f72
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x10]
call fcn.00407a6e
add esp, 0x14
ret
mov eax, dword [ebx]
push 0
push 0
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
call fcn.00407a6e
add esp, 0x14
ret

Function at 0x405090
Capabilities:
Delete file

Disassembly:
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x28]
cmp esi, dword [edi + 0x2c]
je 0x4050bf
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esi + 0x18], 0x10
jb 0x4050af
mov eax, dword [esi + 4]
jmp 0x4050b2
lea eax, [esi + 4]
push eax
call ebx
mov eax, dword [edi + 0x2c]
add esi, 0x1c
cmp esi, eax
jne 0x4050a4
mov eax, dword [edi + 0x28]
lea esi, [edi + 0x24]
xor ebx, ebx
cmp eax, ebx
je 0x4050e7
mov ecx, dword [esp + 0xc]
mov edx, dword [esi + 8]
push ecx
push esi
push edx
push eax
call fcn.00401f90
mov eax, dword [esi + 4]
push eax
call fcn.00407edd
add esp, 0x14
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
cmp dword [edi + 0x1c], 0x10
jb 0x405102
mov ecx, dword [edi + 8]
push ecx
call fcn.00407edd
add esp, 4
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], 0xf
mov byte [edi + 8], bl
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x405120
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x40f38b
push eax
mov eax, 0x4022c
mov dword fs:[0], esp
call fcn.00407a00
mov eax, dword [0x4131c0]
push ebp
push 0
mov dword [esp + 0x40230], eax
lea eax, [esp + 0xc]
push eax
mov ebp, ecx
mov edx, dword [ebp]
push 0x200
lea ecx, [esp + 0x38]
push ecx
push edx
mov byte [esp + 0x1b], 1
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405362
cmp dword [esp + 8], 0x200
jne 0x405362
push esi
push edi
mov ecx, 5
mov edi, 0x410528
lea esi, [esp + 0x135]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4051a2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4051d8
mov eax, dword [esp + 0x40248]
mov byte [eax], 1
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 0x40230]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x4022c]
pop ebp
call fcn.00407a6e
add esp, 0x40238
ret 4
mov ecx, 5
mov edi, str.ustar
lea esi, [esp + 0x135]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4051f4
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x405261
push 0x410304
lea ecx, [ebp + 4]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.004023c0
add esp, 0xc
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x40244], 0
call fcn.00402100
cmp dword [esp + 0x30], 0x10
mov eax, dword [esp + 0x1c]
jae 0x405236
lea eax, [esp + 0x1c]
push 0
push 0x100
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x405268
lea ecx, [esp + 0x18]
call fcn.004017b0
xor al, al
jmp 0x4051b2
push ebx
push 8
lea ecx, [esp + 0xb8]
push 0
push ecx
call fcn.00408517
mov edx, dword [ebp]
add esp, 0xc
push 1
push 0
push 0
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, edi
neg ebx
and ebx, 0x1ff
add eax, edi
add ebx, eax
test edi, edi
jbe 0x4052f4
mov esi, 0x40000
cmp edi, esi
jae 0x4052ac
mov esi, edi
mov edx, dword [ebp]
push 0
lea eax, [esp + 0x18]
push eax
push esi
lea ecx, [esp + 0x244]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4052ef
mov edx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x18]
push eax
push esi
lea ecx, [esp + 0x244]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4052ef
sub edi, esi
jne 0x4052a1
jmp 0x4052f4
mov byte [esp + 0x13], 0
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
test al, al
je 0x40533b
mov al, byte [ebp + 0x20]
test al, al
je 0x40531b
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [ebp + 0x24]
call fcn.00403bc0
mov eax, dword [ebp + 0x34]
test eax, eax
je 0x40533b
cmp dword [esp + 0x34], 0x10
mov ecx, dword [esp + 0x20]
jae 0x405331
lea ecx, [esp + 0x20]
mov edx, dword [ebp + 0x38]
push ecx
push edx
call eax
add esp, 8
cmp ebx, 0xffffffff
je 0x40534f
mov eax, dword [ebp]
push 0
push 0
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x1c]
call fcn.004017b0
mov al, byte [esp + 0x13]
pop ebx
jmp 0x4051b2
xor al, al
jmp 0x4051b4
Function at 0x405720
Capabilities:
Read file via mapping

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0xc]
test eax, eax
push edi
je 0x405739
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esi + 0xc], 0
mov eax, dword [esi + 8]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x405750
push eax
call edi
mov dword [esi + 8], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x405762
push eax
call edi
mov dword [esi + 4], 0xffffffff
mov eax, dword [esp + 0xc]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x4057c9
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esi + 8], eax
je 0x4057c2
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [esi + 0xc], eax
je 0x4057bc
pop edi
mov al, 1
pop esi
ret 4
mov ecx, dword [esi + 8]
push ecx
call edi
mov ecx, esi
call fcn.004055c0
pop edi
xor al, al
pop esi
ret 4

Function at 0x4057d0
Capabilities:
Parse pe header

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
test ebx, ebx
push edi
mov edi, ecx
je 0x4057e2
cmp dword [edi + 4], 0xffffffff
jne 0x4057e9
pop edi
xor al, al
pop ebx
ret 8
mov ecx, dword [edi + 0xc]
cmp word [ecx], 0x5a4d
push esi
jne 0x405815
mov eax, dword [ecx + 0x3c]
mov edx, dword [eax + ecx]
add eax, ecx
cmp edx, 0x4550
jne 0x405815
mov eax, dword [eax + 0x98]
test eax, eax
je 0x405815
lea esi, [eax + ecx]
test esi, esi
jne 0x40581d
pop esi
pop edi
xor al, al
pop ebx
ret 8
lea eax, [esi + 8]
test eax, eax
je 0x405815
push eax
mov ecx, edi
call fcn.004056a0
test eax, eax
je 0x405815
mov ecx, dword [esp + 0x10]
push ebx
push ecx
add eax, esi
push eax
mov ecx, edi
call fcn.00405610
pop esi
pop edi
pop ebx
ret 8
Function at 0x406830
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
mov eax, dword [ecx]
push ebx
xor bl, bl
test eax, eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 0
mov dword [esp + 8], 1
je 0x406920
push ebp
mov ebp, dword [esp + 0x18]
mov ecx, dword [ebp]
lea edx, [esp + 8]
push edx
push 0
lea edx, [esp + 0x14]
push edx
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
neg eax
sbb al, al
inc al
mov byte [esp + 0x18], al
je 0x406916
mov ecx, dword [esp + 8]
push esi
push edi
mov edi, dword [esp + 0x24]
mov eax, dword [edi]
sub eax, 0x10
mov edx, 1
sub edx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, ecx
or edx, eax
mov esi, ecx
jge 0x4068ac
push ecx
mov ecx, edi
call fcn.00401920
mov eax, dword [edi]
test eax, eax
mov dword [eax - 0xc], esi
mov ecx, dword [edi]
mov byte [esi + ecx], 0
je 0x4068e9
mov edx, dword [esp + 0x18]
mov edx, dword [edx]
test edx, edx
jne 0x4068c9
xor bl, bl
jmp 0x4068e9
mov ecx, dword [ebp]
lea esi, [esp + 0x10]
push esi
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
mov edx, dword [edi]
test edx, edx
jne 0x4068f3
xor eax, eax
jmp 0x406901
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4068f8
sub eax, esi
mov dword [edx - 0xc], eax
mov ecx, dword [edi]
pop edi
pop esi
mov byte [eax + ecx], 0
pop ebp
mov al, bl
pop ebx
add esp, 0xc
ret 8
pop ebp
mov al, bl
pop ebx
add esp, 0xc
ret 8
mov al, bl
pop ebx
add esp, 0xc
ret 8
Function at 0x4070b0
Capabilities:
Access peb ldr_data
Hash data using sha1

Disassembly:
push 0xffffffffffffffff
push 0x40f513
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x174
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x10], ebx
mov edi, dword [esp + 0x198]
mov eax, dword [edi - 0xc]
push eax
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x194], ebx
mov dword [esp + 0x184], ebx
mov dword [esp + 0x188], ebx
mov dword [esp + 0x30], 0x67452301
mov dword [esp + 0x34], 0xefcdab89
mov dword [esp + 0x38], 0x98badcfe
mov dword [esp + 0x3c], 0x10325476
mov dword [esp + 0x40], 0xc3d2e1f0
call fcn.00406ee0
call fcn.00406fe0
mov eax, dword [0x413ae8]
push 1
push 0x14
mov ecx, 0x413ae8
call dword [eax]
mov edx, dword [esp + 0x28]
add eax, 0x10
mov dword [eax - 0xc], 0x14
mov byte [eax + 0x14], bl
mov ecx, eax
mov dword [ecx], edx
mov edx, dword [esp + 0x2c]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x30]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x34]
mov dword [ecx + 0xc], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x10], eax
mov dword [ecx + 0x10], edx
lea esi, [eax - 0x10]
push esi
mov byte [esp + 0x190], 1
call fcn.004058c0
mov ebp, dword [esp + 0x198]
add eax, 0x10
mov dword [ebp], eax
add esp, 4
mov byte [esp + 0x18c], bl
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4071b0
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
lea eax, [edi - 0x10]
mov dword [esp + 0x18c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4071d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x184]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x180
ret
Function at 0x407717
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.00407a00
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4077b2
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 [0x413b38]
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 0x4077b2
cmp eax, 1
je 0x4077d3
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 0x4077b2
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40777f
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4077ae
xor eax, eax
inc eax
jmp 0x4077f2
cmp edi, eax
jae 0x4077b6
xor eax, eax
jmp 0x4077f2
cmp eax, esi
jae 0x4077bd
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 [0x413b38]
jmp 0x4077d6
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 0x4086e4
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x410798
call fcn.00408ac0
mov edi, 0x94
mov eax, edi
call fcn.00407a00
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 [0x413b38], ecx
mov eax, dword [esi + 4]
mov dword [0x413b44], eax
mov edx, dword [esi + 8]
mov dword [0x413b48], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x413b3c], esi
cmp ecx, 2
je 0x408744
or esi, 0x8000
mov dword [0x413b3c], esi
shl eax, 8
add eax, edx
mov dword [0x413b40], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40877f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40877f
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x408797
cmp eax, 0x20b
je 0x408784
mov dword [ebp - 0x1c], esi
jmp 0x4087ab
cmp dword [ecx + 0x84], 0xe
jbe 0x40877f
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4087a5
cmp dword [ecx + 0x74], 0xe
jbe 0x40877f
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00409099
pop ecx
test eax, eax
jne 0x4087d7
cmp dword [0x413b20], 1
jne 0x4087c4
call fcn.0040b271
push 0x1c
call fcn.0040b0fa
push 0xff
call fcn.00409c0d
pop ecx
pop ecx
call fcn.0040ba1a
mov dword [ebp - 4], esi
call fcn.0040b86f
test eax, eax
jge 0x4087f0
push 0x1b
call fcn.004086bf
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x415118], eax
call fcn.0040b74d
mov dword [0x413b18], eax
call fcn.0040b6ab
test eax, eax
jge 0x408816
push 8
call fcn.004086bf
pop ecx
call fcn.0040b478
test eax, eax
jge 0x408827
push 9
call fcn.004086bf
pop ecx
push 1
call fcn.00409c3d
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40883d
push eax
call fcn.004086bf
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040b41b
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40885e
movzx eax, word [ebp - 0x40]
jmp 0x408861
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00404090
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40887f
push edi
call fcn.00409d68
call fcn.00409d8a
jmp 0x4088b1
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00408afb
ret
Function at 0x409ca7
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x413b78], esi
push edi
jne 0x409cc7
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x413b74], esi
mov byte [0x413b70], al
jne 0x409d2d
mov ecx, dword [0x4150e8]
test ecx, ecx
je 0x409d0e
mov eax, dword [0x4150e4]
sub eax, 4
cmp eax, ecx
jmp 0x409d07
mov eax, dword [eax]
test eax, eax
je 0x409cf9
call eax
mov eax, dword [0x4150e4]
sub eax, 4
cmp eax, dword [0x4150e8]
mov dword [0x4150e4], eax
jae 0x409cf1
mov eax, 0x413054
mov esi, 0x41305c
cmp eax, esi
mov edi, eax
jae 0x409d2d
mov eax, dword [edi]
test eax, eax
je 0x409d26
call eax
add edi, 4
cmp edi, esi
jb 0x409d1e
mov eax, 0x413060
mov esi, 0x413068
cmp eax, esi
mov edi, eax
jae 0x409d4c
mov eax, dword [edi]
test eax, eax
je 0x409d45
call eax
add edi, 4
cmp edi, esi
jb 0x409d3d
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x409d66
push dword [ebp + 8]
mov dword [0x413b78], 1
call fcn.00409c0d
pop ebp
ret
Function at 0x409da8
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 0x409dd6
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 0x409ddd
cmp ebx, dword [eax + 4]
jae 0x409ddd
xor eax, eax
jmp 0x409fcd
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x409dee
xor eax, eax
inc eax
jmp 0x409fcc
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x409e04
cmp ecx, edx
jae 0x409f49
cmp dword [eax + 4], 0
je 0x409e0d
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x409df5
cmp dword [ebp + 8], 0
je 0x409e2f
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x409f49
cmp eax, esi
jae 0x409f49
mov eax, dword [0x413b80]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x409e54
cmp dword [esi*4 + 0x413b88], edi
je 0x409f4d
inc esi
cmp esi, eax
jl 0x409e42
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x409fc9
cmp dword [ebp - 8], 0x1000000
jne 0x409fc9
test byte [ebp - 0xc], 0xcc
je 0x409ed2
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x409fc9
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x409fc9
cmp word [eax + 0x18], 0x10b
jne 0x409fc9
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x409fc9
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x409ed2
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x409ed2
test byte [ecx + 0x27], 0x80
jne 0x409f49
push 1
push 0x413bc8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x409de6
mov ecx, dword [0x413b80]
test ecx, ecx
mov edx, ecx
jle 0x409f06
lea eax, [ecx*4 + 0x413b84]
cmp dword [eax], edi
je 0x409f06
dec edx
sub eax, 4
test edx, edx
jg 0x409efa
test edx, edx
jne 0x409f37
push 0xf
pop ebx
cmp ecx, ebx
jg 0x409f13
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x409f2b
lea eax, [edx*4 + 0x413b88]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x409f19
cmp ecx, 0x10
jge 0x409f37
inc ecx
mov dword [0x413b80], ecx
push 0
push 0x413bc8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x409de6
xor eax, eax
jmp 0x409fcc
test esi, esi
jle 0x409de6
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x413bc8
call ebx
test eax, eax
jne 0x409de6
cmp dword [esi*4 + 0x413b88], edi
je 0x409fa3
mov eax, dword [0x413b80]
lea esi, [eax - 1]
test esi, esi
jl 0x409f91
cmp dword [esi*4 + 0x413b88], edi
je 0x409f8d
dec esi
jns 0x409f81
test esi, esi
jge 0x409fa1
cmp eax, 0x10
jge 0x409f9c
inc eax
mov dword [0x413b80], eax
lea esi, [eax - 1]
jmp 0x409fa3
je 0x409fbb
xor ecx, ecx
test esi, esi
jl 0x409fbb
lea eax, [ecx*4 + 0x413b88]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x409fa9
push 0
push 0x413bc8
call ebx
jmp 0x409de6
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b0fa
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4131c0]
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 + 0x413228]
je 0x40b12f
inc eax
cmp eax, 0x13
jb 0x40b120
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x413228]
jne 0x40b255
mov eax, dword [0x413b20]
cmp eax, 1
je 0x40b22d
cmp eax, edx
jne 0x40b15f
cmp dword [0x4131e4], 1
je 0x40b22d
cmp ecx, 0xfc
je 0x40b255
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 0x40b195
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040ab90
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00408c90
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40b1c9
mov eax, edi
push eax
call fcn.00408c90
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4107f8
push edi
call fcn.0040d910
add esp, 0x10
push edi
call fcn.00408c90
push dword [esi + 0x41322c]
mov ebx, eax
call fcn.00408c90
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00407a00
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040ab90
push edi
push ebx
call fcn.0040aba0
push 0x4107f4
push ebx
call fcn.0040aba0
push dword [esi + 0x41322c]
push ebx
call fcn.0040aba0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040d810
add esp, 0x2c
jmp 0x40b255
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x41322c]
push dword [esi]
call fcn.00408c90
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.00407a6e
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40d810
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x413d28], ebx
push esi
push edi
jne 0x40d890
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40d8cb
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x413d28], eax
je 0x40d8cb
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x413d2c], eax
call esi
cmp dword [0x413b38], 2
mov dword [0x413d30], eax
jne 0x40d890
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x413d38], eax
je 0x40d890
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x413d34], eax
mov eax, dword [0x413d34]
test eax, eax
je 0x40d8d5
call eax
test eax, eax
je 0x40d8bc
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x413d38]
test eax, eax
je 0x40d8bc
test byte [ebp - 8], 1
jne 0x40d8d5
cmp dword [0x413b44], 4
jb 0x40d8cf
or byte [ebp + 0x12], 0x20
jmp 0x40d8f4
xor eax, eax
jmp 0x40d904
or byte [ebp + 0x12], 4
jmp 0x40d8f4
mov eax, dword [0x413d2c]
test eax, eax
je 0x40d8f4
call eax
mov ebx, eax
test ebx, ebx
je 0x40d8f4
mov eax, dword [0x413d30]
test eax, eax
je 0x40d8f4
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x413d28]
pop edi
pop esi
pop ebx
leave
ret