joyce8/EMBER2024-capa huggingface dataset:
Function at 0x42b010
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x88], 0
jne 0x42b02c
xor eax, eax
jmp 0x42b13c
mov ecx, dword [ebp - 0x10]
call fcn.0042c4e0
test eax, eax
je 0x42b03f
xor eax, eax
jmp 0x42b13c
mov ecx, dword [ebp - 0x10]
call fcn.0042c4a0
test eax, eax
je 0x42b097
lea ecx, [ebp - 4]
push ecx
push 4
mov edx, dword [ebp - 0x10]
push edx
push 0x42b960
push 0
push 0
call fcn.0047399e
add esp, 0x18
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0xa4], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0xa4], 0
jne 0x42b082
xor eax, eax
jmp 0x42b13c
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x42b13a
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0xac], 0
je 0x42b13a
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xac]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xac]
mov edx, dword [edx]
push ecx
call dword [edx + 0x18]
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xac]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xac]
mov edx, dword [edx]
push ecx
call dword [edx + 0x1c]
push 0
mov eax, dword [ebp - 0xc]
neg eax
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
push 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x64]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x60]
push eax
push 0
push 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x8c]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xac]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0xac]
mov ecx, dword [ecx]
push eax
call dword [ecx + 0x20]
test eax, eax
jne 0x42b13a
push 0
mov ecx, dword [ebp - 0x10]
call fcn.004183a0
mov eax, 1
jmp 0x42b13c
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x42e110
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0x49a298
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x4c7ec8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xb7
je 0x42e14b
cmp dword [ebp - 4], 5
je 0x42e14b
mov dword [ebp - 0xc], 0
jmp 0x42e152
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x42e184
push 0xffffffffffffffff
mov ecx, dword [0x4c7ec8]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [0x4c7ec8]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov dword [0x4c7ecc], 1
mov eax, dword [0x4c7ec8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4c7ec8], 0
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x42e210
Capabilities:
Check mutex on windows
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
push edi
push str.SK_ODT_RESTART_MUTEX_KEYDOWNLOAD
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x4c7ec8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xb7
je 0x42e252
cmp dword [ebp - 0x14], 5
je 0x42e252
mov dword [ebp - 0x170], 0
jmp 0x42e25c
mov dword [ebp - 0x170], 1
mov eax, dword [ebp - 0x170]
mov dword [ebp - 0x16c], eax
cmp dword [ebp - 0x16c], 0
je 0x42e2a0
push 0xffffffffffffffff
mov ecx, dword [0x4c7ec8]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [0x4c7ec8]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [0x4c7ec8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x42e34d
mov byte [ebp - 0x168], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x167]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea ecx, [ebp - 0x168]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 0x60], 0
mov ecx, 0x10
xor eax, eax
lea edi, [ebp - 0x5c]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x10], 0
xor edx, edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], edx
mov dword [ebp - 4], edx
mov dword [ebp - 0x60], 0x44
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.SHLWAPI.dll_PathQuoteSpacesA]
push 0x49a2e0
lea ecx, [ebp - 0x168]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.__KeyDownload
lea edx, [ebp - 0x168]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x60]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x168]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x4314b0
Capabilities:
Log keystrokes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 8]
jne 0x4314d3
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_SetFocus]
jmp 0x431533
push 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov dword [ebp - 4], eax
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov dword [ebp - 8], eax
push 1
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_AttachThreadInput]
test eax, eax
je 0x431533
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_BringWindowToTop]
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_SetFocus]
push 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_AttachThreadInput]
mov esp, ebp
pop ebp
ret
Function at 0x457b80
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49279b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
mov dword [ebp - 0x34], ecx
lea ecx, [ebp - 0x24]
call fcn.00417eb0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 1
push eax
push str.LocalContents_02d
lea ecx, [ebp - 0x24]
push ecx
call fcn.00404380
add esp, 0xc
mov byte [ebp - 0x20], 0
xor edx, edx
mov dword [ebp - 0x1f], edx
mov dword [ebp - 0x1b], edx
mov dword [ebp - 0x17], edx
mov dword [ebp - 0x13], edx
mov word [ebp - 0xf], dx
mov byte [ebp - 0xd], dl
push 0x4a91e4
push 0x14
lea eax, [ebp - 0x20]
push eax
push 0x4a9204
push str.MOVIE_FILENAME
lea ecx, [ebp - 0x24]
call fcn.0045e910
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00409660
push str.C:_sk_odtiniLocalContents.ini
push 0x1e
push str.PLAY_TIME
lea ecx, [ebp - 0x24]
call fcn.0045e910
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x30], edx
lea ecx, [ebp - 0x2c]
call fcn.00417ed0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00417ed0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x469897
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x4698ea
call fcn.0048a44c
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x4698ea
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x4698e0
xor eax, eax
jmp 0x469a03
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x46991a
mov eax, dword [esi]
push edi
push dword [ebp - 4]
mov ecx, esi
push ebx
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x46991a
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x469a00
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x469947
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.0046a453
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x469a00
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x469990
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x469990
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x46998a
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.0046a453
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x4699f0
and dword [ebp + 0xc], 0
jmp 0x4699f0
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x4699f0
push 0xc
call fcn.00484e7f
mov esi, eax
test esi, esi
pop ecx
je 0x4699d2
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x4699d4
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x4699eb
push dword [ebp - 8]
call fcn.0047ff06
jmp 0x4699f0
call fcn.0047fedd
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x469955
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x47399e
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x4739bb
call fcn.00474f9a
mov dword [eax], 0x16
xor eax, eax
jmp 0x473a25
push esi
push 0x8c
push 1
call fcn.00475afa
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x473a10
push esi
call fcn.00476485
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x4739ee
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x473909
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x473a24
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00474221
test ebx, ebx
pop ecx
je 0x473a22
push ebx
call fcn.00474fac
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x474018
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.004734f0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4740b3
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x4c9f9c]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x4740b3
cmp eax, 1
je 0x4740d4
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4740b3
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x474080
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4740af
xor eax, eax
inc eax
jmp 0x4740f3
cmp edi, eax
jae 0x4740b7
xor eax, eax
jmp 0x4740f3
cmp eax, esi
jae 0x4740be
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4c9f9c]
jmp 0x4740d7
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x474bdc
Capabilities:
Terminate process

