joyce8/EMBER2024-capa huggingface dataset:
Function at 0x419bc4
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov eax, dword [0x42404c]
test eax, eax
je 0x419cc4
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [0x42404c], 0
xor eax, eax
movzx edx, byte [eax + 0x421bd8]
push 0x1f
pop ecx
sub ecx, edx
xor edx, edx
inc edx
shl edx, cl
or esi, edx
inc eax
cmp eax, 0xe
jb 0x419be4
xor ecx, ecx
push 8
mov eax, ecx
pop edx
test al, 1
je 0x419c0e
shr eax, 1
xor eax, esi
jmp 0x419c10
shr eax, 1
dec edx
jne 0x419c04
mov dword [ecx*4 + 0x4249a0], eax
inc ecx
cmp ecx, 0x100
jl 0x419bff
mov edi, 0x4259a0
mov ecx, 0xff00
mov eax, dword [edi - 0x1000]
mov esi, eax
and esi, ecx
mov ebx, eax
shl ebx, 0x10
add esi, ebx
mov edx, eax
shr edx, 8
shl esi, 8
mov ebx, edx
and ebx, ecx
add esi, ebx
mov ebx, eax
shr ebx, 0x18
add esi, ebx
mov dword [edi], esi
lea esi, [edi + 0x400]
mov dword [esp + 0x10], 3
and eax, 0xff
mov eax, dword [eax*4 + 0x4249a0]
xor eax, edx
mov ebx, eax
and ebx, ecx
mov ebp, eax
shl ebp, 0x10
add ebx, ebp
mov edx, eax
shr edx, 8
shl ebx, 8
mov ebp, edx
and ebp, ecx
add ebx, ebp
mov ebp, eax
shr ebp, 0x18
add ebx, ebp
mov dword [esi - 0x1000], eax
mov dword [esi], ebx
add esi, 0x400
dec dword [esp + 0x10]
jne 0x419c63
add edi, 4
cmp edi, 0x425da0
jl 0x419c2d
pop edi
pop esi
pop ebp
mov dword [0x424048], 0
pop ebx
pop ecx
ret
mov eax, dword [0x424048]
test eax, eax
jne 0x419cc4
pop ecx
ret
Function at 0x41b571
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [esi + 0x2c]
push edi
mov edi, dword [esi + 0x3c]
sub edi, dword [esi + 0x74]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x2c]
sub edi, eax
lea ecx, [ebx + ecx - 0x106]
cmp eax, ecx
mov dword [ebp - 8], edi
jb 0x41b5fe
mov eax, dword [esi + 0x38]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x44]
sub dword [esi + 0x70], ebx
sub dword [esi + 0x6c], ebx
add esp, 0xc
sub dword [esi + 0x5c], ebx
mov dword [ebp - 4], eax
lea eax, [ecx + eax*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x41b5be
mov eax, dword [esi + 0x40]
mov dword [ebp - 4], ebx
lea eax, [eax + ebx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x41b5e0
add edi, ebx
mov dword [ebp - 8], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x41b6bd
mov eax, dword [esi + 0x74]
add eax, dword [esi + 0x6c]
mov ecx, dword [edi + 4]
add eax, dword [esi + 0x38]
mov edx, dword [ebp - 8]
cmp ecx, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
jbe 0x41b626
mov dword [ebp - 4], edx
mov edx, dword [ebp - 4]
test edx, edx
jne 0x41b631
xor eax, eax
jmp 0x41b67e
sub ecx, edx
mov dword [edi + 4], ecx
mov ecx, dword [edi + 0x1c]
mov ecx, dword [ecx + 0x18]
cmp ecx, 1
jne 0x41b64f
mov ecx, dword [edi]
mov eax, dword [edi + 0x30]
push edx
call fcn.0041c23a
pop ecx
jmp 0x41b662
cmp ecx, 2
jne 0x41b668
push edx
push dword [edi]
push dword [edi + 0x30]
call fcn.00419ccf
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [ebp - 0xc]
push dword [ebp - 4]
push dword [edi]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
add dword [edi], eax
add esp, 0xc
add dword [edi + 8], eax
add dword [esi + 0x74], eax
mov edi, dword [esi + 0x74]
cmp edi, 3
jb 0x41b6a9
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x38]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [esi + 0x58]
mov dword [esi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x54]
mov dword [esi + 0x48], eax
cmp edi, 0x106
jae 0x41b6bd
mov eax, dword [esi]
cmp dword [eax + 4], 0
jne 0x41b57c
pop edi
pop ebx
leave
ret
Function at 0x41dd7a
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x70
push 0x41f480
call fcn.0041df68
xor ebx, ebx
push ebx
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x41ddb7
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41ddb7
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x41ddcf
cmp eax, 0x20b
je 0x41ddbc
mov dword [ebp - 0x1c], ebx
jmp 0x41dde3
cmp dword [ecx + 0x84], 0xe
jbe 0x41ddb7
xor eax, eax
cmp dword [ecx + 0xf8], ebx
jmp 0x41dddd
cmp dword [ecx + 0x74], 0xe
jbe 0x41ddb7
xor eax, eax
cmp dword [ecx + 0xe8], ebx
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
push 2
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
or dword [0x427a1c], 0xffffffff
or dword [0x427a20], 0xffffffff
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x42441c]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x424418]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x427a18], eax
call fcn.0041df64
cmp dword [section..data], ebx
jne 0x41de3e
push fcn.0041df64
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
call fcn.0041df52
push 0x41f454
push 0x41f450
call sub.msvcrt.dll__initterm
mov eax, dword [0x424414]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push dword [0x424410]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.msvcrt.dll___getmainargs]
mov dword [ebp - 0x30], eax
push 0x41f44c
push 0x41f42c
call sub.msvcrt.dll__initterm
add esp, 0x24
mov eax, dword [sym.imp.msvcrt.dll__acmdln]
mov esi, dword [eax]
mov dword [ebp - 0x34], esi
cmp byte [esi], 0x22
jne 0x41ded4
inc esi
mov dword [ebp - 0x34], esi
mov al, byte [esi]
cmp al, bl
je 0x41dea8
cmp al, 0x22
jne 0x41de9a
cmp byte [esi], 0x22
jne 0x41deb1
inc esi
mov dword [ebp - 0x34], esi
mov al, byte [esi]
cmp al, bl
je 0x41debb
cmp al, 0x20
jbe 0x41dead
mov dword [ebp - 0x4c], ebx
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoA]
test byte [ebp - 0x4c], 1
je 0x41dedf
movzx eax, word [ebp - 0x48]
jmp 0x41dee2
cmp byte [esi], 0x20
jbe 0x41deb1
inc esi
mov dword [ebp - 0x34], esi
jmp 0x41ded4
push 0xa
pop eax
push eax
push esi
push ebx
push ebx
call edi
push eax
call main
mov esi, eax
mov dword [ebp - 0x7c], esi
cmp dword [ebp - 0x1c], ebx
jne 0x41deff
push esi
call dword [sym.imp.msvcrt.dll_exit]
call dword [sym.imp.msvcrt.dll__cexit]
jmp 0x41df34
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.0041dfa1
ret
Function at 0x98a68c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x98a6b3
call fcn.0092cbf8
mov dword [eax], esi
call fcn.0092cbe5
push 0x16
pop esi
mov dword [eax], esi
call fcn.0092d83a
mov eax, esi
jmp 0x98a708
test dword [ebp + 0xc], 0xfffffff9
jne 0x98a699
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x98a6e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0092cc0b
pop ecx
call fcn.0092cbe5
mov eax, dword [eax]
jmp 0x98a708
test al, 0x10
jne 0x98a706
test al, 1
je 0x98a706
test byte [ebp + 0xc], 2
je 0x98a706
call fcn.0092cbf8
mov dword [eax], 5
call fcn.0092cbe5
mov dword [eax], 0xd
jmp 0x98a6d7
xor eax, eax
pop esi
pop ebp
ret

Function at 0x405fb8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov eax, 0x401000
call 0x405fb8
lcall 0x5de5, 0x8b10c483
jmp loc.007d7584
Function at 0x43537d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x440130
cmp edx, dword [eax]
je 0x43539f
add eax, 8
inc ecx
cmp eax, 0x4401c0
jl 0x435390
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x440130]
jne 0x4354cd
mov eax, dword [0x440c64]
cmp eax, 1
je 0x4354a7
test eax, eax
jne 0x4353d0
cmp dword [0x440084], 1
je 0x4354a7
cmp edx, 0xfc
je 0x4354cd
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x435407
lea eax, [ebp - 0x1a4]
push 0x4373d4
push eax
call fcn.00435930
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00435aa0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x43544a
lea eax, [ebp - 0x1a4]
push eax
call fcn.00435aa0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4373d0
push edi
call fcn.00436730
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x4373b4
push eax
call fcn.00435930
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00435940
lea eax, [ebp - 0xa0]
push 0x4373b0
push eax
call fcn.00435940
push dword [esi + 0x440134]
lea eax, [ebp - 0xa0]
push eax
call fcn.00435940
push 0x12010
lea eax, [ebp - 0xa0]
push 0x437388
push eax
call fcn.0043669e
add esp, 0x2c
pop edi
jmp 0x4354cd
lea eax, [ebp + 8]
lea esi, [esi + 0x440134]
push 0
push eax
push dword [esi]
call fcn.00435aa0
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]
pop esi
leave
ret
Function at 0x4014cd
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
xor ebx, ebx
push edi
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
je 0x401575
mov edi, dword [ebp + 0x14]
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x10]
push ebx
push ecx
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x401575
cmp dword [ebp + 0x10], ebx
je 0x401549
mov esi, dword [ebp + 0x18]
push dword [esi]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 8], eax
push edi
push dword [ebp - 4]
push esi
push eax
call fcn.00401630
test eax, eax
jne 0x401575
jmp 0x401554
mov esi, dword [ebp + 0x18]
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov dword [esi], edi
lea eax, [ebp - 0x14]
push ebx
push eax
push dword [esi]
push dword [ebp - 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x401575
mov dword [ebp - 0xc], 1
cmp dword [ebp + 0xc], ebx
je 0x401583
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], ebx
je 0x401591
push dword [ebp - 4]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp + 0x10], ebx
je 0x4015a4
cmp dword [ebp - 8], ebx
je 0x4015a4
push dword [ebp - 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x42a058], 1
mov dword [0x42a054], 1
mov dword [0x42a050], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x42a00c], eax
mov eax, dword [0x42a064]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x42a078]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x42a060]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x41f01c], 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], dbg._matherr
call dbg.__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 0x401554
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x84
cmp dword [ebp + 0xc], 2
je 0x4016f3
cmp dword [ebp + 0xc], 0xf
jne 0x401706
lea eax, [ebp - 0x78]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_BeginPaint]
call eax
sub esp, 8
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0xc]
mov dword [esp], edx
mov ecx, eax
call method.Gdiplus::Graphics.Graphics_HDC___
sub esp, 4
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0x65
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_FindResourceA]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_LoadResource]
call eax
sub esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_SizeofResource]
call eax
sub esp, 8
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov dword [esp], 2
mov eax, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
call eax
sub esp, 8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GlobalLock]
call eax
sub esp, 4
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_LockResource]
call eax
sub esp, 4
mov edx, dword [ebp - 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._memcpy
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
call eax
sub esp, 0xc
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x38]
mov dword [esp + 4], 0
mov dword [esp], edx
mov ecx, eax
call method.Gdiplus::Bitmap.Bitmap_IStream__int_
sub esp, 8
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
add eax, 8
mov eax, dword [eax]
mov edx, dword [ebp - 0x2c]
mov dword [esp], edx
call eax
sub esp, 4
lea eax, [ebp - 0x28]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
lea edx, [ebp - 0x38]
mov dword [esp], edx
mov ecx, eax
call method.Gdiplus::Graphics.DrawImage_Gdiplus::Image__int__int_
sub esp, 0xc
lea eax, [ebp - 0x78]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_EndPaint]
call eax
sub esp, 8
lea eax, [ebp - 0x38]
mov ecx, eax
call method.Gdiplus::Bitmap.Bitmap__
lea eax, [ebp - 0x28]
mov ecx, eax
call method.Gdiplus::Graphics.Graphics__
jmp 0x40172d
mov dword [esp], 0
mov eax, dword [sym.imp.USER32.dll_PostQuitMessage]
call eax
sub esp, 4
jmp 0x40172d
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_DefWindowProcA]
call eax
sub esp, 0x10
jmp 0x401758
mov eax, 0
jmp 0x401758
mov ebx, dword [ebp - 4]
leave
ret 0x10
Function at 0x40175f
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push edi
sub esp, 0x84
call sym.InitGDIPlus__
lea edx, [ebp - 0x34]
mov eax, 0
mov ecx, 0xa
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x30], sym.__Z7WndProcP6HWND__jjl_16
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x10], str.ChirpWindowClass
lea eax, [ebp - 0x34]
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], 0x138
mov dword [esp + 0x18], 0x1f3
mov dword [esp + 0x14], 0x80000000
mov dword [esp + 0x10], 0x80000000
mov dword [esp + 0xc], 0xca0000
mov dword [esp + 8], str.Chirp_Chirp
mov dword [esp + 4], str.ChirpWindowClass
mov dword [esp], 0
mov eax, dword [sym.imp.USER32.dll_CreateWindowExA]
call eax
sub esp, 0x30
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40181e
mov eax, 0
jmp 0x4018c1
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
call eax
sub esp, 8
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_UpdateWindow]
call eax
sub esp, 4
mov ecx, 0
mov eax, 0x1c
and eax, 0xfffffffc
mov edx, eax
mov eax, 0
mov dword [ebp + eax - 0x50], ecx
add eax, 4
cmp eax, edx
jb 0x401859
jmp 0x401886
lea eax, [ebp - 0x50]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_TranslateMessage]
call eax
sub esp, 4
lea eax, [ebp - 0x50]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_DispatchMessageA]
call eax
sub esp, 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
lea eax, [ebp - 0x50]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetMessageA]
call eax
sub esp, 0x10
test eax, eax
setne al
test al, al
jne 0x401866
call sym.ShutdownGDIPlus__
mov eax, 0
mov edi, dword [ebp - 4]
leave
ret 0x10

Function at 0x40b320
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__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 dbg.__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 0x40b380
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x42a06c]
test esi, esi
jle 0x40b4a0
mov eax, dword [0x42a070]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x40b3b4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40b437
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40b3a0
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x40b4c7
mov eax, dword [0x42a070]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x42a070]
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 0x40b4a7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x40b430
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x40b440
add dword [0x42a06c], 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 [0x42a070]
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 0x40b430
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40b3be
mov eax, dword [0x42a070]
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 dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop

Function at 0x40b9e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x42a088
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x42a080]
sub esp, 4
test ebx, ebx
je 0x40ba35
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 0x40ba2e
test esi, esi
je 0x40ba2e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40ba10
mov dword [esp], 0x42a088
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40bd70
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x40bd95
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x40bda0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x40bd95
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 0x40bde8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40bdde
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40bdea
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x40bdd0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x417030
Capabilities:
Contain obfuscated stackstrings
Print debug messages

Disassembly:
push edi
xor eax, eax
mov ecx, 0x10
sub esp, 0x88
lea edi, [esp + 0x40]
mov dword [esp + 0x15], 0x6f727245
mov dword [esp + 0x19], 0x6c632072
mov dword [esp + 0x1d], 0x696e6165
mov dword [esp + 0x21], 0x7520676e
mov dword [esp + 0x25], 0x70732070
mov dword [esp + 0x29], 0x6b5f6e69
mov dword [esp + 0x2d], 0x20737965
mov dword [esp + 0x31], 0x20726f66
mov dword [esp + 0x35], 0x65726874
mov dword [esp + 0x39], 0x206461
mov dword [esp + 0x3d], 0
mov dword [esp + 0x7c], 0
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea edx, [esp + 0x3c]
mov dword [esp + 8], 0xa
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__ultoa]
cmp byte [esp + 0x3c], 0
je 0x41710b
mov eax, 0x27
lea edx, [esp + 0x15]
jmp 0x4170dd
cmp eax, 0x6a
je 0x4170fa
mov ecx, eax
add eax, 1
cmp byte [edx + eax], 0
jne 0x4170d8
cmp eax, 0x6a
je 0x4170fa
add ecx, 2
mov byte [esp + eax + 0x15], 0xa
mov byte [esp + ecx + 0x15], 0
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
sub esp, 4
call sym._abort
mov ecx, 0x28
mov eax, 0x27
lea edx, [esp + 0x15]
jmp 0x4170f0

Function at 0x417490
Capabilities:
Allocate thread local storage

Disassembly:
cmp dword [0x42aae8], 1
je 0x417548
push edi
mov eax, 0x42aae8
push esi
push ebx
sub esp, 0x10
call dbg.enterOnceObject
lea esi, [eax + 4]
mov ebx, eax
mov dword [esp], esi
call dbg.pthread_mutex_lock
mov edi, dword [0x42aae8]
test edi, edi
jne 0x417500
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x41f05c], eax
cmp eax, 0xffffffff
je sym.__pthread_once_raw.constprop.0.isra.0.cold
mov dword [0x42aae8], 1
mov dword [esp], esi
call dbg.pthread_mutex_unlock
test ebx, ebx
je 0x41753a
add esp, 0x10
mov eax, ebx
pop ebx
pop esi
pop edi
jmp sym._leaveOnceObject.part.0
cmp edi, 1
je 0x4174e2
mov dword [esp], 2
call dword [0x41f044]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x42aae8
mov dword [esp + 4], str._once__p_is__d_n
mov dword [esp], eax
call sym._fprintf
mov dword [esp], esi
call dbg.pthread_mutex_unlock
test ebx, ebx
jne 0x4174ee
add esp, 0x10
pop ebx
pop esi
pop edi
ret
ret