joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41f993
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x41f9d2
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41f9d2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41f9d2
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x41f9d2
cmp dword [ecx + 0x74], 0xe
jbe 0x41f9d2
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x432150
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x43217d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x43217d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x503b67
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
mov ecx, ebp
push ebp
mov ebp, esp
mov dword [0x505076], ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x505298], eax
mov dword [0x505220], 0x5032dd
mov dword [0x50521c], 2
jmp 0x503b97
mov dword [0x505224], 0
mov dword [0x505228], 0
mov dword [0x505218], 0x30
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov dword [0x50522c], eax
mov dword [0x505240], 0x504088
mov dword [0x505238], 0xf
mov dword [0x50506e], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadIconA]
mov dword [0x505230], eax
mov dword [0x505244], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0x505234], eax
push 0x505218
call dword [sym.imp.user32.dll_RegisterClassExA]
push 0
push dword [0x50506e]
push 0
push 0
push 0x1e5
push 0x21e
push 0xffffe52a
push 0xfffff588
push 0x40000
push str.wait
push str.aroka
push 0
call dword [sym.imp.user32.dll_CreateWindowExA]
mov dword [0x505290], eax
push 5
push dword [0x505290]
call dword [sym.imp.user32.dll_ShowWindow]
push dword [0x505290]
call dword [sym.imp.user32.dll_UpdateWindow]
jmp 0x503c6a
push 0
push 0
push 0
push 0x505248
call dword [sym.imp.user32.dll_GetMessageA]
or eax, eax
je 0x503c97
push 0x505248
call dword [sym.imp.user32.dll_TranslateMessage]
push 0x505248
call dword [sym.imp.user32.dll_DispatchMessageA]
jmp 0x503c6a
mov eax, dword [0x505250]
jmp 0x503ca4
call 0x502b16
ret
Function at 0x40106966
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4010a5f0
push 0x4011655b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffff98
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 4], 0
push 2
call dword [sym.imp.MSVCRT.dll___set_app_type]
add esp, 4
mov dword [0x401205a0], 0xffffffff
mov dword [0x401205a4], 0xffffffff
call dword [sym.imp.MSVCRT.dll___p__fmode]
mov ecx, dword [0x40120598]
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll___p__commode]
mov edx, dword [0x40120594]
mov dword [eax], edx
mov eax, dword [sym.imp.MSVCRT.dll__adjust_fdiv]
mov ecx, dword [eax]
mov dword [0x4012059c], ecx
call fcn.40106aaf
mov eax, dword [0x40120588]
test eax, eax
je 0x4010e995
call fcn.40106ab0
push 0x40120584
push 0x40120580
call sub.MSVCRT.dll__initterm
add esp, 8
mov edx, dword [0x40120590]
mov dword [ebp - 0x6c], edx
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [0x4012058c]
push ecx
lea edx, [ebp - 0x64]
push edx
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x60]
push ecx
call dword [sym.imp.MSVCRT.dll___getmainargs]
add esp, 0x14
push 0x4012057c
push 0x40120540
call sub.MSVCRT.dll__initterm
add esp, 8
mov edx, dword [sym.imp.MSVCRT.dll__acmdln]
mov esi, dword [edx]
mov dword [ebp - 0x74], esi
cmp byte [esi], 0x22
je 0x4010e9a8
cmp byte [esi], 0x20
jbe 0x40106a5e
inc esi
mov dword [ebp - 0x74], esi
jmp 0x40106a53
mov al, byte [esi]
test al, al
je 0x40106a6e
cmp al, 0x20
ja 0x40106a6e
inc esi
mov dword [ebp - 0x74], esi
jmp 0x40106a5e
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
jne 0x4010e9c8
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x68], eax
push eax
call dword [sym.imp.MSVCRT.dll_exit]
jmp 0x4010e9f7
push 0x40116558
call dword [sym.imp.MSVCRT.dll___setusermatherr]
add esp, 4
jmp 0x401069ed
inc esi
mov dword [ebp - 0x74], esi
mov al, byte [esi]
test al, al
je 0x4010e9b6
cmp al, 0x22
jne 0x4010e9a8
cmp byte [esi], 0x22
jne 0x40106a5e
inc esi
mov dword [ebp - 0x74], esi
jmp 0x40106a5e
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40106a8e
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40109cf7
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
xor bl, bl
cmp dword [0x40120018], 0
jne 0x40109d60
lea eax, [ebp - 0x94]
mov dword [ebp - 0x94], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x84], 2
jne 0x40109d37
cmp dword [ebp - 0x90], 4
jb 0x40109d37
inc bl
push 0
push 0
push 0x4010aec8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x401108be
test bl, bl
mov dword [0x40120018], 0x40121308
je 0x401108c5
xor eax, eax
pop ebx
leave
ret
xor bl, bl
jmp 0x40109d4e
mov dword [0x40120018], 0x4012130c
jmp 0x40109d60

