joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4014e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4014f9
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40150d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40152e
cmp esi, eax
jae 0x401507
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401520
cmp esi, eax
jae 0x401507
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x403d20
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
mov eax, dword [0x4e833c]
push ebx
push esi
push edi
xor esi, esi
mov dword [esp + 0xdc], eax
push esi
call dword [sym.imp.ole32.dll_CoInitialize]
cmp dword [section.Shared], esi
je 0x403d6f
mov eax, dword [section.Shared]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
xor eax, eax
mov ecx, dword [esp + 0xdc]
call fcn.0040adf3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp + 8]
mov dword [0x4e8ce8], ecx
xor eax, eax
lea edx, [esp + 0x40]
mov ecx, 0x25
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
push edx
mov dword [esp + 0x44], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x50], 1
jne 0x403db4
cmp dword [esp + 0x44], 5
jae 0x403db4
cmp dword [esp + 0x48], 0x5a
ja 0x403db4
mov byte [0x4e8cec], 1
lea ecx, [esp + 0x10]
call fcn.00402460
push esi
push 0x64
call fcn.00401540
add esp, 8
cmp eax, esi
je 0x403dd8
push 0x64
push eax
lea ecx, [esp + 0x18]
call fcn.004026a0
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push 0x20a0000
push ecx
mov ecx, 0x4e8d98
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
call fcn.00404b60
test eax, eax
lea ecx, [esp + 0x10]
jne 0x403e25
call fcn.00406290
xor eax, eax
mov ecx, dword [esp + 0xdc]
call fcn.0040adf3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.00406290
push esi
push esi
push esi
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
lea edx, [esp + 0x30]
push edx
call esi
test eax, eax
jle 0x403e9f
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
lea ebx, [ebx]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
mov ecx, 0x4e8d98
call fcn.00403fd0
test eax, eax
jne 0x403e8e
lea eax, [esp + 0x24]
push eax
mov ecx, 0x4e8d98
call fcn.004038a0
test eax, eax
jne 0x403e8e
lea ecx, [esp + 0x24]
push ecx
call edi
lea edx, [esp + 0x24]
push edx
call ebx
push 0
push 0
push 0
lea eax, [esp + 0x30]
push eax
call esi
test eax, eax
jg 0x403e50
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [esp + 0xdc]
mov eax, 1
call fcn.0040adf3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x404d20
Capabilities:
Decrypt data using tea
Encode data using xor

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
mov edi, dword [esi]
mov dword [esp + 0x18], edi
mov edi, dword [esi + 4]
mov dword [esp + 0x14], edi
mov edi, dword [esi + 8]
mov esi, dword [esi + 0xc]
mov dword [esp + 0x10], edi
mov edx, 0xc6ef3720
mov dword [esp + 0x24], esi
mov edi, 0x20
lea esp, [esp]
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x10]
mov esi, ecx
shr esi, 5
add esi, ebx
mov ebx, ecx
shl ebx, 4
add ebx, ebp
mov ebp, dword [esp + 0x18]
xor esi, ebx
lea ebx, [edx + ecx]
xor esi, ebx
mov ebx, dword [esp + 0x14]
sub eax, esi
mov esi, eax
shr esi, 5
add esi, ebx
mov ebx, eax
shl ebx, 4
add ebx, ebp
xor esi, ebx
lea ebx, [edx + eax]
xor esi, ebx
sub ecx, esi
add edx, 0x61c88647
dec edi
jne 0x404d60
mov edx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword [edx], ecx
mov dword [edx + 4], eax
pop ebx
add esp, 0xc
ret

Function at 0x405ab0
Capabilities:
Hash data with md5

