joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a4e0
Capabilities:
Create directory

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x214]
test ebx, ebx
je 0x40a5a8
mov al, byte [ebx]
test al, al
je 0x40a5a8
push esi
push edi
mov esi, ebx
mov ecx, ebx
cmp al, 0x2f
je 0x40a50e
cmp al, 0x5c
jne 0x40a510
mov esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40a506
mov edi, dword [esp + 0x218]
cmp esi, ebx
je 0x40a545
sub esi, ebx
lea eax, [esp + 0xc]
push esi
push ebx
push eax
call dword [sym.imp.MSVCRT.dll__mbsnbcpy]
lea ecx, [esp + 0x18]
mov byte [esp + esi + 0x18], 0
push ecx
push edi
call fcn.0040a4e0
add esp, 0x14
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x110]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x110]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x114]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop esi
pop ebx
add esp, 0x208
ret

Function at 0x40c950
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
xor ebp, ebp
push esi
cmp ebx, 1
push edi
jl 0x40c96b
cmp ebx, 8
jg 0x40c96b
mov eax, 1
jmp 0x40c96d
xor eax, eax
mov esi, dword [esp + 0x14]
push str.bad_pack_level
push eax
push esi
call fcn.0040b150
mov eax, dword [esi + 0x6af70]
add esp, 0xc
cmp eax, ebp
mov dword [esi + 0x6af78], ebp
jne 0x40c9a4
mov dword [esi + 0x6af78], 1
mov dword [esi + 0x6af70], 0x10000
mov ecx, 0x7fff
xor eax, eax
lea edi, [esi + 0x4af70]
mov dword [esi + 0x6af6c], ebp
rep stosd dword es:[edi], eax
mov ax, word [ebx*8 + 0x41317a]
xor ecx, ecx
mov dword [esi + 0x6af98], eax
mov cx, word [ebx*8 + 0x413178]
xor edx, edx
mov dword [esi + 0x6af9c], ecx
mov dx, word [ebx*8 + 0x41317c]
xor eax, eax
mov dword [esi + 0x6afa0], edx
mov ax, word [ebx*8 + 0x41317e]
cmp ebx, 2
mov dword [esi + 0x6af94], eax
jg 0x40ca05
mov eax, dword [esp + 0x1c]
or byte [eax], 4
jmp 0x40ca11
cmp ebx, 8
jl 0x40ca11
mov eax, dword [esp + 0x1c]
or byte [eax], 2
lea edi, [esi + 0x1af70]
push 0x10000
push edi
push esi
mov dword [esi + 0x6af84], ebp
mov dword [esi + 0x6af74], ebp
call dword [esi + 0xc]
add esp, 0xc
cmp eax, ebp
mov dword [esi + 0x6af90], eax
je 0x40ca8a
cmp eax, 0xffffffff
je 0x40ca8a
cmp eax, 0x106
mov dword [esi + 0x6af8c], ebp
jae 0x40ca55
push esi
call fcn.0040cca0
add esp, 4
mov dword [esi + 0x6af7c], ebp
xor eax, eax
mov edx, dword [esi + 0x6af7c]
xor ecx, ecx
mov cl, byte [edi + eax]
and edx, 0x3ff
and ecx, 0x7fff
shl edx, 5
xor ecx, edx
inc eax
cmp eax, 2
mov dword [esi + 0x6af7c], ecx
jb 0x40ca5d
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [esi + 0x6af8c], 1
mov dword [esi + 0x6af90], ebp
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40dd20
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x40dd2b
xor eax, eax
ret
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x40de2e
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0x4131c8]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x4131c8]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x4131c8]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x4131c8]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x4131c8]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x4131c8]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x4131c8]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x4131c8]
xor eax, edx
inc ecx
dec edi
jne 0x40dd46
pop edi
test esi, esi
je 0x40de50
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x4131c8]
xor eax, edx
inc ecx
dec esi
jne 0x40de32
pop esi
pop ebx
not eax
ret
Function at 0x40e450
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x18]
push edi
test eax, eax
je 0x40e550
mov ecx, dword [ebx + 0x1c]
mov eax, dword [esp + 0x20]
mov edx, dword [ebx + 0x20]
add ecx, eax
cmp ecx, edx
jb 0x40e522
add edx, edx
cmp edx, ecx
jbe 0x40e486
mov edi, edx
mov dword [esp + 0x10], edi
jmp 0x40e48c
mov dword [esp + 0x10], ecx
mov edi, ecx
push 0
push edi
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
test esi, esi
mov dword [esp + 0x14], esi
jne 0x40e4b6
pop edi
pop esi
pop ebp
mov eax, 0x300
pop ebx
add esp, 8
ret 8
push edi
push 0
push 0
push 0xf001f
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
jne 0x40e4e3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0x300
pop ebx
add esp, 8
ret 8
mov ecx, dword [ebx + 0x20]
mov esi, dword [ebx + 0x18]
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x20], edx
mov dword [ebx + 0x18], ebp
mov edi, dword [ebx + 0x1c]
mov edx, dword [ebx + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, eax
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x1c]
pop edi
add ecx, eax
pop esi
mov dword [ebx + 0x1c], ecx
pop ebp
pop ebx
add esp, 8
ret 8
mov eax, dword [ebx]
test eax, eax
je 0x40e584
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x10]
push 0
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ecx
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
pop edi
pop esi
mov dword [ebx + 0xc], 0x1000000
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 8
Function at 0x40ea00
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, ecx
push ebp
push esi
mov edx, dword [ebx + 0x58]
test edx, edx
je 0x40ea6a
mov eax, dword [ebx + 0x60]
mov ebp, dword [ebx + 0x5c]
cmp eax, ebp
jae 0x40eabb
mov ecx, dword [esp + 0x14]
sub ebp, eax
cmp ebp, ecx
jbe 0x40ea26
mov ebp, ecx
mov ecx, ebp
lea esi, [eax + edx]
mov eax, dword [esp + 0x10]
mov edx, ecx
push edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx + 0x60]
mov ecx, dword [ebx + 0x48]
mov eax, dword [ebx + 0x4c]
add edx, ebp
add ecx, ebp
push eax
mov dword [ebx + 0x60], edx
mov dword [ebx + 0x48], ecx
call fcn.0040dd20
add esp, 0xc
mov dword [ebx + 0x4c], eax
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret 8
mov eax, dword [ebx + 0x50]
test eax, eax
je 0x40eab4
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push ecx
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40eabb
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0x48]
add ecx, eax
push eax
mov eax, dword [ebx + 0x4c]
push esi
push eax
mov dword [ebx + 0x48], ecx
call fcn.0040dd20
add esp, 0xc
mov dword [ebx + 0x4c], eax
mov eax, dword [esp + 0x14]
pop esi
pop ebp
pop ebx
ret 8
mov dword [ebx + 0xc], 0x1000000
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
Function at 0x4010a1
Capabilities:
Check mutex on windows

