joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404542
Capabilities:
Extract resource via kernel32 functions
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
xor esi, esi
cmp dword [edi + 0x14], ebx
jne 0x40457f
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadBitmapA]
mov edi, eax
cmp edi, ebx
jne 0x404578
push dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call esi
push 0x4257d0
call esi
mov eax, edi
jmp 0x404622
push 2
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x404620
push eax
mov dword [ebp + 0xc], ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ebx
mov esi, eax
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, eax
lea eax, [ebp - 4]
push eax
push esi
mov ecx, edi
call fcn.0040449f
mov edi, eax
test edi, edi
je 0x4045dd
push 0
push edi
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
mov dword [ebp + 0xc], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [esi]
mov ecx, dword [ebp - 4]
push 0
push esi
lea eax, [eax + ecx*4]
add eax, esi
push eax
push 4
push esi
push ebx
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
test edi, edi
mov esi, eax
je 0x40460e
push 0
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x404b83
Capabilities:
Get common file path
Set current directory

Disassembly:
mov eax, 0x41ff40
call fcn.00417aac
sub esp, 0x310
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi], ebx
je 0x404ba4
xor eax, eax
jmp 0x404ce0
push edi
push 0x425108
push 1
lea ecx, [ebp - 0x10]
call fcn.004169d0
lea eax, [ebp - 0x114]
push 0x100
push eax
push 0x42537c
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
call fcn.00416a10
test eax, eax
mov edi, 0x104
jne 0x404c2d
lea eax, [ebp - 0x114]
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebx
lea eax, [ebp - 0x218]
push ebx
push eax
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.00417ceb
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.00417450
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.00417460
add esp, 0x24
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x114]
push eax
call edi
lea eax, [ebp - 0x114]
push eax
call fcn.00417c70
cmp byte [ebp + eax - 0x115], 0x5c
pop ecx
je 0x404c74
lea eax, [ebp - 0x114]
push 0x42506c
push eax
call fcn.00417460
pop ecx
pop ecx
lea eax, [ebp - 0x114]
push 0x425810
push eax
call fcn.00417460
pop ecx
lea eax, [ebp - 0x114]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi], eax
lea eax, [ebp - 0x218]
push eax
call edi
mov eax, dword [esi]
cmp eax, ebx
je 0x404cce
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4257fc
push eax
call edi
cmp eax, ebx
mov dword [esi + 4], eax
je 0x404cce
push 0x4257ec
push dword [esi]
call edi
cmp eax, ebx
mov dword [esi + 8], eax
je 0x404cce
xor esi, esi
jmp 0x404cd1
or esi, 0xffffffff
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.004169f0
mov eax, esi
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x4067a7
Capabilities:
Hide graphical window

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0xad4]
test eax, eax
je 0x4067e7
push dword [esi + 4]
push dword [eax + 0x24]
call dword [sym.imp.USER32.dll_SetParent]
push edi
push 0
push 1
push 0x844d
mov ecx, esi
call fcn.0040669c
mov eax, dword [esi + 0xad4]
push 0
push dword [eax + 0x24]
call dword [sym.imp.USER32.dll_ShowWindow]
mov dword [edi], 1
pop edi
xor eax, eax
pop esi
ret 0x10
Function at 0x4087fe
Capabilities:
Capture webcam image
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov esi, ecx
push 0x27
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 4], edi
mov ecx, dword [eax + 4]
cmp ecx, 0x100
je 0x4088e9
cmp ecx, 0x200
jne 0x4088c2
movzx ecx, word [eax + 0xc]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xc], ecx
shr eax, 0x10
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push dword [esi + 4]
call dword [sym.imp.USER32.dll_ScreenToClient]
lea eax, [ebp - 0xc]
push eax
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 0x445
push dword [esi + 0x2e0]
call edi
mov ebx, eax
test ebx, ebx
jl 0x4088c0
movzx eax, word [esi + 0x324]
push 0
push eax
push 0x419
push dword [esi + 0x2e0]
call edi
cmp ebx, eax
je 0x4088c0
push 0x14
lea eax, [ebp - 0x20]
push 0
push eax
call fcn.004171d0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
push ebx
push 0x417
push dword [esi + 0x2e0]
call edi
test eax, eax
je 0x4088c0
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], 1
mov dword [esi + 0x328], eax
xor edi, edi
cmp dword [ebp - 4], edi
mov dword [esi + 0x338], edi
mov dword [esi + 0x32c], edi
je 0x4088e0
push edi
push edi
push 0x1f
push dword [esi + 4]
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 4
mov eax, dword [eax + 8]
sub eax, 0x25
je 0x40893d
dec eax
dec eax
jne 0x4088c2
mov eax, dword [esi + 0x330]
shr eax, 0x10
test al, 0x10
jne 0x4088c2
mov eax, dword [esi + 0x338]
cmp eax, dword [esi + 0x334]
je 0x408914
cmp eax, edi
jne 0x4088c2
push dword [esi + 0x320]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov ecx, dword [esi + 0x324]
add eax, 0x64
inc ecx
cmp ecx, eax
jae 0x4088c2
mov dword [ebp - 4], 1
mov dword [esi + 0x328], ecx
jmp 0x4088c2
mov eax, dword [esi + 0x338]
cmp eax, dword [esi + 0x334]
je 0x408953
cmp eax, edi
jne 0x4088c2
push dword [esi + 0x320]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov eax, dword [esi + 0x324]
cmp eax, 0x64
jbe 0x4088c2
dec eax
mov dword [ebp - 4], 1
mov dword [esi + 0x328], eax
jmp 0x4088c2
Function at 0x4094f3
Capabilities:
Capture webcam image

