joyce8/EMBER2024-capa huggingface dataset:
Function at 0x979900
Capabilities:
Get common file path

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x108
mov eax, dword [0xbcbae0]
mov ebx, dword [esp + 0x11c]
mov ecx, 0xc243b8
mov edx, str.SetDefaultDllDirectories
xor eax, esp
mov dword [esp + 0x104], eax
call fcn.009797c0
test eax, eax
je 0x97993c
push 0x800
push 0
push ebx
jmp 0x97997f
mov ebp, esp
push 0x104
push ebp
call sub.KERNEL32.dll_GetSystemDirectoryA
xor esi, esi
test eax, eax
je 0x979986
mov edi, eax
push ebx
call fcn.0097f4b0
add esp, 4
lea ecx, [edi + eax + 2]
cmp ecx, 0x104
ja 0x979986
inc eax
mov byte [esp + edi], 0x5c
lea ecx, [esp + edi + 1]
push eax
push ebx
push ecx
call fcn.0097cbc0
add esp, 0xc
push 8
push 0
push ebp
call sub.KERNEL32.dll_LoadLibraryExA
mov esi, eax
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 0x108
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x97a030
Capabilities:
Delete file

Disassembly:
push ebx
push edi
push esi
sub esp, 0x808
mov esi, dword [esp + 0x818]
mov eax, dword [0xbcbae0]
lea edi, [esp + 4]
lea ebx, [esp + 0x804]
xor eax, esp
mov dword [esp + 0x804], eax
mov dword [esp], edi
push esi
call fcn.0097f4b0
add esp, 4
lea eax, [esi + eax + 1]
mov ecx, esp
lea edx, [esp + 0x818]
push 0
push ebx
push ecx
push eax
push edx
call fcn.0097f150
add esp, 0x14
mov esi, 0xffffffff
test eax, eax
jne 0x97a094
push edi
call sub.KERNEL32.dll_DeleteFileW
cmp eax, 1
sbb esi, esi
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 0x808
pop esi
pop edi
pop ebx
ret

Function at 0x97a06e
Capabilities:
Delete file

Disassembly:
push ebx
push edi
push esi
sub esp, 0x808
mov esi, dword [esp + 0x818]
mov eax, dword [0xbcbae0]
lea edi, [esp + 4]
lea ebx, [esp + 0x804]
xor eax, esp
mov dword [esp + 0x804], eax
mov dword [esp], edi
push esi
call fcn.0097f4b0
add esp, 4
lea eax, [esi + eax + 1]
mov ecx, esp
lea edx, [esp + 0x818]
push 0
push ebx
push ecx
push eax
push edx
call fcn.0097f150
add esp, 0x14
mov esi, 0xffffffff
test eax, eax
jne 0x97a094
push edi
call sub.KERNEL32.dll_DeleteFileW
cmp eax, 1
sbb esi, esi
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 0x808
pop esi
pop edi
pop ebx
ret

Function at 0x97a120
Capabilities:
Create directory

Disassembly:
push ebx
push edi
push esi
sub esp, 0x808
mov esi, dword [esp + 0x818]
mov eax, dword [0xbcbae0]
lea edi, [esp + 4]
lea ebx, [esp + 0x804]
xor eax, esp
mov dword [esp + 0x804], eax
mov dword [esp], edi
push esi
call fcn.0097f4b0
add esp, 4
lea eax, [esi + eax + 1]
mov ecx, esp
lea edx, [esp + 0x818]
push 0
push ebx
push ecx
push eax
push edx
call fcn.0097f150
add esp, 0x14
mov esi, 0xffffffff
test eax, eax
jne 0x97a186
push 0
push edi
call sub.KERNEL32.dll_CreateDirectoryW
cmp eax, 1
sbb esi, esi
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 0x808
pop esi
pop edi
pop ebx
ret
Function at 0x97a710
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
sub esp, 8
mov ecx, dword [0xbcbae0]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
xor ecx, esp
mov dword [esp + 4], ecx
push eax
call fcn.0097cbe0
add esp, 4
mov dword [esp], 0xffffffff
mov ecx, esp
push 0
push ecx
push edi
push esi
push eax
call sub.KERNEL32.dll_WriteFile
xor esi, esi
cmp eax, 1
sbb esi, esi
or esi, dword [esp]
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 8
pop esi
pop edi
ret

Function at 0x97b900
Capabilities:
Get hostname

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x210
mov eax, dword [0xbcbae0]
mov esi, ecx
mov ecx, dword [esp + 0x228]
mov edi, edx
xor eax, esp
cmp dword [esp + 0x224], 0
mov dword [esp + 0x20c], eax
mov byte [esi], 0
je 0x97b9a2
xor eax, eax
test ecx, ecx
setne al
lea eax, [eax + eax + 5]
lea ecx, [esp + 8]
lea ebp, [esp + 0xc]
mov dword [esp + 8], 0x100
push ecx
push ebp
push eax
call sub.KERNEL32.dll_GetComputerNameExW
mov ebx, 0xffff
test eax, eax
je 0x97b9b0
mov eax, dword [esp + 8]
mov dword [esp + 4], ebp
mov dword [esp], esi
add edi, esi
lea edx, [esp + 4]
lea ecx, [eax + 1]
lea eax, [esp + eax*2 + 0xe]
mov dword [esp + 8], ecx
mov ecx, esp
push 0
push edi
push ecx
push eax
push edx
call fcn.0097ef60
add esp, 0x14
test eax, eax
jne 0x97b9b0
mov ecx, esi
call fcn.0097ba10
xor eax, eax
cmp byte [esi], 0
mov ebx, 0xffff
cmovne ebx, eax
jmp 0x97b9b0
mov eax, 6
test ecx, ecx
jne 0x97b93b
mov ebx, 0x16
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00980459
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x97bb40
Capabilities:
Read file on windows

Disassembly:
push edi
push esi
sub esp, 8
mov ecx, dword [0xbcbae0]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
xor ecx, esp
mov dword [esp + 4], ecx
push eax
call fcn.0097cbe0
add esp, 4
mov dword [esp], 0xffffffff
mov ecx, esp
push 0
push ecx
push edi
push esi
push eax
call sub.KERNEL32.dll_ReadFile
xor esi, esi
cmp eax, 1
sbb esi, esi
or esi, dword [esp]
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 8
pop esi
pop edi
ret
Function at 0x97bbc0
Capabilities:
Encode data using base64

Disassembly:
push ebp
push ebx
push edi
push esi
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov edi, 0xaaaaaaab
lea eax, [esi + 2]
mul edi
mov eax, 0x54
and edx, 0x7ffffffe
lea edx, [edx + edx + 1]
cmp dword [ecx], edx
jb 0x97bcc2
mov eax, esi
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
mul edi
shr edx, 1
xor eax, eax
lea ebp, [edx + edx*2]
mov edx, ecx
test ebp, ebp
je 0x97bc67
movzx edi, byte [ebx]
add eax, 3
shr edi, 2
movzx ecx, byte [edi + 0xb655ac]
mov byte [edx], cl
movzx ecx, byte [ebx]
movzx edi, byte [ebx + 1]
shl ecx, 4
shr edi, 4
and ecx, 0x30
movzx ecx, byte [ecx + edi + 0xb655ac]
mov byte [edx + 1], cl
movzx ecx, byte [ebx + 1]
movzx edi, byte [ebx + 2]
shr edi, 6
and ecx, 0xf
movzx ecx, byte [edi + ecx*4 + 0xb655ac]
mov byte [edx + 2], cl
movzx ecx, byte [ebx + 2]
add ebx, 3
and ecx, 0x3f
movzx ecx, byte [ecx + 0xb655ac]
mov byte [edx + 3], cl
add edx, 4
cmp eax, ebp
jb 0x97bc06
cmp eax, esi
jae 0x97bcb5
movzx edi, byte [ebx]
inc eax
xor ebp, ebp
cmp eax, esi
jae 0x97bc79
movzx ebp, byte [ebx + 1]
mov ecx, edi
shl edi, 4
mov ebx, ebp
shr ecx, 2
shr ebx, 4
and edi, 0x30
cmp eax, esi
mov al, byte [ecx + 0xb655ac]
mov byte [edx], al
mov al, byte [ebx + edi + 0xb655ac]
mov byte [edx + 1], al
mov al, 0x3d
jae 0x97bcab
and ebp, 0xf
mov al, byte [ebp*4 + 0xb655ac]
mov byte [edx + 2], al
mov byte [edx + 3], 0x3d
add edx, 4
mov byte [edx], 0
mov ecx, dword [esp + 0x20]
sub edx, dword [esp + 0x1c]
xor eax, eax
mov dword [ecx], edx
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x97e5e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov edi, 0x9e3779b9
cmp ecx, 3
jae 0x97e606
mov ebx, 0x9e3779b9
mov edx, ecx
jmp 0x97e68c
mov edx, ecx
mov ebx, 0x9e3779b9
movzx ebp, byte [eax]
add edx, 0xfffffffd
add ebp, ebx
movzx ebx, byte [eax + 1]
add ebx, edi
movzx edi, byte [eax + 2]
add eax, 3
sub ebp, ebx
add edi, esi
mov esi, edi
sub ebp, edi
sub ebx, edi
shr esi, 0xd
xor esi, ebp
mov ebp, esi
sub ebx, esi
sub edi, esi
shl ebp, 8
xor ebp, ebx
mov ebx, ebp
sub edi, ebp
sub esi, ebp
shr ebx, 0xd
xor ebx, edi
mov edi, ebx
sub esi, ebx
sub ebp, ebx
shr edi, 0xc
xor edi, esi
mov esi, edi
sub ebp, edi
sub ebx, edi
shl esi, 0x10
xor esi, ebp
mov ebp, esi
sub ebx, esi
sub edi, esi
shr ebp, 5
xor ebp, ebx
mov ebx, ebp
sub edi, ebp
sub esi, ebp
shr ebx, 3
xor ebx, edi
mov edi, ebx
sub esi, ebx
sub ebp, ebx
shl edi, 0xa
xor edi, esi
mov esi, edi
sub ebp, edi
shr esi, 0xf
xor esi, ebp
cmp edx, 2
ja 0x97e60d
add esi, ecx
cmp edx, 1
je 0x97e69e
cmp edx, 2
jne 0x97e6a3
movzx ecx, byte [eax + 1]
add edi, ecx
movzx eax, byte [eax]
add ebx, eax
sub ebx, esi
mov eax, esi
sub ebx, edi
shr eax, 0xd
sub edi, esi
xor eax, ebx
mov ecx, eax
sub edi, eax
sub esi, eax
shl ecx, 8
xor ecx, edi
mov edx, ecx
sub esi, ecx
sub eax, ecx
shr edx, 0xd
xor edx, esi
mov esi, edx
sub eax, edx
sub ecx, edx
shr esi, 0xc
xor esi, eax
mov edi, esi
sub ecx, esi
sub edx, esi
shl edi, 0x10
xor edi, ecx
mov ecx, edi
sub edx, edi
sub esi, edi
shr ecx, 5
xor ecx, edx
mov eax, ecx
sub esi, ecx
sub edi, ecx
shr eax, 3
xor eax, esi
sub edi, eax
sub ecx, eax
shl eax, 0xa
xor eax, edi
sub ecx, eax
shr eax, 0xf
xor eax, ecx
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x97f540
Capabilities:
Print debug messages
Terminate process

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov eax, dword [0xbcbae0]
xor eax, esp
mov dword [esp + 8], eax
push dword [esp + 0x20]
call sub.KERNEL32.dll_OutputDebugStringA
push str.ADVAPI32.DLL
call fcn.00979900
add esp, 4
test eax, eax
je 0x97f5df
mov esi, eax
push str.RegisterEventSourceA
push eax
call sub.KERNEL32.dll_GetProcAddress
mov ebp, eax
push str.ReportEventA
push esi
call sub.KERNEL32.dll_GetProcAddress
mov edi, eax
push str.DeregisterEventSource
push esi
call sub.KERNEL32.dll_GetProcAddress
test ebp, ebp
je 0x97f5d9
test edi, edi
je 0x97f5d9
mov ebx, eax
test eax, eax
je 0x97f5d9
mov eax, dword [esp + 0x20]
mov dword [esp], 0xbcb9a9
mov dword [esp + 4], eax
push str.hasplms
push 0
call ebp
test eax, eax
je 0x97f5d9
mov ebp, eax
mov eax, esp
push 0
push eax
push 0
push 2
push 0
push 0xc0070003
push 0
push 1
push ebp
call edi
push ebp
call ebx
push esi
call sub.KERNEL32.dll_FreeLibrary
push str.USER32.DLL
call fcn.00979900
add esp, 4
test eax, eax
je 0x97f616
mov esi, eax
push str.MessageBoxA
push eax
call sub.KERNEL32.dll_GetProcAddress
test eax, eax
je 0x97f610
push 0x10
push str.Sentinel_HASP
push dword [esp + 0x28]
push 0
call eax
push esi
call sub.KERNEL32.dll_FreeLibrary
call sub.KERNEL32.dll_GetCurrentProcess
push 1
push eax
call sub.KERNEL32.dll_TerminateProcess
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.00980459
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x97fa70
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov ebp, esi
mov edi, ecx
mov dword [esp + 0xc], edx
neg ebp
neg edi
cmp dword [esp + 0x2c], 0xc
jae 0x97faaa
mov dword [esp], eax
mov eax, dword [esp + 0x2c]
jmp 0x97fb62
mov dword [esp], eax
mov eax, dword [esp + 0x2c]
add edi, ebp
add ecx, ebp
mov dword [esp + 8], eax
add edi, ebx
mov ebx, esi
shr ebx, 0xd
xor ebx, edi
mov edi, ebx
sub ecx, ebx
sub esi, ebx
shl edi, 8
xor edi, ecx
mov eax, edi
sub esi, edi
sub ebx, edi
shr eax, 0xd
xor eax, esi
mov esi, eax
sub ebx, eax
sub edi, eax
shr esi, 0xc
xor esi, ebx
mov ebx, esi
sub edi, esi
sub eax, esi
shl ebx, 0x10
xor ebx, edi
mov edi, ebx
sub eax, ebx
sub esi, ebx
shr edi, 5
xor edi, eax
mov edx, edi
sub esi, edi
sub ebx, edi
shr edx, 3
xor edx, esi
mov ebp, edx
sub ebx, edx
sub edi, edx
shl ebp, 0xa
xor ebp, ebx
mov ebx, dword [esp]
sub edi, ebp
mov ecx, dword [ebx + 4]
mov esi, dword [ebx + 8]
mov eax, ecx
xor eax, ebp
shr ebp, 0xf
xor ebp, esi
xor ebp, edi
mov edi, dword [ebx]
add ebx, 0xc
mov dword [esp], ebx
mov dword [esp + 4], edi
xor edx, edi
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 4]
mov dword [edi], edx
mov dword [edi + 4], eax
mov eax, dword [esp + 8]
mov dword [edi + 8], ebp
add edi, 0xc
mov ebp, esi
mov dword [esp + 0xc], edi
mov edi, ecx
neg ebp
neg edi
add eax, 0xfffffff4
cmp eax, 0xb
ja 0x97fab1
test eax, eax
je case.default.0x97fbea
dec eax
cmp eax, 0xa
ja case.default.0x97fbea
add edi, ebp
mov dword [esp + 8], eax
mov eax, esi
add ecx, ebp
add edi, ebx
shr eax, 0xd
mov ebp, dword [esp + 8]
xor eax, edi
mov edx, eax
sub ecx, eax
sub esi, eax
shl edx, 8
xor edx, ecx
mov ecx, edx
sub esi, edx
sub eax, edx
shr ecx, 0xd
xor ecx, esi
mov esi, ecx
sub eax, ecx
sub edx, ecx
shr esi, 0xc
xor esi, eax
mov eax, esi
sub edx, esi
sub ecx, esi
shl eax, 0x10
xor eax, edx
mov edx, eax
sub ecx, eax
sub esi, eax
shr edx, 5
xor edx, ecx
mov ecx, edx
sub esi, edx
sub eax, edx
shr ecx, 3
xor ecx, esi
mov esi, dword [esp + 0xc]
mov ebx, ecx
sub eax, ecx
sub edx, ecx
mov dword [esp + 4], ecx
shl ebx, 0xa
xor ebx, eax
sub edx, ebx
mov edi, ebx
shr ebx, 0xf
xor ebx, edx
mov edx, dword [esp]
jmp dword [ebp*4 + 0xb65988]
mov ecx, ebx
shr ecx, 0x10
xor cl, byte [edx + 0xa]
mov byte [esi + 0xa], cl
mov cl, byte [edx + 9]
xor cl, bh
mov byte [esi + 9], cl
xor bl, byte [edx + 8]
mov byte [esi + 8], bl
mov ecx, edi
shr ecx, 0x18
xor cl, byte [edx + 7]
mov byte [esi + 7], cl
mov ecx, edi
shr ecx, 0x10
xor cl, byte [edx + 6]
mov byte [esi + 6], cl
mov ecx, dword [esp + 4]
mov ebx, edi
xor bh, byte [edx + 5]
mov byte [esi + 5], bh
xor al, byte [edx + 4]
mov byte [esi + 4], al
mov eax, ecx
shr eax, 0x18
xor al, byte [edx + 3]
mov byte [esi + 3], al
mov eax, ecx
shr eax, 0x10
xor al, byte [edx + 2]
mov byte [esi + 2], al
mov al, byte [edx + 1]
xor al, ch
mov byte [esi + 1], al
xor cl, byte [edx]
mov byte [esi], cl
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x981c92
Capabilities:
Create thread
Resume thread

Disassembly:
push ebx
push edi
mov edi, dword [esp + 0xc]
xor ebx, ebx
test edi, edi
jne 0x981cae
call fcn.00983e7d
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x981d20
push esi
push 0x8c
push 1
call fcn.009839dc
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x981d06
push esi
call fcn.00982b85
mov eax, dword [esp + 0x1c]
pop ecx
push esi
push 4
push esi
push 0x981c00
push dword [esp + 0x24]
mov dword [esi + 0x4c], edi
push 0
mov dword [esi + 0x50], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
mov dword [esi + 4], edi
je 0x981cfe
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x981d1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.009822ec
test ebx, ebx
pop ecx
je 0x981d18
push ebx
call fcn.00983e8f
pop ecx
or eax, 0xffffffff
jmp 0x981d1f
mov eax, edi
pop esi
pop edi
pop ebx
ret

Function at 0x9820e1
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 0x9820fe
call fcn.00983e7d
mov dword [eax], 0x16
xor eax, eax
jmp 0x982168
push esi
push 0x8c
push 1
call fcn.009839dc
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x982153
push esi
call fcn.00982b85
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 0x982131
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x98204c
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x982167
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.009822ec
test ebx, ebx
pop ecx
je 0x982165
push ebx
call fcn.00983e8f
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x983bf6
Capabilities:
Terminate process

Disassembly:
push 8
push 0xb65f30
call fcn.009828d0
push 8
call fcn.00983e4c
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0xc24440], esi
jne 0x983c2a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0xc2443c], esi
mov al, byte [ebp + 0x10]
mov byte [0xc24438], al
cmp dword [ebp + 0xc], edi
jne 0x983c74
cmp dword [0xc252f8], edi
je 0x983c64
mov eax, dword [0xc252f4]
sub eax, 4
mov dword [0xc252f4], eax
cmp eax, dword [0xc252f8]
jb 0x983c64
mov eax, dword [eax]
cmp eax, edi
je 0x983c45
call eax
jmp 0x983c45
push 0xb69028
mov eax, 0xb69020
call fcn.00983b74
pop ecx
push 0xb69030
mov eax, 0xb6902c
call fcn.00983b74
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x983ca5
cmp dword [ebp + 0x10], edi
jne 0x983cb3
mov dword [0xc24440], esi
push dword [ebp + 8]
call fcn.00983b32
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x983cb2
push 8
call fcn.00983d97
pop ecx
ret
call fcn.0098290b
ret
Function at 0x984a9e
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 0x984acc
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 0x984ad3
cmp ebx, dword [eax + 4]
jae 0x984ad3
xor eax, eax
jmp 0x984cc3
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x984ae4
xor eax, eax
inc eax
jmp 0x984cc2
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x984afa
cmp ecx, edx
jae 0x984c3f
cmp dword [eax + 4], 0
je 0x984b03
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x984aeb
cmp dword [ebp + 8], 0
je 0x984b25
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x984c3f
cmp eax, esi
jae 0x984c3f
mov eax, dword [0xc24598]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x984b4a
cmp dword [esi*4 + 0xc245a0], edi
je 0x984c43
inc esi
cmp esi, eax
jl 0x984b38
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x984cbf
cmp dword [ebp - 8], 0x1000000
jne 0x984cbf
test byte [ebp - 0xc], 0xcc
je 0x984bc8
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x984cbf
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x984cbf
cmp word [eax + 0x18], 0x10b
jne 0x984cbf
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x984cbf
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x984bc8
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x984bc8
test byte [ecx + 0x27], 0x80
jne 0x984c3f
push 1
push 0xc245e0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x984adc
mov ecx, dword [0xc24598]
test ecx, ecx
mov edx, ecx
jle 0x984bfc
lea eax, [ecx*4 + 0xc2459c]
cmp dword [eax], edi
je 0x984bfc
dec edx
sub eax, 4
test edx, edx
jg 0x984bf0
test edx, edx
jne 0x984c2d
push 0xf
pop ebx
cmp ecx, ebx
jg 0x984c09
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x984c21
lea eax, [edx*4 + 0xc245a0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x984c0f
cmp ecx, 0x10
jge 0x984c2d
inc ecx
mov dword [0xc24598], ecx
push 0
push 0xc245e0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x984adc
xor eax, eax
jmp 0x984cc2
test esi, esi
jle 0x984adc
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0xc245e0
call ebx
test eax, eax
jne 0x984adc
cmp dword [esi*4 + 0xc245a0], edi
je 0x984c99
mov eax, dword [0xc24598]
lea esi, [eax - 1]
test esi, esi
jl 0x984c87
cmp dword [esi*4 + 0xc245a0], edi
je 0x984c83
dec esi
jns 0x984c77
test esi, esi
jge 0x984c97
cmp eax, 0x10
jge 0x984c92
inc eax
mov dword [0xc24598], eax
lea esi, [eax - 1]
jmp 0x984c99
je 0x984cb1
xor ecx, ecx
test esi, esi
jl 0x984cb1
lea eax, [ecx*4 + 0xc245a0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x984c9f
push 0
push 0xc245e0
call ebx
jmp 0x984adc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x984e6e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0xbcbae0]
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 + 0xbcc200]
je 0x984ea3
inc eax
cmp eax, 0x13
jb 0x984e94
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0xbcc200]
jne 0x984fc9
mov eax, dword [0xc243c8]
cmp eax, 1
je 0x984fa1
cmp eax, edx
jne 0x984ed3
cmp dword [0xbcbd74], 1
je 0x984fa1
cmp ecx, 0xfc
je 0x984fc9
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 0x984f09
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.009816f0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00980650
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x984f3d
mov eax, edi
push eax
call fcn.00980650
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0xb65ad4
push edi
call fcn.00987310
add esp, 0x10
push edi
call fcn.00980650
push dword [esi + 0xbcc204]
mov ebx, eax
call fcn.00980650
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00980a20
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.009816f0
push edi
push ebx
call fcn.00981700
push 0xb65ad0
push ebx
call fcn.00981700
push dword [esi + 0xbcc204]
push ebx
call fcn.00981700
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00987210
add esp, 0x2c
jmp 0x984fc9
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0xbcc204]
push dword [esi]
call fcn.00980650
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.00980459
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x98501e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0xbcbae0]
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 0x98504f
xor eax, eax
jmp 0x9851d8
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 + 0xc25320]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x98508b
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00988b19
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x985166
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x9851a4
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 0x9850ef
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x9850e0
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 0x9850c0
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 0x98512f
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x985138
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x9850b1
jmp 0x98513a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x9851d3
cmp dword [ebp - 0x6c], edi
je 0x9851a4
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x985199
call fcn.00983e7d
mov dword [eax], 9
call fcn.00983e86
mov dword [eax], esi
jmp 0x9851ce
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 0x98518e
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x98513a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x98513a
push dword [ebp - 0x6c]
call fcn.00983e8f
pop ecx
jmp 0x9851ce
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x9851bc
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x9851bc
xor eax, eax
jmp 0x9851d6
call fcn.00983e7d
mov dword [eax], 0x1c
call fcn.00983e86
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x9851d6
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00980459
add ebp, 0x3a0
leave
ret