Disassembly:
sub esp, 0x28
mov eax, dword [0x4e833c]
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov edi, dword [esp + 0x48]
cmp edi, ebx
mov dword [esp + 0x34], eax
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebx
mov dword [esi], 0x67452301
mov dword [esi + 4], 0xefcdab89
mov dword [esi + 8], 0x98badcfe
mov dword [esi + 0xc], 0x10325476
jle 0x405b04
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x3c]
push ebp
push ebx
push esi
mov ecx, esi
call fcn.00405950
dec edi
jne 0x405af5
xor ebx, ebx
mov ebp, dword [esp + 0x44]
push esi
push ebp
mov ecx, esi
call fcn.00405a20
xor eax, eax
mov word [esp + 0x49], ax
mov byte [esp + 0x48], 0
mov byte [esp + 0x4b], al
lea edi, [esp + 0x10]
mov dword [esp + 0x10], ebx
xor esi, esi
jmp 0x405b30
movzx ecx, byte [esi + ebp]
push ecx
push str._02x
lea edx, [esp + 0x50]
push 4
push edx
call fcn.0040b875
push 2
lea eax, [esp + 0x5c]
push eax
push edi
call fcn.0040b740
add esp, 0x1c
add edi, 2
inc esi
cmp esi, 0x10
jl 0x405b30
mov byte [edi - 1], 0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [ebp], ecx
mov ecx, dword [esp + 0x1c]
pop edi
mov dword [ebp + 4], edx
mov dword [ebp + 8], eax
pop esi
mov dword [ebp + 0xc], ecx
mov ecx, dword [esp + 0x2c]
pop ebp
pop ebx
call fcn.0040adf3
add esp, 0x28
ret 0x10
Function at 0x406ea0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x412d58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x14]
push esi
push edi
mov edi, ecx
push eax
mov dword [esp + 0xc], edi
call fcn.00406ae0
mov ecx, dword [esp + 0x20]
mov dword [edi + 4], ecx
push 0x40100000
push 0x3e800000
push 0x3f400000
push 1
lea esi, [edi + 0xc]
push 0x11
mov ecx, esi
mov dword [esp + 0x28], 0
call fcn.00406220
mov ecx, dword [esp + 0xc]
mov eax, edi
mov dword [esi + 0x24], 0xa
mov dword [esi + 0x28], 0x4c
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x406f30
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x12c
mov eax, dword [0x4e833c]
push ebp
push esi
push edi
mov edi, dword [esp + 0x13c]
test edi, edi
mov dword [esp + 0x134], eax
mov ebp, ecx
jne 0x406f54
mov edi, ebp
mov esi, dword [esp + 0x140]
test esi, esi
je 0x4070ce
push ebx
mov ebx, dword [esp + 0x148]
jmp 0x406f70
mov edx, dword [ebp + 0x34]
push 0
lea ecx, [esp + 0x20]
lea eax, [esi + ebx]
push ecx
push eax
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x406f9b
call fcn.00405680
mov edx, dword [ebp + 0x34]
push 0
lea eax, [esp + 0x14]
push eax
push 0x10
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406fc4
call fcn.00405680
mov eax, dword [esp + 0x24]
sub eax, esi
cmp eax, 0x103
jbe 0x406fd6
mov eax, 0x103
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
mov eax, dword [ebp + 0x34]
lea edx, [esp + 0x40]
push edx
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406ffe
call fcn.00405680
movsx edx, byte [esp + 0x34]
mov ecx, dword [esp + 0x14c]
cmp edx, ecx
lea eax, [esp + 0x34]
je 0x40701d
sub byte [eax], cl
movsx edx, byte [eax + 1]
inc eax
cmp edx, ecx
jne 0x407012
mov byte [eax], 0
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x3c]
push edx
mov ecx, edi
call fcn.004061c0
test eax, eax
jne 0x407091
lea ecx, [edi + 0x24]
call fcn.00405850
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x38]
push ecx
mov ecx, esi
call fcn.00406ea0
mov eax, dword [edi]
cmp eax, dword [edi + 0x18]
jbe 0x407073
mov ecx, dword [edi + 0x20]
test ecx, ecx
jne 0x407073
push eax
mov ecx, edi
call fcn.00405800
push eax
mov ecx, edi
call fcn.00405fc0
mov eax, dword [esi + 4]
xor edx, edx
div dword [edi + 8]
mov eax, dword [edi + 4]
mov ecx, dword [eax + edx*4]
mov dword [esi + 8], ecx
mov eax, dword [edi + 4]
mov dword [eax + edx*4], esi
inc dword [edi]
add esi, 0xc
jmp 0x407094
lea esi, [eax + 0xc]
push ebx
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
call fcn.00406970
test byte [esi + 0x34], 1
je 0x4070c1
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4070c1
mov edx, dword [esp + 0x14c]
push edx
push ebx
push eax
push esi
mov ecx, ebp
call fcn.00406f30
mov esi, dword [esp + 0x2c]
test esi, esi
jne 0x406f70
pop ebx
mov ecx, dword [esp + 0x134]
pop edi
pop esi
pop ebp
call fcn.0040adf3
add esp, 0x12c
ret 0x10
Function at 0x40b36e
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.0040b460
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b409
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 [0x4e8f70]
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 0x40b409
cmp eax, 1
je 0x40b42a
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 0x40b409
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40b3d6
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40b405
xor eax, eax
inc eax
jmp 0x40b449
cmp edi, eax
jae 0x40b40d
xor eax, eax
jmp 0x40b449
cmp eax, esi
jae 0x40b414
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 [0x4e8f70]
jmp 0x40b42d
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 0x40b954
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4e6308
call fcn.0040bb90
mov edi, 0x94
mov eax, edi
call fcn.0040b460
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 [0x4e8f70], ecx
mov eax, dword [esi + 4]
mov dword [0x4e8f7c], eax
mov edx, dword [esi + 8]
mov dword [0x4e8f80], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4e8f74], esi
cmp ecx, 2
je 0x40b9b4
or esi, 0x8000
mov dword [0x4e8f74], esi
shl eax, 8
add eax, edx
mov dword [0x4e8f78], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40b9ef
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40b9ef
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40ba07
cmp eax, 0x20b
je 0x40b9f4
mov dword [ebp - 0x1c], esi
jmp 0x40ba1b
cmp dword [ecx + 0x84], 0xe
jbe 0x40b9ef
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40ba15
cmp dword [ecx + 0x74], 0xe
jbe 0x40b9ef
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040c766
pop ecx
test eax, eax
jne 0x40ba47
cmp dword [0x4e8ee4], 1
jne 0x40ba34
call fcn.0040f296
push 0x1c
call fcn.0040f11f
push 0xff
call fcn.0040e050
pop ecx
pop ecx
call fcn.0040fa3f
mov dword [ebp - 4], esi
call fcn.0040f894
test eax, eax
jge 0x40ba60
push 0x1b
call fcn.0040b92f
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4ea4e4], eax
call fcn.0040f772
mov dword [0x4e8edc], eax
call fcn.0040f6d0
test eax, eax
jge 0x40ba86
push 8
call fcn.0040b92f
pop ecx
call fcn.0040f49d
test eax, eax
jge 0x40ba97
push 9
call fcn.0040b92f
pop ecx
push 1
call fcn.0040e080
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40baad
push eax
call fcn.0040b92f
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040f440
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40bace
movzx eax, word [ebp - 0x40]
jmp 0x40bad1
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00403d20
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40baef
push edi
call fcn.0040e1ab
call fcn.0040e1cd
jmp 0x40bb21
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040bbcb
ret
Function at 0x40d9bd
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 0x40d9eb
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 0x40d9f2
cmp ebx, dword [eax + 4]
jae 0x40d9f2
xor eax, eax
jmp 0x40dbe2
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40da03
xor eax, eax
inc eax
jmp 0x40dbe1
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40da19
cmp ecx, edx
jae 0x40db5e
cmp dword [eax + 4], 0
je 0x40da22
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40da0a
cmp dword [ebp + 8], 0
je 0x40da44
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40db5e
cmp eax, esi
jae 0x40db5e
mov eax, dword [0x4e8f08]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40da69
cmp dword [esi*4 + 0x4e8f10], edi
je 0x40db62
inc esi
cmp esi, eax
jl 0x40da57
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40dbde
cmp dword [ebp - 8], 0x1000000
jne 0x40dbde
test byte [ebp - 0xc], 0xcc
je 0x40dae7
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40dbde
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40dbde
cmp word [eax + 0x18], 0x10b
jne 0x40dbde
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40dbde
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40dae7
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40dae7
test byte [ecx + 0x27], 0x80
jne 0x40db5e
push 1
push 0x4e8f50
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40d9fb
mov ecx, dword [0x4e8f08]
test ecx, ecx
mov edx, ecx
jle 0x40db1b
lea eax, [ecx*4 + 0x4e8f0c]
cmp dword [eax], edi
je 0x40db1b
dec edx
sub eax, 4
test edx, edx
jg 0x40db0f
test edx, edx
jne 0x40db4c
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40db28
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40db40
lea eax, [edx*4 + 0x4e8f10]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40db2e
cmp ecx, 0x10
jge 0x40db4c
inc ecx
mov dword [0x4e8f08], ecx
push 0
push 0x4e8f50
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40d9fb
xor eax, eax
jmp 0x40dbe1
test esi, esi
jle 0x40d9fb
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4e8f50
call ebx
test eax, eax
jne 0x40d9fb
cmp dword [esi*4 + 0x4e8f10], edi
je 0x40dbb8
mov eax, dword [0x4e8f08]
lea esi, [eax - 1]
test esi, esi
jl 0x40dba6
cmp dword [esi*4 + 0x4e8f10], edi
je 0x40dba2
dec esi
jns 0x40db96
test esi, esi
jge 0x40dbb6
cmp eax, 0x10
jge 0x40dbb1
inc eax
mov dword [0x4e8f08], eax
lea esi, [eax - 1]
jmp 0x40dbb8
je 0x40dbd0
xor ecx, ecx
test esi, esi
jl 0x40dbd0
lea eax, [ecx*4 + 0x4e8f10]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40dbbe
push 0
push 0x4e8f50
call ebx
jmp 0x40d9fb
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e0ea
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4e8fb0], esi
push edi
jne 0x40e10a
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 [0x4e8fac], esi
mov byte [0x4e8fa8], al
jne 0x40e170
mov ecx, dword [0x4ea288]
test ecx, ecx
je 0x40e151
mov eax, dword [0x4ea284]
sub eax, 4
cmp eax, ecx
jmp 0x40e14a
mov eax, dword [eax]
test eax, eax
je 0x40e13c
call eax
mov eax, dword [0x4ea284]
sub eax, 4
cmp eax, dword [0x4ea288]
mov dword [0x4ea284], eax
jae 0x40e134
mov eax, 0x4e803c
mov esi, 0x4e8044
cmp eax, esi
mov edi, eax
jae 0x40e170
mov eax, dword [edi]
test eax, eax
je 0x40e169
call eax
add edi, 4
cmp edi, esi
jb 0x40e161
mov eax, 0x4e8048
mov esi, 0x4e8050
cmp eax, esi
mov edi, eax
jae 0x40e18f
mov eax, dword [edi]
test eax, eax
je 0x40e188
call eax
add edi, 4
cmp edi, esi
jb 0x40e180
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40e1a9
push dword [ebp + 8]
mov dword [0x4e8fb0], 1
call fcn.0040e050
pop ebp
ret

Function at 0x40f11f
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4e833c]
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 + 0x4e84c0]
je 0x40f154
inc eax
cmp eax, 0x13
jb 0x40f145
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4e84c0]
jne 0x40f27a
mov eax, dword [0x4e8ee4]
cmp eax, 1
je 0x40f252
cmp eax, edx
jne 0x40f184
cmp dword [0x4e8364], 1
je 0x40f252
cmp ecx, 0xfc
je 0x40f27a
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 0x40f1ba
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040ff70
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040d870
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40f1ee
mov eax, edi
push eax
call fcn.0040d870
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4e63bc
push edi
call fcn.00410070
add esp, 0x10
push edi
call fcn.0040d870
push dword [esi + 0x4e84c4]
mov ebx, eax
call fcn.0040d870
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040b460
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040ff70
push edi
push ebx
call fcn.0040ff80
push 0x4e63b8
push ebx
call fcn.0040ff80
push dword [esi + 0x4e84c4]
push ebx
call fcn.0040ff80
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040fe75
add esp, 0x2c
jmp 0x40f27a
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4e84c4]
push dword [esi]
call fcn.0040d870
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.0040adf3
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40fe75
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4e90f4], ebx
push esi
push edi
jne 0x40fef5
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40ff30
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x4e90f4], eax
je 0x40ff30
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x4e90f8], eax
call esi
cmp dword [0x4e8f70], 2
mov dword [0x4e90fc], eax
jne 0x40fef5
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x4e9104], eax
je 0x40fef5
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4e9100], eax
mov eax, dword [0x4e9100]
test eax, eax
je 0x40ff3a
call eax
test eax, eax
je 0x40ff21
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x4e9104]
test eax, eax
je 0x40ff21
test byte [ebp - 8], 1
jne 0x40ff3a
cmp dword [0x4e8f7c], 4
jb 0x40ff34
or byte [ebp + 0x12], 0x20
jmp 0x40ff59
xor eax, eax
jmp 0x40ff69
or byte [ebp + 0x12], 4
jmp 0x40ff59
mov eax, dword [0x4e90f8]
test eax, eax
je 0x40ff59
call eax
mov ebx, eax
test ebx, ebx
je 0x40ff59
mov eax, dword [0x4e90fc]
test eax, eax
je 0x40ff59
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4e90f4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x410d6f
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x4ea164]
mov eax, dword [0x4e833c]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x410f35
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x4ea180]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x410f35
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x410dd9
xor eax, eax
jmp 0x410f49
test al, 0x20
je 0x410dea
push 2
push edi
push edi
push ecx
call fcn.00411de1
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x410ebf
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x410f06
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x410e4c
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x410e3d
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x410e1f
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x410e8c
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x410e98
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x410e13
jmp 0x410e9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x410f30
cmp dword [ebp + 0x3a4], edi
je 0x410f06
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x410ef8
mov dword [0x4e8f68], eax
jmp 0x410f3c
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x410eea
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x410e9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x410e9a
push dword [ebp + 0x3a4]
call fcn.00411ccc
pop ecx
jmp 0x410f46
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x410f1e
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x410dd2
mov dword [0x4e8f64], 0x1c
mov dword [0x4e8f68], edi
jmp 0x410f46
sub eax, dword [ebp - 0x7c]
jmp 0x410f49
and dword [0x4e8f68], 0
mov dword [0x4e8f64], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040adf3
add ebp, 0x39c
leave
ret