Disassembly:
mov eax, 0x42066a
call fcn.00417aac
sub esp, 0x13c
push dword [ebp + 8]
mov dword [ebp - 0x14], ecx
call dword [sym.imp.USER32.dll_IsMenu]
test eax, eax
jne 0x40951b
or eax, 0xffffffff
jmp 0x409691
push ebx
push edi
xor ebx, ebx
push 0x2c
lea eax, [ebp - 0x44]
push ebx
push eax
call fcn.004171d0
add esp, 0xc
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
xor edi, edi
cmp eax, ebx
mov dword [ebp - 0x18], eax
jle 0x40968d
push esi
mov esi, 0x100
lea eax, [ebp - 0x148]
mov dword [ebp - 0x44], 0x2c
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x44]
push eax
push 1
push edi
mov dword [ebp - 0x40], 0x36
push dword [ebp + 8]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x30], ebx
mov byte [ebp - 0x148], bl
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
test eax, eax
je 0x409682
test dword [ebp - 0x3c], esi
jne 0x409664
push 0x20
call fcn.00417c5c
pop ecx
mov ecx, eax
mov dword [ebp - 0x48], ecx
cmp ecx, ebx
mov dword [ebp - 4], ebx
je 0x4095a9
call fcn.0040969f
jmp 0x4095ab
xor eax, eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x148]
push ecx
lea ecx, [eax + 4]
mov dword [ebp - 0x10], eax
call fcn.004020be
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
cmp dword [ebp + 0x14], ebx
mov dword [ecx + 0x18], eax
je 0x409628
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x318]
cmp dword [ecx + 0x14], ebx
jne 0x409628
mov ecx, dword [eax + 0x31c]
cmp ecx, ebx
je 0x409628
movzx eax, word [ebp - 0x34]
push ebx
push eax
push 0x419
call fcn.00410cd6
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
jl 0x409628
mov eax, dword [ebp - 0x14]
push ebx
push dword [ebp - 0x34]
mov ecx, dword [eax + 0x31c]
push 0x42c
call fcn.00410cd6
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x14], eax
jmp 0x40962f
mov eax, dword [ebp - 0x10]
or dword [eax + 0x14], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x3c]
mov dword [ecx + 0x10], eax
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.00409c4b
mov eax, dword [ebp - 0x10]
or dword [ebp - 0x3c], esi
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x44]
push eax
push 1
push edi
mov dword [ebp - 0x40], 0x30
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetMenuItemInfoA]
cmp dword [ebp - 0x30], ebx
je 0x409682
cmp dword [ebp + 0x10], ebx
je 0x409682
push dword [ebp + 0x14]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 0x30]
call fcn.004094f3
inc edi
cmp edi, dword [ebp - 0x18]
jl 0x40954a
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 0x10
Function at 0x40a189
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
push dword [esp + 0x10]
xor edi, edi
call fcn.00417c70
add eax, 5
push eax
call fcn.00417c5c
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x40a208
push dword [esp + 0x10]
push esi
call fcn.00417450
cmp byte [esi], 0
pop ecx
pop ecx
je 0x40a1c8
mov eax, esi
cmp byte [eax], 0x20
jne 0x40a1c2
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40a1ba
push 0x42589c
push esi
call fcn.00417460
pop ecx
pop ecx
push 0x425898
push esi
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40a201
push eax
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40a201
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push esi
call fcn.00417b50
pop ecx
mov eax, edi
pop edi
pop esi
ret
Function at 0x40b64c
Capabilities:
Get common file path
Set current directory

Disassembly:
mov eax, 0x4206d0
call fcn.00417aac
sub esp, 0x21c
push ebx
push esi
mov esi, ecx
push edi
push dword [esi + 0x58]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40b6a6
mov eax, dword [esi + 0x40]
xor ebx, ebx
cmp eax, ebx
je 0x40b684
push dword [esi + 0x44]
push dword [esi + 0x38]
call eax
jmp 0x40b7fd
push dword [esi + 0x58]
push ebx
push 0x806d
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageA]
push 5
push dword [esi + 0x58]
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x40b7fd
mov ecx, dword [esi + 0x18]
xor ebx, ebx
cmp ecx, ebx
je 0x40b6b6
call fcn.00402193
jmp 0x40b6b8
xor eax, eax
push ebx
lea ecx, [ebp - 0x124]
push ebx
push ecx
lea ecx, [ebp - 0x228]
push ecx
push eax
call fcn.00417ceb
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.00417460
add esp, 0x1c
lea eax, [ebp - 0x124]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x228]
push eax
call edi
mov ecx, dword [esi + 0x18]
cmp ecx, ebx
je 0x40b713
call fcn.00402193
jmp 0x40b715
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0x30], eax
lea eax, [ebp - 0x124]
push eax
call edi
mov eax, dword [esi + 0x30]
cmp eax, ebx
jne 0x40b73a
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b804
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x425bf4
push eax
call edi
push 0x425be4
mov dword [esi + 0x3c], eax
push dword [esi + 0x30]
call edi
push 0x425bd0
mov dword [ebp - 0x14], eax
push dword [esi + 0x30]
call edi
push 0x425bc8
mov dword [ebp - 0x10], eax
push dword [esi + 0x30]
call edi
cmp dword [esi + 0x3c], ebx
mov dword [esi + 0x40], eax
je 0x40b801
cmp dword [ebp - 0x14], ebx
jne 0x40b785
cmp dword [ebp - 0x10], ebx
je 0x40b801
cmp dword [ebp - 0x10], ebx
je 0x40b7d9
push dword [ebp + 0x10]
lea ecx, [ebp - 0x20]
call fcn.0040836a
lea eax, [esi + 0x24]
lea ecx, [ebp - 0x20]
push eax
mov dword [ebp - 4], ebx
call fcn.00407452
mov ecx, dword [ebp - 0x20]
cmp ecx, ebx
je 0x40b7b2
call fcn.00402193
jmp 0x40b7b4
xor eax, eax
push dword [esi + 0x44]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
or dword [ebp - 4], 0xffffffff
cmp ecx, ebx
mov dword [esi + 0x38], eax
je 0x40b7e5
call fcn.00401c6b
mov dword [ebp - 0x20], ebx
jmp 0x40b7e5
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [ebp - 0x14]
mov dword [esi + 0x38], eax
cmp dword [esi + 0x38], ebx
je 0x40b801
push 1
push ebx
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_InvalidateRect]
push ebx
call fcn.0040a0a0
pop ecx
xor eax, eax
jmp 0x40b804
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc
Function at 0x40b65d
Capabilities:
Get common file path
Set current directory

Disassembly:
mov eax, 0x4206d0
call fcn.00417aac
sub esp, 0x21c
push ebx
push esi
mov esi, ecx
push edi
push dword [esi + 0x58]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40b6a6
mov eax, dword [esi + 0x40]
xor ebx, ebx
cmp eax, ebx
je 0x40b684
push dword [esi + 0x44]
push dword [esi + 0x38]
call eax
jmp 0x40b7fd
push dword [esi + 0x58]
push ebx
push 0x806d
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageA]
push 5
push dword [esi + 0x58]
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x40b7fd
mov ecx, dword [esi + 0x18]
xor ebx, ebx
cmp ecx, ebx
je 0x40b6b6
call fcn.00402193
jmp 0x40b6b8
xor eax, eax
push ebx
lea ecx, [ebp - 0x124]
push ebx
push ecx
lea ecx, [ebp - 0x228]
push ecx
push eax
call fcn.00417ceb
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.00417460
add esp, 0x1c
lea eax, [ebp - 0x124]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x228]
push eax
call edi
mov ecx, dword [esi + 0x18]
cmp ecx, ebx
je 0x40b713
call fcn.00402193
jmp 0x40b715
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0x30], eax
lea eax, [ebp - 0x124]
push eax
call edi
mov eax, dword [esi + 0x30]
cmp eax, ebx
jne 0x40b73a
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b804
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x425bf4
push eax
call edi
push 0x425be4
mov dword [esi + 0x3c], eax
push dword [esi + 0x30]
call edi
push 0x425bd0
mov dword [ebp - 0x14], eax
push dword [esi + 0x30]
call edi
push 0x425bc8
mov dword [ebp - 0x10], eax
push dword [esi + 0x30]
call edi
cmp dword [esi + 0x3c], ebx
mov dword [esi + 0x40], eax
je 0x40b801
cmp dword [ebp - 0x14], ebx
jne 0x40b785
cmp dword [ebp - 0x10], ebx
je 0x40b801
cmp dword [ebp - 0x10], ebx
je 0x40b7d9
push dword [ebp + 0x10]
lea ecx, [ebp - 0x20]
call fcn.0040836a
lea eax, [esi + 0x24]
lea ecx, [ebp - 0x20]
push eax
mov dword [ebp - 4], ebx
call fcn.00407452
mov ecx, dword [ebp - 0x20]
cmp ecx, ebx
je 0x40b7b2
call fcn.00402193
jmp 0x40b7b4
xor eax, eax
push dword [esi + 0x44]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
or dword [ebp - 4], 0xffffffff
cmp ecx, ebx
mov dword [esi + 0x38], eax
je 0x40b7e5
call fcn.00401c6b
mov dword [ebp - 0x20], ebx
jmp 0x40b7e5
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [ebp - 0x14]
mov dword [esi + 0x38], eax
cmp dword [esi + 0x38], ebx
je 0x40b801
push 1
push ebx
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_InvalidateRect]
push ebx
call fcn.0040a0a0
pop ecx
xor eax, eax
jmp 0x40b804
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc
Function at 0x40c3c3
Capabilities:
Hide graphical window

Disassembly:
push ebx
mov ebx, dword [sym.imp.USER32.dll_IsWindow]
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, ecx
push ebp
call ebx
test eax, eax
je 0x40c435
mov ecx, dword [esi + 0x14c]
test ecx, ecx
jl 0x40c412
mov edx, dword [esi + 0x5fc]
test edx, edx
jne 0x40c3f1
xor eax, eax
jmp 0x40c3fc
mov eax, dword [esi + 0x600]
sub eax, edx
sar eax, 2
cmp ecx, eax
jae 0x40c412
mov eax, dword [esi + 0x5fc]
mov eax, dword [eax + ecx*4]
cmp dword [eax + 0x58], 0
jne 0x40c412
mov dword [eax + 0x58], ebp
push edi
lea edi, [esi + 0x5f4]
push dword [edi]
call ebx
test eax, eax
je 0x40c42b
push 0
push dword [edi]
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, esi
mov dword [edi], ebp
call fcn.0040c55a
pop edi
xor eax, eax
push 3
push eax
push eax
push eax
push eax
push eax
push dword [esi + 0x5f4]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov eax, dword [esp + 0x1c]
pop esi
pop ebp
pop ebx
mov dword [eax], 1
xor eax, eax
ret 0x10

Function at 0x40e651
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push 2
push dword [ebp + 0xc]
xor esi, esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40e708
and dword [ebp + 0xc], esi
push ebx
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
mov esi, eax
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp + 8], eax
lea eax, [ebp - 4]
push eax
push esi
call fcn.0040e5b0
mov ebx, dword [sym.imp.GDI32.dll_SelectPalette]
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x40e6c1
push 0
push edi
push dword [ebp + 8]
call ebx
push dword [ebp + 8]
mov dword [ebp + 0xc], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [esi]
mov ecx, dword [ebp - 4]
push 0
push esi
lea eax, [eax + ecx*4]
add eax, esi
push eax
push 4
push esi
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
test edi, edi
mov esi, eax
je 0x40e6f2
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call ebx
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [ebp + 8]
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop ebx
mov eax, esi
pop esi
leave
ret
Function at 0x4120b7
Capabilities:
Get common file path
Link many functions at runtime
Set current directory

Disassembly:
mov eax, 0x420840
call fcn.00417aac
sub esp, 0x310
push esi
mov esi, ecx
cmp dword [esi + 4], 0
je 0x4120d8
push 1
pop eax
jmp 0x412270
push edi
push 0x425108
push 1
lea ecx, [ebp - 0x10]
call fcn.004169d0
and dword [ebp - 4], 0
lea eax, [ebp - 0x114]
push 0x100
push eax
push 0x42537c
lea ecx, [ebp - 0x10]
call fcn.00416a10
test eax, eax
mov edi, 0x104
jne 0x412169
lea eax, [ebp - 0x114]
push edi
push eax
push dword [0x4290a4]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
lea eax, [ebp - 0x218]
push 0
push eax
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.00417ceb
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.00417450
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.00417460
add esp, 0x24
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x114]
push eax
call edi
lea eax, [ebp - 0x114]
push eax
call fcn.00417c70
cmp byte [ebp + eax - 0x115], 0x5c
pop ecx
je 0x4121b0
lea eax, [ebp - 0x114]
push 0x42506c
push eax
call fcn.00417460
pop ecx
pop ecx
lea eax, [ebp - 0x114]
push 0x425d18
push eax
call fcn.00417460
pop ecx
lea eax, [ebp - 0x114]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 4], eax
lea eax, [ebp - 0x218]
push eax
call edi
mov eax, dword [esi + 4]
test eax, eax
je 0x41225e
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x425d04
push eax
call edi
test eax, eax
mov dword [esi + 8], eax
je 0x41225e
push 0x425cf0
push dword [esi + 4]
call edi
test eax, eax
mov dword [esi + 0xc], eax
je 0x41225e
push 0x425ce4
push dword [esi + 4]
call edi
test eax, eax
mov dword [esi + 0x10], eax
je 0x41225e
push 0x425cd0
push dword [esi + 4]
call edi
test eax, eax
mov dword [esi + 0x14], eax
je 0x41225e
push 0x425cc0
push dword [esi + 4]
call edi
test eax, eax
mov dword [esi + 0x18], eax
je 0x41225e
push 0x425cb4
push dword [esi + 4]
call edi
test eax, eax
mov dword [esi + 0x1c], eax
je 0x41225e
lea eax, [esi + 0x24]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [esi + 8]
mov esi, eax
jmp 0x412261
push 0xffffffffffffffee
pop esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.004169f0
mov eax, esi
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret 8
Function at 0x4129c5
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x358
push ebx
and dword [ebp - 4], 0
push esi
mov ebx, 0x105
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x110]
push ebx
push eax
push dword [0x4290a4]
call edi
inc dword [ebp - 4]
lea eax, [ebp - 0x110]
push 0x5c
push eax
call fcn.00417fbe
inc eax
push 0x425d70
push eax
call fcn.00417450
add esp, 0x10
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x412ac1
lea eax, [ebp - 0x224]
push 0x2e
push eax
call fcn.00417fbe
mov esi, eax
lea eax, [ebp - 0x224]
push 0x2e
push eax
and byte [esi], 0
call fcn.00417fbe
add esp, 0x10
mov byte [esi], 0x2e
test eax, eax
je 0x412aa0
sub esi, eax
cmp esi, 4
jne 0x412aa0
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x358]
push eax
call fcn.00417450
lea eax, [ebp - 0x358]
push 0x2a
push eax
call fcn.00417fbe
lea ecx, [ebp - 0x224]
push ecx
push eax
call fcn.00417450
add esp, 0x18
lea eax, [ebp - 0x358]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x250]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x412a30
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 4], 1
jne 0x412af9
lea eax, [ebp - 0x110]
push ebx
push eax
push dword [0x4290a4]
call edi
lea eax, [ebp - 0x110]
push 0x5c
push eax
call fcn.00417fbe
inc eax
push 0x425d64
push eax
call fcn.00417450
add esp, 0x10
jmp 0x4129f0
pop edi
pop esi
pop ebx
leave
ret