Function at 0x4010a3b0
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x4011dee1
call sub.MSVCRT.dll__EH_prolog
push ecx
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push edi
push edi
push edi
lea ecx, [esi + 0xc]
mov dword [ebp - 0x10], esi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
call fcn.4010a42a
push edi
push edi
push edi
push edi
lea ecx, [esi + 0x14]
mov dword [ebp - 4], edi
call fcn.4010a42a
push edi
push edi
push edi
push edi
lea ecx, [esi + 0x1c]
mov byte [ebp - 4], 1
call fcn.4010a42a
push edi
push edi
push 1
push edi
lea ecx, [esi + 0x24]
mov byte [ebp - 4], 2
call fcn.4010a42a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x30], eax
mov dword [esi], 0x40102190
mov eax, esi
pop edi
mov dword fs:[0], ecx
pop esi
leave
ret 8

Function at 0x4010a47b
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov esi, ecx
xor edi, edi
xor eax, eax
cmp dword [esi + 4], edi
setne al
test al, al
jne 0x401108d7
lea eax, [esi + 8]
push eax
push 4
push esi
push 0x4010a4f2
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
mov dword [esi + 4], eax
je 0x401108d7
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x401108d4
lea eax, [esi + 0x14]
mov ecx, esi
push eax
call fcn.40102082
lea eax, [ebp - 4]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 4], 0x103
jne 0x401108d4
mov al, 1
pop edi
pop esi
leave
ret
mov dword [esi + 4], edi
xor al, al
jmp 0x4010a4ee

Function at 0x4010d38c
Capabilities:
Link many functions at runtime

Disassembly:
call fcn.4010d3ef
cmp eax, 2
jne 0x40110907
push esi
call fcn.4010d3ef
cmp eax, 2
jne 0x4010d3eb
push 0x4010da3c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [0x4012002c], eax
je 0x4010d3eb
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4010da24
push eax
call esi
push 0x4010da0c
mov dword [0x40120024], eax
push dword [0x4012002c]
call esi
cmp dword [0x40120024], 0
mov dword [0x40120028], eax
je 0x40110921
xor eax, eax
pop esi
ret
cmp eax, 1
jne 0x4011091d
xor eax, eax
ret
call fcn.4010d7c7
jmp 0x4010d3eb
Function at 0x4010d417
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
lea eax, [ebp - 4]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401109e7
lea eax, [ebp - 0xc]
push eax
push 0x4010da48
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x401109e7
mov eax, dword [ebp - 0xc]
push 0
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
neg eax
sbb eax, eax
push 0
and eax, 2
push 0x10
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
push eax
push 0
push dword [ebp - 4]
mov dword [ebp - 0x1c], 1
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
neg eax
sbb eax, eax
inc eax
leave
ret
xor eax, eax
leave
ret
Function at 0x40115c16
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push ecx
lea ecx, [ebp - 0xc]
call fcn.40114e3b
cmp dword [ebp + 8], 0
jne 0x40115c98
xor eax, eax
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
je 0x40115c65
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x40115c65
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x40115cc6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x40115cc2
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
test edi, edi
je 0x40115c8c
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea esp, [ebp - 0x18]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and al, 0xfc
call fcn.4010db40
mov eax, esp
push esi
push dword [ebp + 8]
push eax
call fcn.40105c7b
jmp 0x40115c30
xor esi, esi
jmp 0x40115c81
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov eax, esi
cmp byte [ebx + esi], 0
je 0x40115d02
lea edi, [ebx + 1]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.4010db40
mov ecx, edi
mov eax, esp
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
and byte [eax + ebx], 0
mov edi, dword [ebp + 8]
push dword [ebp + 0x14]
lea ecx, [ebp - 0xc]
push eax
call fcn.40115922
mov esi, eax
jmp 0x40115c81

Function at 0x40116115
Capabilities:
Set registry value