Disassembly:
push 8
push 0x4b3ba0
call fcn.00474a98
push 8
call fcn.00477f76
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x4c9fdc], esi
jne 0x474c10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4c9fd8], esi
mov al, byte [ebp + 0x10]
mov byte [0x4c9fd4], al
cmp dword [ebp + 0xc], edi
jne 0x474c5a
cmp dword [0x4cb888], edi
je 0x474c4a
mov eax, dword [0x4cb884]
sub eax, 4
mov dword [0x4cb884], eax
cmp eax, dword [0x4cb888]
jb 0x474c4a
mov eax, dword [eax]
cmp eax, edi
je 0x474c2b
call eax
jmp 0x474c2b
push 0x4c3098
mov eax, 0x4c3090
call fcn.00474b5a
pop ecx
push 0x4c30a4
mov eax, 0x4c309c
call fcn.00474b5a
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x474c8b
cmp dword [ebp + 0x10], edi
jne 0x474c99
mov dword [0x4c9fdc], esi
push dword [ebp + 8]
call fcn.00474b18
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x474c98
push 8
call fcn.00477ec1
pop ecx
ret
call fcn.00474ad3
ret
Function at 0x477aee
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4c4828]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x477b1f
xor eax, eax
jmp 0x477ca8
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4ca500]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x477b5b
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0047d006
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x477c36
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x477c74
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x477bbf
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x477bb0
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x477b90
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x477bff
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x477c08
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x477b81
jmp 0x477c0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x477ca3
cmp dword [ebp - 0x6c], edi
je 0x477c74
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x477c69
call fcn.00474f9a
mov dword [eax], 9
call fcn.00474fa3
mov dword [eax], esi
jmp 0x477c9e
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x477c5e
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x477c0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x477c0a
push dword [ebp - 0x6c]
call fcn.00474fac
pop ecx
jmp 0x477c9e
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x477c8c
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x477c8c
xor eax, eax
jmp 0x477ca6
call fcn.00474f9a
mov dword [eax], 0x1c
call fcn.00474fa3
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x477ca6
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.004748a3
add ebp, 0x3a0
leave
ret
Function at 0x479ce5
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x479d13
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x479d1a
cmp ebx, dword [eax + 4]
jae 0x479d1a
xor eax, eax
jmp 0x479f0a
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x479d2b
xor eax, eax
inc eax
jmp 0x479f09
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x479d41
cmp ecx, edx
jae 0x479e86
cmp dword [eax + 4], 0
je 0x479d4a
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x479d32
cmp dword [ebp + 8], 0
je 0x479d6c
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x479e86
cmp eax, esi
jae 0x479e86
mov eax, dword [0x4ca250]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x479d91
cmp dword [esi*4 + 0x4ca258], edi
je 0x479e8a
inc esi
cmp esi, eax
jl 0x479d7f
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x479f06
cmp dword [ebp - 8], 0x1000000
jne 0x479f06
test byte [ebp - 0xc], 0xcc
je 0x479e0f
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x479f06
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x479f06
cmp word [eax + 0x18], 0x10b
jne 0x479f06
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x479f06
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x479e0f
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x479e0f
test byte [ecx + 0x27], 0x80
jne 0x479e86
push 1
push 0x4ca298
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x479d23
mov ecx, dword [0x4ca250]
test ecx, ecx
mov edx, ecx
jle 0x479e43
lea eax, [ecx*4 + 0x4ca254]
cmp dword [eax], edi
je 0x479e43
dec edx
sub eax, 4
test edx, edx
jg 0x479e37
test edx, edx
jne 0x479e74
push 0xf
pop ebx
cmp ecx, ebx
jg 0x479e50
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x479e68
lea eax, [edx*4 + 0x4ca258]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x479e56
cmp ecx, 0x10
jge 0x479e74
inc ecx
mov dword [0x4ca250], ecx
push 0
push 0x4ca298
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x479d23
xor eax, eax
jmp 0x479f09
test esi, esi
jle 0x479d23
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4ca298
call ebx
test eax, eax
jne 0x479d23
cmp dword [esi*4 + 0x4ca258], edi
je 0x479ee0
mov eax, dword [0x4ca250]
lea esi, [eax - 1]
test esi, esi
jl 0x479ece
cmp dword [esi*4 + 0x4ca258], edi
je 0x479eca
dec esi
jns 0x479ebe
test esi, esi
jge 0x479ede
cmp eax, 0x10
jge 0x479ed9
inc eax
mov dword [0x4ca250], eax
lea esi, [eax - 1]
jmp 0x479ee0
je 0x479ef8
xor ecx, ecx
test esi, esi
jl 0x479ef8
lea eax, [ecx*4 + 0x4ca258]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x479ee6
push 0
push 0x4ca298
call ebx
jmp 0x479d23
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x47a702
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4c4828]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4c51a0]
je 0x47a737
inc eax
cmp eax, 0x13
jb 0x47a728
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4c51a0]
jne 0x47a85d
mov eax, dword [0x4c9f90]
cmp eax, 1
je 0x47a835
cmp eax, edx
jne 0x47a767
cmp dword [0x4c4824], 1
je 0x47a835
cmp ecx, 0xfc
je 0x47a85d
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x47a79d
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00471b70
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00472b80
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x47a7d1
mov eax, edi
push eax
call fcn.00472b80
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4b43e0
push edi
call fcn.004725f0
add esp, 0x10
push edi
call fcn.00472b80
push dword [esi + 0x4c51a4]
mov ebx, eax
call fcn.00472b80
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004734f0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00471b70
push edi
push ebx
call fcn.00471b80
push 0x4b43c0
push ebx
call fcn.00471b80
push dword [esi + 0x4c51a4]
push ebx
call fcn.00471b80
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0047df2f
add esp, 0x2c
jmp 0x47a85d
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4c51a4]
push dword [esi]
call fcn.00472b80
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]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.004748a3
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x47c62f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x47c803
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4ca500]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x47c803
test cl, 0x48
je 0x47c69a
cmp byte [eax + 5], 0xa
je 0x47c69a
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x47c6ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x47c6d4
call fcn.00474f9a
mov dword [eax], 9
call fcn.00474fa3
mov dword [eax], esi
jmp 0x47c6e4
cmp eax, 0x6d
je 0x47c803
push eax
call fcn.00474fac
pop ecx
or eax, 0xffffffff
jmp 0x47c805
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x47c7fe
test eax, eax
je 0x47c713
cmp byte [ebx], 0xa
jne 0x47c713
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x47c71c
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x47c7f8
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x47c7e8
cmp al, 0xd
je 0x47c74e
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x47c7da
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x47c768
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x47c763
add dword [ebp + 0x10], 2
jmp 0x47c7bc
mov dword [ebp + 0x10], eax
jmp 0x47c7d6
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x47c790
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x47c7d6
cmp dword [ebp - 0xc], 0
je 0x47c7d6
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x47c7b1
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x47c7bc
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x47c7d9
cmp ebx, dword [ebp + 0xc]
jne 0x47c7c1
cmp byte [ebp - 1], 0xa
jne 0x47c7c1
mov byte [ebx], 0xa
jmp 0x47c7d9
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0047c0b8
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x47c7da
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x47c732
jmp 0x47c7f8
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x47c7f8
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x47c805
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret