joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4042db
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push dword [ebp + 0xc]
mov esi, 0x8000004
push 0x64
push ebx
push esi
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingA]
mov edi, eax
cmp edi, ebx
mov byte [ebp - 1], 1
je 0x40431c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x40432d
mov byte [ebp - 1], bl
jmp 0x40432d
push dword [ebp + 0xc]
push ebx
push esi
call dword [sym.imp.KERNEL32.DLL_OpenFileMappingA]
mov edi, eax
cmp edi, ebx
je 0x404369
push ebx
push ebx
push ebx
push 6
push edi
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
push edi
mov dword [0x4dbc6c], eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [0x4dbc6c]
cmp eax, ebx
je 0x404369
cmp byte [ebp - 1], bl
je 0x404364
push 0x64
push ebx
push eax
call fcn.004adaa0
mov eax, dword [0x4dbc6c]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405fb1
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
jne 0x405fcd
lea ebx, [ebp - 0x14]
cmp dword [ebp + 0xc], edi
mov esi, dword [ebp + 0xc]
jne 0x405feb
cmp dword [ebp + 8], edi
lea esi, [ebp - 0x10]
je 0x406176
push dword [ebx]
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
push 0x26c
mov ecx, ebx
call fcn.00444e77
push esi
call fcn.00403981
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [esi]
mov dword [ebp - 0x18], edi
push dword [ebx]
call fcn.00405b32
add esp, 0x10
push 0
call dword [sym.imp.KERNEL32.DLL_SetLastError]
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
mov dword [ebp - 8], 0xc7
jmp 0x40602e
mov edi, dword [ebp - 0x18]
cmp dword [ebp + 8], 0
je 0x4060d9
mov eax, dword [ebx]
lea eax, [eax + edi*2]
push 0x4c1330
mov dword [ebp - 0x1c], eax
call fcn.00440d8b
mov edi, eax
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
add edi, eax
push edi
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s_
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [ebx]
add esp, 0x18
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
jne 0x406098
push edi
push edi
push 5
mov ecx, 0x4dc0f8
call fcn.00415ff0
dec dword [ebp - 8]
jns 0x40602b
jmp 0x406152
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0xc], 1
je 0x406176
push dword [ebx]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [ebx]
mov dword [ebp + 8], eax
push dword [esi]
call fcn.00405b32
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [ebp + 8]
mov ecx, dword [esi]
add esp, 0xc
and word [ecx + eax*2], 0
jmp 0x4060db
mov eax, edi
and dword [ebp + 8], 0
add eax, eax
mov dword [ebp + 0xc], eax
push dword [ebp + 0x18]
mov edi, dword [esi]
push dword [ebp + 8]
add edi, dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esi]
add esp, 0x18
xor edi, edi
push edi
push 0x80
push 1
push edi
push edi
push 0x40000000
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], edi
call fcn.00405bea
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x40614d
push edi
push edi
push 5
mov ecx, 0x4dc0f8
call fcn.00415ff0
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xc8
jl 0x4060e4
mov eax, dword [esi]
and word [eax], di
cmp dword [ebp - 0xc], edi
jne 0x406157
mov eax, dword [ebx]
mov word [eax], di
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x406165
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
jmp 0x406173
cmp dword [ebp - 4], edi
je 0x406173
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edi, dword [ebp - 4]
lea ecx, [ebp - 0x10]
call fcn.0043e679
lea ecx, [ebp - 0x14]
call fcn.0043e679
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40618d
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
push str.PECMD:MSGSVR:HWND
xor ebx, ebx
push ebx
call fcn.004042db
pop ecx
pop ecx
call fcn.00403e63
mov byte [0x4dbc46], 1
call fcn.004062f5
call fcn.004405b8
push str.TaskbarButtonCreated
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
push ebx
push 0x24
pop edi
mov dword [0x4dbc48], eax
push edi
lea eax, [ebp - 0x12c]
push eax
push ebx
mov byte [ebp - 0x12c], bl
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push str.System32Kernel32
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
push str.user32
mov dword [0x4dbff8], eax
mov dword [ebp - 4], eax
call esi
push str.GDI32
mov dword [0x4dbff4], eax
call esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push 0x4c13e0
push dword [ebp - 4]
mov dword [0x4dbffc], eax
call esi
push 7
pop ecx
mov dword [ebp - 0x28], edi
push str.GetNativeSystemInfo
push dword [ebp - 4]
mov dword [0x4dbbe4], eax
xor eax, eax
mov dword [ebp - 0x24], ebx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
call esi
cmp eax, ebx
je 0x406265
lea ecx, [ebp - 0x28]
push ecx
call eax
call fcn.004414d2
shrd eax, edx, 0x10
shr edx, 0x10
cmp word [ebp - 0x28], bx
je 0x4062b5
cmp eax, 0x50000
jbe 0x4062b5
push str.Wow64RevertWow64FsRedirection
push dword [ebp - 4]
call esi
push str.Wow64DisableWow64FsRedirection
push dword [ebp - 4]
mov dword [0x4dbc40], eax
call esi
cmp dword [0x4dbc40], ebx
mov dword [0x4dbc3c], eax
jne 0x4062aa
mov dword [0x4dbc3c], ebx
mov bl, 1
mov word [0x4dbc28], 0x100
movsx eax, bl
push str.bX64
push eax
mov esi, 0x4dc0f8
push esi
mov byte [0x4dbc45], bl
call fcn.0044749d
push str.ptrlen
push 4
push esi
call fcn.0044749d
push str.WM_TASKBARBUTTONCREATED
push dword [0x4dbc48]
push esi
call fcn.0044749d
add esp, 0x24
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4062f6
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov dword [ebp - 8], eax
lea ecx, [eax + 8]
push ebx
mov bx, word [eax]
mov dword [ebp - 8], ecx
mov ax, word [ecx]
call fcn.0040f8eb
test al, al
jne 0x40631a
inc ecx
inc ecx
mov dword [ebp - 8], ecx
push 0x63
lea eax, [ebp - 0x78]
push eax
push str.DEBUGMDG
mov byte [ebp - 0x78], 0
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
cmp byte [ebp - 0x78], 0x31
jne 0x40633c
mov byte [0x4dbc50], 1
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
push dword [ebp - 8]
and dword [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov dword [0x4dbc54], eax
call fcn.0044e66d
lea ecx, [ebp - 0xc]
call fcn.00444e32
push 1
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x14]
mov ecx, 0x4dc0f8
call fcn.0045522d
push dword [ebp - 0xc]
lea ecx, [ebp - 0x10]
call fcn.0044e731
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0xc]
mov dword [ebp - 8], eax
call fcn.0043e679
lea ecx, [ebp - 0x14]
call fcn.0043e679
mov ecx, dword [ebp - 8]
call fcn.004040ba
push str._InstallService
mov edi, eax
push 0xf
pop esi
mov dword [ebp - 8], edi
call fcn.00402d68
test al, al
pop ecx
pop edi
pop esi
je 0x4063dd
push 0x1e
push str._Service
push dword [ebp - 8]
mov byte [ebp - 1], 0x49
call fcn.00414409
mov ecx, dword [ebp - 8]
add esp, 0xc
add ecx, 0x1e
call fcn.004040ba
mov dword [ebp - 8], eax
jmp 0x4063f8
push 8
lea eax, [ebp - 8]
push eax
push 0x4c1468
call fcn.00446de5
add esp, 0xc
test al, al
je 0x406457
mov byte [ebp - 1], 0x53
cmp bx, 0x22
jne 0x406432
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edx, dword [ebp - 8]
lea ecx, [edx + eax*2 - 2]
cmp ecx, edx
jbe 0x406432
mov ax, word [ecx]
call fcn.0040f8eb
test al, al
je 0x406424
dec ecx
dec ecx
cmp ecx, edx
ja 0x406412
cmp ecx, edx
jbe 0x406432
cmp word [ecx], 0x22
jne 0x406432
and word [ecx], 0
sub dword [ebp - 8], 2
movsx ax, byte [ebp - 1]
mov ecx, dword [ebp - 8]
mov word [ecx], ax
sub dword [ebp - 8], 2
mov eax, dword [ebp - 8]
mov word [eax], 0x7e
push dword [ebp - 8]
call fcn.0040f72c
jmp 0x406477
push 0xe
lea eax, [ebp - 8]
push eax
push str._RemoveService
call fcn.00446de5
add esp, 0xc
test al, al
pop ebx
je 0x406480
push dword [ebp - 8]
call fcn.00406713
pop ecx
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
lea ecx, [ebp - 0x10]
call fcn.0043e679
xor eax, eax
leave
ret
Function at 0x406518
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov dword [0x4dbc5c], eax
cmp word [eax], 0x7e
push edi
mov dword [ebp - 0x14], pe_nt_image_headers32
mov byte [ebp - 1], bl
jne 0x406552
inc eax
inc eax
mov dword [0x4dbc5c], eax
cmp word [eax], 0x49
sete byte [ebp - 1]
inc eax
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp + 8]
push eax
call fcn.00405b4a
pop ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
sub esi, dword [ebp - 0x10]
mov eax, 0x400
sar esi, 1
cmp esi, eax
jle 0x406574
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.0043e611
push 6
push dword [ebp - 0xc]
push str.__gui_
call fcn.0043fa6d
mov edi, dword [sym.imp.KERNEL32.DLL_lstrlenW]
add esp, 0x10
test al, al
je 0x4065c9
mov eax, dword [ebp - 0xc]
add eax, 0xc
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x14], ebx
call fcn.0043e611
pop ecx
push dword [ebp + 8]
call edi
inc eax
add eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.004143bf
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x828]
push eax
call fcn.00414409
add esp, 0xc
push dword [ebp - 0x10]
mov word [ebp + esi - 0x828], bx
mov byte [0x4dbc16], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 8]
call fcn.00444e50
mov eax, dword [ebp - 8]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x406706
mov eax, dword [ebp - 8]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 8]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp + 8], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x40664f
mov ax, word [edx]
call fcn.0040f8eb
test al, al
je 0x40664d
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x40663e
cmp di, bx
mov edx, dword [ebp - 8]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x406670
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp + 8], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x4c14b8
push edi
call fcn.00414409
push esi
push dword [ebp - 0x10]
add edi, 0x1e
push edi
call fcn.00405b32
add esp, 0x18
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x406703
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
or eax, 0x10
push ebx
push 2
push eax
push 0xf01ff
lea eax, [ebp - 0x828]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x406703
cmp byte [ebp - 1], bl
je 0x406703
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x828]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x406703
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push dword [ebp + 8]
call esi
push edi
call esi
lea ecx, [ebp - 8]
call fcn.0043e679
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406713
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edx, esi
xor ebx, ebx
jmp 0x406735
call fcn.0040f8eb
test al, al
jne 0x40673d
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x40672a
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x40674e
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.00414409
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x40676e
inc esi
inc esi
mov ax, word [esi]
call fcn.0040f8eb
test al, al
jne 0x40676c
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 4], eax
je 0x4067dc
push 0x10020
lea ecx, [ebp - 0x824]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [ebp + 8], eax
je 0x4067dc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov esi, dword [sym.imp.KERNEL32.DLL_Sleep]
mov edi, 0xc8
push edi
call esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x4067e2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4068d2
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, str.service:
lea edi, [ebp - 0x7f8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, 0x1f9
lea edi, [ebp - 0x7e6]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
call fcn.004040ba
mov edx, eax
mov ecx, edx
call fcn.00404181
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x406920
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.00405b32
add esp, 0xc
lea eax, [ebp - 0x7f8]
push eax
push 0x64
xor edi, edi
push edi
push 0x8000004
push edi
push 0xffffffffffffffff
mov word [ebp + esi*2 - 0x7e8], di
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingW]
mov ebx, eax
cmp ebx, edi
je 0x406995
push edi
push edi
push edi
push 6
push ebx
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp esi, edi
je 0x406995
push 0x64
push edi
push esi
call fcn.004040cd
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4da128], eax
mov dword [0x4dbc64], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4095de
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
mov esi, eax
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
push dword [esi]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [0x4dbc58], 0
call ebx
and dword [esi], 0
test edi, edi
je 0x40961d
mov eax, dword [edi]
test eax, eax
je 0x40961d
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateJobObject]
push dword [edi]
call ebx
and dword [edi], 0
cmp byte [esp + 0x10], 0
je 0x409635
push 1
push 0
push str.shutdown__a
call fcn.0040648c
add esp, 0xc
push dword [0x4dbcd4]
call fcn.004041ff
cmp byte [esp + 0x10], 0
pop ecx
je 0x409661
push 3
pop esi
push 0
call dword [sym.imp.ADVAPI32.dll_AbortSystemShutdownW]
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
dec esi
jne 0x40964b
pop esi
pop ebx
ret
Function at 0x40fa78
Capabilities:
Check os version
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x4dbd60
mov dword [0x4dbd60], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
cmp dword [0x4dbd64], 5
je 0x40faa0
xor eax, eax
leave
ret
mov eax, dword [0x4dbd68]
push ebx
push edi
xor edi, edi
sub eax, edi
je 0x40fabb
dec eax
jne 0x40fb3c
mov ebx, 0x39000
jmp 0x40fac0
mov ebx, 0x30000
push esi
push str.DevicePhysicalMemory
lea eax, [ebp - 8]
push eax
call dword [0x4dbd28]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov esi, 0x4dbe90
push esi
mov dword [ebp - 0x20], 0x18
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
call dword [0x4dbd00]
cmp eax, 0xc0000022
jne 0x40fb37
lea eax, [ebp - 0x20]
push eax
push 0x60000
push esi
call dword [0x4dbd00]
push dword [0x4dbe90]
call fcn.0040f9aa
pop ecx
push dword [0x4dbe90]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x20]
push eax
push 6
push esi
call dword [0x4dbd00]
cmp eax, edi
pop esi
jge 0x40fb40
xor eax, eax
jmp 0x40fb64
push 0x1000
push ebx
push edi
push 6
push dword [0x4dbe90]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov dword [0x4dbe8c], eax
neg eax
sbb eax, eax
and eax, dword [0x4dbe90]
pop edi
pop ebx
leave
ret

Function at 0x40fb68
Capabilities:
Read file via mapping

Disassembly:
mov ecx, dword [esp + 4]
push edi
mov edi, dword [esp + 0xc]
mov eax, edi
shr eax, 0x16
mov eax, dword [ecx + eax*4]
test al, 1
jne 0x40fb81
xor eax, eax
pop edi
ret
test al, al
push esi
jns 0x40fb94
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40fbdc
push 0x1000
and eax, 0xfffff000
push eax
push 0
push 4
push dword [0x4dbe90]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov ecx, edi
shr ecx, 0xc
and ecx, 0x3ff
mov ecx, dword [eax + ecx*4]
test ecx, 1
jne 0x40fbc9
xor eax, eax
jmp 0x40fbde
mov esi, ecx
xor esi, edi
and esi, 0xfff
push eax
xor esi, ecx
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
mov eax, esi
pop esi
pop edi
ret

Function at 0x40fbe1
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x4dbe8c]
call fcn.0040fb68
pop ecx
pop ecx
push 0x1000
mov esi, eax
and eax, 0xfffff000
push eax
push 0
push 6
push dword [0x4dbe90]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
test eax, eax
jne 0x40fc16
pop esi
ret
shr esi, 2
and esi, 0x3ff
mov esi, dword [eax + esi*4]
push eax
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
mov eax, esi
pop esi
ret

Function at 0x40fd04
Capabilities:
Check mutex on windows

Disassembly:
push esi
push dword [esp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateMutexA]
mov esi, eax
test esi, esi
je 0x40fd22
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, esi
pop esi
ret
Function at 0x40fd26
Capabilities:
Check mutex on windows

Disassembly:
mov eax, dword [esp + 4]
push esi
xor esi, esi
cmp word [eax], si
push edi
je 0x40fd74
cmp word [eax + 2], si
je 0x40fd74
cmp word [eax + 4], si
je 0x40fd74
cmp word [eax + 6], si
je 0x40fd74
cmp word [eax + 8], si
je 0x40fd74
cmp word [eax + 0xa], si
je 0x40fd74
cmp word [eax + 0xc], si
je 0x40fd74
cmp word [eax + 0xe], si
je 0x40fd74
lea ecx, [eax + 0x10]
jmp 0x40fd6f
cmp word [ecx], 0x5c
jne 0x40fd6d
mov word [ecx], 0x2f
inc ecx
inc ecx
cmp word [ecx], si
jne 0x40fd62
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov edi, eax
cmp edi, esi
je 0x40fd8c
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, edi
pop edi
pop esi
ret

Function at 0x40fe7c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 7
push 0xc0000000
push str.C:pe.debug.log
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40fed8
push esi
push 2
push ebx
push ebx
push edi
call fcn.0043f9d0
mov esi, dword [ebp + 8]
add esp, 0x10
cmp byte [esi], bl
je 0x40fed0
push ebx
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop esi
pop edi
pop ebx
leave
ret

Function at 0x410068
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
push 0x80000000
push dword [ebp + 8]
call fcn.0040ffe7
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x4100ff
push esi
push eax
call fcn.00410046
mov esi, dword [ebp + 0x10]
test esi, esi
pop ecx
mov dword [ebp - 8], eax
je 0x41009a
mov dword [esi], eax
jmp 0x41009d
lea esi, [ebp - 8]
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x4100c3
add eax, 0x10
push eax
lea ecx, [ebp + 0xc]
call fcn.00444cdb
mov edi, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
lea ecx, [ebp + 0xc]
call fcn.0043e679
test edi, edi
je 0x4100f3
and dword [ebp + 0xc], 0
push 0
lea eax, [ebp + 0xc]
push eax
push dword [esi]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x4100e2
xor eax, eax
push 6
mov dword [esi], eax
add eax, edi
push 0
push eax
call fcn.004adaa0
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop esi
jmp 0x410102
mov edi, dword [ebp + 0xc]
mov eax, edi
pop edi
leave
ret
Function at 0x41092d
Capabilities:
Parse pe header

Disassembly:
cmp dword [esp + 8], 0x40
jb 0x410942
mov eax, dword [esp + 4]
mov dword [ecx + 0x10], eax
cmp word [eax], 0x5a4d
je 0x410946
xor eax, eax
jmp 0x4109bb
mov edx, dword [eax + 0x3c]
push esi
lea esi, [edx + 0xf8]
cmp dword [esp + 0xc], esi
jae 0x41095a
xor eax, eax
jmp 0x4109ba
add edx, eax
mov dword [ecx + 0x14], edx
cmp dword [edx], 0x4550
jne 0x410956
mov si, word [edx + 0x16]
test si, 0x2002
movzx eax, si
je 0x410956
test byte [edx + 0x16], 2
je 0x410956
cmp word [edx + 0x14], 0xe0
jne 0x410956
add edx, 0xf8
push edi
mov edi, dword [ecx + 0x14]
xor esi, esi
mov dword [ecx + 0x18], edx
cmp word [edi + 6], si
jbe 0x4109b9
add edx, 0x10
mov edi, dword [edx + 4]
add edi, dword [edx]
cmp edi, dword [esp + 0x10]
ja 0x4109b7
mov edi, dword [ecx + 0x14]
movzx edi, word [edi + 6]
inc esi
add edx, 0x28
cmp esi, edi
jl 0x41099b
jmp 0x4109b9
xor eax, eax
pop edi
pop esi
ret 8

Function at 0x410a2f
Capabilities:
Set thread local storage value

Disassembly:
push ebx
push esi
xor esi, esi
cmp dword [0x4dbbdc], esi
setne bl
test bl, bl
je 0x410a8f
push 0x28
push 8
push dword [0x4dc204]
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x410a63
push 2
call fcn.00444b69
cmp eax, 4
pop ecx
je 0x410a40
mov dword [esi + 4], 0xaa55
and dword [esi + 4], 0
mov dword [esi], 0x20
or dword [esi + 0x1c], 0xffffffff
add esi, 8
push esi
mov dword [esi + 0x10], 0xfff80000
push dword [0x4dbbdc]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x410a99
mov dword [eax], esi
pop esi
mov al, bl
pop ebx
ret

Function at 0x410a9e
Capabilities:
Get thread local storage value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push edi
mov edi, 0x4dbd08
jne 0x410ac9
push dword [0x4dbbdc]
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
cmp eax, ebx
je 0x410ad2
cmp dword [eax], ebx
je 0x410ad2
mov edi, eax
jmp 0x410ad2
cmp dword [ebp + 0xc], 0xffffffff
je 0x410ad2
mov edi, dword [ebp + 0xc]
cmp dword [edi], ebx
lea esi, [edi + 4]
je 0x410b27
cmp byte [ebp + 8], bl
je 0x410b27
cmp dword [esi + 4], ebx
jle 0x410b27
mov eax, dword [esi]
cmp word [eax], bx
je 0x410b27
test byte [0x4dc498], 2
push eax
je 0x410b0c
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
push dword [esi]
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_WriteConsoleW]
jmp 0x410b27
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push ebx
lea ecx, [ebp + 0xc]
push ecx
add eax, eax
push eax
push dword [esi]
mov dword [ebp + 0xc], ebx
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esi + 8]
dec eax
cmp eax, 0x1ffff
jb 0x410b45
push 0x10002
mov ecx, esi
mov dword [esi + 8], 0x10000
call fcn.00444e77
mov eax, dword [esi]
mov word [eax], bx
pop edi
mov dword [esi + 4], ebx
pop esi
pop ebx
leave
ret