Disassembly:
mov eax, 0x419d99
call fcn.004031c0
sub esp, 0x14
push ebx
push esi
push edi
push str.M_Audio_FW_Tray_Mutex
xor edi, edi
push edi
push edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40117a
cmp ebx, edi
je 0x40117a
cmp dword [esi + 0xa0], edi
jne 0x40117a
push 0xe0
call fcn.0040e90d
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
cmp ecx, edi
mov dword [ebp - 4], edi
je 0x401107
call fcn.004011b5
jmp 0x401109
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [esi + 0xa0], eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
call fcn.0040e93d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x10], ebx
mov ecx, dword [esi + 0xa0]
mov eax, dword [ecx]
push edi
push edi
lea edx, [ebp - 0x20]
push edx
push 0x80c80000
push str.M_Audio_FW_Tray
push edi
mov dword [ebp - 4], 1
call dword [eax + 0x170]
test eax, eax
jne 0x401172
mov ecx, dword [esi + 0xa0]
cmp ecx, edi
je 0x40116c
mov eax, dword [ecx]
push 1
call dword [eax + 4]
mov dword [esi + 0xa0], edi
lea ecx, [ebx - 0x10]
call fcn.00401026
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x40136c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
push esi
lea eax, [ebp - 0x80]
push str.M_Audio_FW_Audio
push eax
call fcn.00403404
pop ecx
pop ecx
lea eax, [ebp - 0x80]
push eax
push 0
call dword [sym.imp.USER32.dll_FindWindowA]
push eax
call fcn.0040fe77
mov esi, eax
test esi, esi
je 0x4013c4
push 5
mov ecx, esi
call fcn.00411e3a
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 0
push 0
push 0x5c8
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x4013d1
push 1
push str.mafwcpl.exe
call dword [sym.imp.KERNEL32.dll_WinExec]
xor eax, eax
pop esi
leave
ret

Function at 0x40181f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401834
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x401846
xor eax, eax
jmp 0x401878
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40186a
cmp esi, eax
jae 0x401842
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x40185c
cmp esi, eax
jae 0x401842
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret
Function at 0x403586
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.004037d0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403621
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 [0x4258a8]
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 0x403621
cmp eax, 1
je 0x403642
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 0x403621
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4035ee
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40361d
xor eax, eax
inc eax
jmp 0x403661
cmp edi, eax
jae 0x403625
xor eax, eax
jmp 0x403661
cmp eax, esi
jae 0x40362c
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 [0x4258a8]
jmp 0x403645
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 0x403856
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41d830
call fcn.0040366c
mov edi, 0x94
mov eax, edi
call fcn.004037d0
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 [0x4258a8], ecx
mov eax, dword [esi + 4]
mov dword [0x4258b4], eax
mov edx, dword [esi + 8]
mov dword [0x4258b8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4258ac], esi
cmp ecx, 2
je 0x4038b6
or esi, 0x8000
mov dword [0x4258ac], esi
shl eax, 8
add eax, edx
mov dword [0x4258b0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4038f1
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4038f1
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x403909
cmp eax, 0x20b
je 0x4038f6
mov dword [ebp - 0x1c], esi
jmp 0x40391d
cmp dword [ecx + 0x84], 0xe
jbe 0x4038f1
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x403917
cmp dword [ecx + 0x74], 0xe
jbe 0x4038f1
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.004069db
pop ecx
test eax, eax
jne 0x403931
push 0x1c
call fcn.00403832
pop ecx
call fcn.00405cf2
test eax, eax
jne 0x403942
push 0x10
call fcn.00403832
pop ecx
call fcn.004080f9
mov dword [ebp - 4], esi
call fcn.00407efb
test eax, eax
jge 0x40395b
push 0x1b
call fcn.0040380d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x427170], eax
call fcn.00407dd9
mov dword [0x425898], eax
call fcn.00407d37
test eax, eax
jge 0x403981
push 8
call fcn.0040380d
pop ecx
call fcn.00407b04
test eax, eax
jge 0x403992
push 9
call fcn.0040380d
pop ecx
push 1
call fcn.00403b4f
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4039a8
push eax
call fcn.0040380d
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00407aa7
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4039c9
movzx eax, word [ebp - 0x40]
jmp 0x4039cc
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040d462
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4039ea
push edi
call fcn.00403c7c
call fcn.00403c9e
jmp 0x403a1c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004036a7
ret
Function at 0x403bb9
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41d868
call fcn.0040366c
push 8
call fcn.00406990
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x4258e8], esi
jne 0x403bed
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4258e4], esi
mov al, byte [ebp + 0x10]
mov byte [0x4258e0], al
cmp dword [ebp + 0xc], edi
jne 0x403c37
cmp dword [0x427168], edi
je 0x403c27
mov eax, dword [0x427164]
sub eax, 4
mov dword [0x427164], eax
cmp eax, dword [0x427168]
jb 0x403c27
mov eax, dword [eax]
cmp eax, edi
je 0x403c08
call eax
jmp 0x403c08
push 0x422088
mov eax, 0x422080
call fcn.00403b37
pop ecx
push 0x422094
mov eax, 0x42208c
call fcn.00403b37
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x403c68
cmp dword [ebp + 0x10], edi
jne 0x403c76
mov dword [0x4258e8], esi
push dword [ebp + 8]
call fcn.00403af5
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x403c75
push 8
call fcn.004068db
pop ecx
ret
call fcn.004036a7
ret
Function at 0x40756a
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 0x407598
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 0x40759f
cmp ebx, dword [eax + 4]
jae 0x40759f
xor eax, eax
jmp 0x40778f
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4075b0
xor eax, eax
inc eax
jmp 0x40778e
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4075c6
cmp ecx, edx
jae 0x40770b
cmp dword [eax + 4], 0
je 0x4075cf
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4075b7
cmp dword [ebp + 8], 0
je 0x4075f1
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40770b
cmp eax, esi
jae 0x40770b
mov eax, dword [0x425a68]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x407616
cmp dword [esi*4 + 0x425a70], edi
je 0x40770f
inc esi
cmp esi, eax
jl 0x407604
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40778b
cmp dword [ebp - 8], 0x1000000
jne 0x40778b
test byte [ebp - 0xc], 0xcc
je 0x407694
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40778b
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40778b
cmp word [eax + 0x18], 0x10b
jne 0x40778b
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40778b
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x407694
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x407694
test byte [ecx + 0x27], 0x80
jne 0x40770b
push 1
push 0x425ab0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4075a8
mov ecx, dword [0x425a68]
test ecx, ecx
mov edx, ecx
jle 0x4076c8
lea eax, [ecx*4 + 0x425a6c]
cmp dword [eax], edi
je 0x4076c8
dec edx
sub eax, 4
test edx, edx
jg 0x4076bc
test edx, edx
jne 0x4076f9
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4076d5
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4076ed
lea eax, [edx*4 + 0x425a70]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4076db
cmp ecx, 0x10
jge 0x4076f9
inc ecx
mov dword [0x425a68], ecx
push 0
push 0x425ab0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4075a8
xor eax, eax
jmp 0x40778e
test esi, esi
jle 0x4075a8
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x425ab0
call ebx
test eax, eax
jne 0x4075a8
cmp dword [esi*4 + 0x425a70], edi
je 0x407765
mov eax, dword [0x425a68]
lea esi, [eax - 1]
test esi, esi
jl 0x407753
cmp dword [esi*4 + 0x425a70], edi
je 0x40774f
dec esi
jns 0x407743
test esi, esi
jge 0x407763
cmp eax, 0x10
jge 0x40775e
inc eax
mov dword [0x425a68], eax
lea esi, [eax - 1]
jmp 0x407765
je 0x40777d
xor ecx, ecx
test esi, esi
jl 0x40777d
lea eax, [ecx*4 + 0x425a70]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40776b
push 0
push 0x425ab0
call ebx
jmp 0x4075a8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407793
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4229c8]
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 + 0x422dc0]
je 0x4077c8
inc eax
cmp eax, 0x13
jb 0x4077b9
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x422dc0]
jne 0x4078ee
mov eax, dword [0x4258a0]
cmp eax, 1
je 0x4078c6
cmp eax, edx
jne 0x4077f8
cmp dword [0x4229c4], 1
je 0x4078c6
cmp ecx, 0xfc
je 0x4078ee
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 0x40782e
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00409160
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00404060
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x407862
mov eax, edi
push eax
call fcn.00404060
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x41de38
push edi
call fcn.004032e0
add esp, 0x10
push edi
call fcn.00404060
push dword [esi + 0x422dc4]
mov ebx, eax
call fcn.00404060
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004037d0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00409160
push edi
push ebx
call fcn.00409170
push 0x41de18
push ebx
call fcn.00409170
push dword [esi + 0x422dc4]
push ebx
call fcn.00409170
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040a9e0
add esp, 0x2c
jmp 0x4078ee
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x422dc4]
push dword [esi]
call fcn.00404060
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.00403ab3
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40a3d7
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4229c8]
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 0x40a408
xor eax, eax
jmp 0x40a591
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 + 0x426e00]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40a444
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040bd28
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40a51f
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40a55d
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 0x40a4a8
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40a499
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 0x40a479
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 0x40a4e8
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40a4f1
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40a46a
jmp 0x40a4f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40a58c
cmp dword [ebp - 0x6c], edi
je 0x40a55d
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40a552
call fcn.0040512a
mov dword [eax], 9
call fcn.00405133
mov dword [eax], esi
jmp 0x40a587
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 0x40a547
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40a4f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40a4f3
push dword [ebp - 0x6c]
call fcn.0040513c
pop ecx
jmp 0x40a587
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40a575
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40a575
xor eax, eax
jmp 0x40a58f
call fcn.0040512a
mov dword [eax], 0x1c
call fcn.00405133
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40a58f
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00403ab3
add ebp, 0x3a0
leave
ret