Disassembly:
push esi
mov esi, ecx
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push dword [esp + 0xc]
push 1
push 0
push dword [esp + 0x1c]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop esi
ret 8
Function at 0x4011613c
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov eax, 0x4011d10b
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x114
push ebx
push esi
xor esi, esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esi
push 0xf003f
lea ecx, [ebp - 0x10]
push dword [ebp + 8]
mov dword [ebp - 4], esi
push dword [ebx]
call fcn.401160c6
mov edi, eax
cmp edi, esi
je 0x40116190
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.4011d06a
mov eax, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4
lea eax, [ebp - 0x20]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push eax
push esi
push esi
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x120]
mov dword [ebp - 0x14], 0x100
push eax
push esi
push dword [ebp - 0x10]
call edi
test eax, eax
jne 0x401161ff
lea eax, [ebp - 0x120]
lea ecx, [ebp - 0x10]
push eax
call fcn.4011613c
cmp eax, esi
mov dword [ebp - 0x18], eax
jne 0x401161ee
lea eax, [ebp - 0x20]
mov dword [ebp - 0x14], 0x100
push eax
push esi
push esi
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x120]
push eax
push esi
push dword [ebp - 0x10]
jmp 0x401161b3
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.4011d06a
mov eax, dword [ebp - 0x18]
jmp 0x4011617f
lea ecx, [ebp - 0x10]
call fcn.4011d06a
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
mov esi, eax
call fcn.4011d06a
mov eax, esi
jmp 0x4011617f
Function at 0x4011a8df
Capabilities:
Get file system object information

Disassembly:
mov eax, 0x4011dde5
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x1d0
push ebx
push esi
push edi
push 0
lea eax, [ebp - 0x58]
push 0x40
push eax
lea ecx, [ebp - 0x7c]
call fcn.4011acdc
mov ebx, 0x40113c50
mov dword [ebp - 0x7c], ebx
push dword [ebp + 0xc]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x7c]
call fcn.4011ad2e
push dword [ebp + 0x1c]
lea eax, [ebp - 0x1dc]
push 0x160
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x6c]
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 1
mov dword [ebp - 0x18], 0x40113c6c
test byte [ebp + 0x1d], 0x12
mov esi, dword [ebp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov byte [ebp - 4], 1
je 0x4011a976
lea eax, [esi + 0xc]
push 0x104
push eax
lea eax, [ebp - 0x1d0]
push 0xffffffffffffffff
push eax
push 0
push 0
call edi
test byte [ebp + 0x1d], 4
je 0x4011a994
lea eax, [esi + 0x214]
push 0x50
push eax
lea eax, [ebp - 0xcc]
push 0xffffffffffffffff
push eax
push 0
push 0
call edi
test byte [ebp + 0x1d], 1
mov eax, dword [ebp - 0x1d8]
je 0x4011a9ab
mov ecx, dword [ebp - 0x1dc]
mov dword [esi + 4], eax
mov dword [esi], ecx
test byte [ebp + 0x1d], 0x40
je 0x4011a9b4
mov dword [esi + 4], eax
test byte [ebp + 0x1d], 8
je 0x4011a9c3
mov eax, dword [ebp - 0x1d4]
mov dword [esi + 8], eax
and byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.4011dafa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x7c], ebx
call fcn.4011d7d6
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x18
Function at 0x4011bae5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push ecx
lea ecx, [ebp - 0xc]
call fcn.4011c28d
cmp dword [ebp + 8], 0
jne 0x4011bb67
xor eax, eax
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
je 0x4011bb34
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x4011bb34
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x4011bb95
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x4011bb91
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
test edi, edi
je 0x4011bb5b
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea esp, [ebp - 0x18]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and al, 0xfc
call fcn.4010db40
mov eax, esp
push esi
push dword [ebp + 8]
push eax
call fcn.40105c7b
jmp 0x4011baff
xor esi, esi
jmp 0x4011bb50
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov eax, esi
cmp byte [ebx + esi], 0
je 0x4011bbd1
lea edi, [ebx + 1]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.4010db40
mov ecx, edi
mov eax, esp
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
and byte [ebx + eax], 0
mov edi, dword [ebp + 8]
push dword [ebp + 0x14]
lea ecx, [ebp - 0xc]
push eax
call fcn.4011c15b
mov esi, eax
jmp 0x4011bb50
Function at 0x431000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43100c
pop eax
nop
nop
nop
nop
nop
add eax, 0x403e6a
nop
nop
sub eax, 0x403e10
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x431030
nop
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43101e
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp loc.00401219
Function at 0x4010b0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x400
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 4
mov esi, eax
lea eax, [esp + 0x10]
push 0
push eax
push 0x400
push esi
push ebx
mov dword [esp + 0x24], 0
call ebp
test eax, eax
je 0x401160
cmp dword [esp + 0x10], 0x400
jne 0x401160
push edi
push esi
call fcn.00401170
mov edi, eax
add esp, 4
cmp edi, 0x400
jbe 0x401144
push edi
push esi
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
mov esi, eax
lea ecx, [esp + 0x14]
add edi, 0xfffffc00
push 0
push ecx
lea edx, [esi + 0x400]
push edi
push edx
push ebx
call ebp
push esi
call fcn.00401170
add esp, 4
mov edi, eax
push esi
call fcn.00404130
push esi
mov dword [0x412ab8], eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop esi
pop ebp
pop ebx
ret

Function at 0x401170
Capabilities:
Parse pe header

Disassembly:
mov ecx, dword [esp + 4]
cmp word [ecx], 0x5a4d
je 0x40117e
xor eax, eax
ret
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
je 0x40118e
xor eax, eax
ret
mov eax, dword [eax + 0x54]
ret
Function at 0x401660
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x308
lea eax, [esp + 0x108]
lea ecx, [esp + 0x208]
lea edx, [esp + 8]
push eax
push ecx
lea eax, [esp + 8]
push edx
push eax
push 0x4129a8
call dword [sym.imp.MSVCRT.dll__splitpath]
push 0x4086e0
call fcn.00401640
add esp, 0x18
test al, al
je 0x4016b2
push 0x412ad4
lea ecx, [esp + 0xc]
push 0x411b30
lea edx, [esp + 8]
push ecx
push edx
jmp 0x4016c6
push str..bin
lea eax, [esp + 0xc]
push str.main
lea ecx, [esp + 8]
push eax
push ecx
push 0x4128a0
call dword [sym.imp.MSVCRT.dll__makepath]
mov al, byte [0x40872c]
add esp, 0x14
test al, 0x40
push ebx
push ebp
push esi
push edi
jne 0x401843
call fcn.00401070
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
call fcn.004011a0
mov esi, eax
add esi, 0x10000
sub ebx, esi
mov ebp, ebx
push ebp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov ebx, eax
push 0
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, esi
je 0x40174d
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.SetFilePointer_for_input.
call fcn.00404040
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x308
ret
lea edx, [esp + 0x14]
push 0
push edx
push ebp
push ebx
push edi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401793
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.ReadFile_for_input.
call fcn.00404040
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x308
ret
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push 0x4128a0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4017e1
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Cannot_open_output_file.
call fcn.00404040
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x308
ret
lea eax, [esp + 0x14]
push 0
push eax
push ebp
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401824
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push esi
call edi
push str.WriteFile_for_output_file.
call fcn.00404040
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x308
ret
push str.Copy_succeeded.
call fcn.00404040
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 8
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push esi
call edi
pop edi
pop esi
pop ebp
mov eax, 0x4128a0
pop ebx
add esp, 0x308
ret
Function at 0x401920
Capabilities:
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x404
mov eax, dword [esp + 0x408]
push esi
push 0
push 0x10000000
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4019b2
lea ecx, [esp + 4]
push 0
push ecx
lea edx, [esp + 0x10]
push 0x400
push edx
push esi
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4019ab
cmp dword [esp + 4], 0x400
jne 0x4019ab
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp word [esp + 8], 0x5a4d
jne 0x4019b2
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + eax + 8]
lea eax, [esp + eax + 8]
cmp ecx, 0x4550
jne 0x4019b2
mov eax, dword [eax + 0x34]
pop esi
add esp, 0x404
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
add esp, 0x404
ret

Function at 0x4019c0
Capabilities:
Read file on windows
Timestomp file
Write file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov edi, dword [esp + 0x20]
push ebp
push 0x80
push 3
push ebp
push 3
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401a02
push str.UnPatchFile._cannnot_open_the_file.
call fcn.00404040
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ebp
push eax
push ebp
push ebp
push esi
mov dword [esp + 0x28], ebp
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov ebx, dword [edi + 0x88]
cmp ebx, ebp
jne 0x401a27
mov ebx, 4
push ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x401a4d
push str.UnPatchFile._cannnot_allocate_buffer.
call fcn.00404040
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ecx, dword [edi + 0x80]
push 0
push 0
push ecx
push esi
mov byte [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [edi + 0x80]
jne 0x401adf
lea edx, [esp + 0x10]
push 0
push edx
push ebx
push ebp
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401adf
cmp dword [esp + 0x10], ebx
jne 0x401adf
mov eax, dword [esp + 0x24]
push eax
push edi
push ebp
call fcn.00404180
mov ecx, dword [edi + 0x80]
add esp, 0xc
mov byte [esp + 0x20], al
push 0
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov al, byte [esp + 0x20]
test al, al
je 0x401adf
lea edx, [esp + 0x10]
push 0
push edx
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401adf
lea eax, [esp + 0x14]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret