joyce8/EMBER2024-capa huggingface dataset:
Function at 0x305fb4
Capabilities:
Query environment variable

Disassembly:
push esi
push ebp
push dword [esp + 0x14]
push dword [esp + 0x10]
call fcn.00305630
mov esi, eax
add esp, 8
test esi, esi
je 0x305ff1
push esi
call dword [sym.imp.MSVCRT.dll_getenv]
mov ebp, eax
push esi
call fcn.00305718
mov edx, dword [esp + 0x20]
push edx
push edx
push ebp
push dword [esp + 0x24]
call fcn.0030572c
add esp, 0x18
pop ebp
pop esi
ret
xor eax, eax
pop ebp
pop esi
ret

Function at 0x3060e0
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
push ebx
mov ebp, dword [esp + 0x10]
push dword [ebp]
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ebx, eax
test ebx, ebx
je 0x306164
lea edx, [ebx + 2]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
pop ecx
mov dword [ebp], eax
test eax, eax
je 0x306142
push eax
add ebx, 4
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x306138
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x30612e
mov eax, 1
pop ebx
pop ebp
ret
call fcn.003057f4
xor eax, eax
pop ebx
pop ebp
ret
call fcn.003057f4
xor eax, eax
pop ebx
pop ebp
ret
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, 0xc
mov dword [eax], edx
xor eax, eax
push eax
push eax
push eax
push edx
push eax
call dword [0x31c7b4]
xor eax, eax
add esp, 0x14
pop ebx
pop ebp
ret
call fcn.003057f4
xor eax, eax
pop ebx
pop ebp
ret

Function at 0x306170
Capabilities:
Check if file exists
Delete file
Enumerate files on windows

Disassembly:
push esi
push ebx
sub esp, 0x140
xor ebx, ebx
lea eax, [esp]
push eax
push dword [esp + 0x150]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x306236
mov edx, dword [esp]
test dl, 0x17
jne 0x3061b0
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x3061b0
add ebx, 1
lea edx, [esp]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x3061c6
cmp eax, 1
je 0x306196
jmp 0x306203
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x306228
cmp eax, 3
je 0x306228
cmp eax, 0x10
je 0x306228
cmp eax, 8
je 0x30621a
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x16
call dword [sym.imp.MSVCRT.dll__errno]
xor edx, edx
push edx
push edx
push edx
push dword [eax]
push edx
call dword [0x31c7b4]
add esp, 0x14
cmp esi, 0xffffffff
je 0x30620f
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, ebx
add esp, 0x140
pop ebx
pop esi
ret
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
jmp 0x3061ec
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 2
jmp 0x3061ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x306283
cmp eax, 3
je 0x306283
cmp eax, 0x12
je 0x306283
cmp eax, 8
je 0x306275
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x16
call dword [sym.imp.MSVCRT.dll__errno]
xor edx, edx
push edx
push edx
push edx
push dword [eax]
push edx
call dword [0x31c7b4]
add esp, 0x14
jmp 0x30620f
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
jmp 0x30625c
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 2
jmp 0x30625c
Function at 0x306294
Capabilities:
Set current directory

Disassembly:
push edi
push esi
sub esp, 0xc
xor edi, edi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call fcn.00305630
mov esi, eax
add esp, 8
test esi, esi
je 0x3062d1
mov dword [esp], esi
lea ecx, [esp]
lea edx, [esp + 4]
push edx
push ecx
call fcn.00305ff8
add esp, 8
cmp eax, 1
je 0x3062d9
push esi
call fcn.00305718
pop ecx
mov eax, edi
add esp, 0xc
pop esi
pop edi
ret
lea edx, [esp + 8]
push edx
push dword [esp + 8]
call fcn.003060e0
add esp, 8
cmp eax, 1
je 0x3062fc
push dword [esp + 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
jmp 0x3062ca
push dword [esp]
call fcn.00306170
mov edi, eax
add esp, 4
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x306324
push dword [esp + 8]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
jmp 0x3062ef
call fcn.003057f4
jmp 0x306317

Function at 0x30632c
Capabilities:
Query environment variable

Disassembly:
push edi
push esi
push ebp
push ebx
mov edi, dword [esp + 0x1c]
push dword [esp + 0x18]
push dword [esp + 0x18]
mov dword [edi], 0
mov ebx, 1
call fcn.00305630
mov esi, eax
add esp, 8
test esi, esi
je 0x3063b0
push 0
push dword [edi]
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebp, eax
test ebp, ebp
je 0x3063a7
add ebp, 5
push ebp
call dword [sym.imp.MSVCRT.dll_malloc]
pop ecx
mov dword [edi], eax
test eax, eax
je 0x3063b9
push ebp
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x306388
cmp eax, ebp
jl 0x3063a7
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, 4
mov dword [eax], edx
xor ecx, ecx
push ecx
push ecx
push ecx
push edx
push ecx
call dword [0x31c7b4]
add esp, 0x14
xor ebx, ebx
push esi
call fcn.00305718
pop ecx
jmp 0x3063b2
xor ebx, ebx
mov eax, ebx
pop ebx
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, 0xc
mov dword [eax], edx
xor ecx, ecx
push ecx
push ecx
push ecx
push edx
push ecx
call dword [0x31c7b4]
add esp, 0x14
xor ebx, ebx
jmp 0x3063a7

Function at 0x3068f8
Capabilities:
Create directory

Disassembly:
push ebp
push ebx
push dword [esp + 0x10]
push dword [esp + 0x10]
call fcn.00305630
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x30692e
push ebx
call dword [sym.imp.MSVCRT.dll__mkdir]
mov ebp, eax
push ebx
call fcn.00305718
add esp, 8
test ebp, ebp
jne 0x30692e
mov eax, 1
pop ebx
pop ebp
ret
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x306a08
Capabilities:
Move file

Disassembly:
push edi
push esi
push ebp
push dword [esp + 0x18]
push dword [esp + 0x14]
call fcn.00305630
mov edi, eax
add esp, 8
test edi, edi
je 0x306aae
push dword [esp + 0x1c]
push dword [esp + 0x18]
call fcn.00305630
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x306a7e
push ebp
push edi
call dword [sym.imp.MSVCRT.dll_rename]
mov esi, eax
push edi
call fcn.00305718
push ebp
call fcn.00305718
add esp, 0x10
test esi, esi
je 0x306a75
call dword [sym.imp.MSVCRT.dll__errno]
xor edx, edx
push edx
push edx
push edx
push dword [eax]
push edx
call dword [0x31c7b4]
xor eax, eax
add esp, 0x14
pop ebp
pop esi
pop edi
ret
mov eax, 1
pop ebp
pop esi
pop edi
ret
push edi
call fcn.00305718
pop ecx
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
call dword [sym.imp.MSVCRT.dll__errno]
xor edx, edx
push edx
push edx
push edx
push dword [eax]
push edx
call dword [0x31c7b4]
xor eax, eax
add esp, 0x14
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
call dword [sym.imp.MSVCRT.dll__errno]
xor edx, edx
push edx
push edx
push edx
push dword [eax]
push edx
call dword [0x31c7b4]
xor eax, eax
add esp, 0x14
pop ebp
pop esi
pop edi
ret

Function at 0x306c9c
Capabilities:
Set file attributes

Disassembly:
push ebp
push ebx
mov ebp, dword [esp + 0x10]
mov eax, dword [ebp]
test al, 0x18
je 0x306cca
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, 0x16
mov dword [eax], edx
xor eax, eax
push eax
push eax
push eax
push edx
push eax
call dword [0x31c7b4]
add esp, 0x14
xor ebp, ebp
jmp 0x306d20
push dword [esp + 0x14]
push dword [esp + 0x10]
call fcn.00305630
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x306ce4
xor ebp, ebp
jmp 0x306d20
push dword [ebp]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x306cf9
mov ebp, 1
jmp 0x306d18
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, 0xd
mov dword [eax], edx
xor ecx, ecx
push ecx
push ecx
push ecx
push edx
push ecx
call dword [0x31c7b4]
add esp, 0x14
xor ebp, ebp
push ebx
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov eax, ebp
pop ebx
pop ebp
ret

Function at 0x306fc4
Capabilities:
Execute command

Disassembly:
push ebp
push ebx
push dword [esp + 0x10]
push dword [esp + 0x10]
call fcn.00305630
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x306ffb
push ebx
call dword [sym.imp.MSVCRT.dll_system]
mov ebp, eax
push ebx
call fcn.00305718
add esp, 8
cmp ebp, 0xffffffff
je 0x306ffb
mov eax, 1
pop ebx
pop ebp
ret
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x307ce0
Capabilities:
Create thread

Disassembly:
push edi
push ebp
push esi
mov eax, dword [0x31ae08]
test eax, eax
je 0x307e14
push 0x31ade8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x31ae08]
test eax, eax
je 0x307dd0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
mov ecx, dword [0x31ae00]
shr edi, 2
cmp ecx, 0xffffffff
je 0x307d6c
mov edx, dword [0x31ae0c]
cmp edi, edx
jae 0x307d33
add edi, 0x40000000
mov dword [esp], edi
jmp 0x307d36
mov dword [esp], edi
test ecx, 0x80000000
je 0x307d41
add ecx, 3
mov eax, 0x10624dd3
shr ecx, 2
neg edx
add edx, edi
sub ecx, edx
add ecx, 0xf9
imul ecx
sar ecx, 0x1f
mov ebp, edx
sar ebp, 4
sub ebp, ecx
test ebp, ebp
jg 0x307d71
mov ebp, 1
jmp 0x307d71
mov dword [esp], edi
xor ebp, ebp
mov eax, dword [esp + 0x10]
mov dword [0x31ae0c], edi
mov eax, dword [eax]
test eax, eax
jle 0x307dc4
lea ecx, [eax + eax]
add ecx, ecx
sub ecx, eax
lea eax, [eax + ecx*8]
lea edi, [eax + eax*4]
add edi, edi
add edi, edi
add edi, edi
mov dword [0x31ae00], edi
mov eax, dword [esp + 0x14]
push 0x31ade8
mov dword [0x31ae04], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 1
push dword [0x31ade4]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, ebp
pop ecx
pop ebp
pop edi
ret
mov dword [0x31ae00], 0xffffffff
jmp 0x307d9a
xor eax, eax
push eax
push 0x20
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov dword [0x31ae00], 0xffffffff
mov dword [0x31ade4], eax
xor edx, edx
lea eax, [esp]
push eax
push edx
push edx
push 0x307c78
push edx
push edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x31ae08], eax
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
jmp 0x307d08
push 0x31ade8
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x307cf0

Function at 0x307e24
Capabilities:
Write file on windows

Disassembly:
push edi
push ebp
push esi
mov eax, dword [0x31821c]
test eax, eax
je 0x307e45
push 0x31bf20
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x31821c], 0
mov dword [esp], 0
lea edi, [esp + 0x14]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
push 0x31bf20
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
push dword [esp + 0x14]
push 0x1000
push 0x31ae20
call dword [sym.imp.MSVCRT.dll__vsnprintf]
add esp, 0x10
mov edi, 0x31ae20
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x307e98
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x307e8c
lea edx, [esp]
push 0
push edx
push eax
mov ecx, 0x31ae20
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, eax
push 0x31bf20
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebp, ebp
jne 0x307ec3
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop ecx
pop ebp
pop edi
ret
Function at 0x3088c0
Capabilities:
Create thread
Resume thread

Disassembly:
push edi
push ebp
push esi
mov edi, dword [esp + 0x10]
mov eax, dword [edi + 0xc]
test eax, eax
je 0x3088d7
mov eax, 5
pop ecx
pop ebp
pop edi
ret
mov eax, dword [edi + 0x34]
test eax, eax
je 0x308a3e
mov eax, dword [edi + 0x38]
test eax, eax
je 0x308a18
mov edx, dword [edi + 0x2c]
mov ebp, dword [edi + 0x10]
lea ecx, [eax + edx - 1]
mov dword [edi + 0x3c], ecx
mov dword [edi + 0x40], eax
mov eax, dword [edi + 0x40]
mov dword [edi + 0x44], eax
test ebp, ebp
je 0x3089d3
lea eax, [esp]
push eax
push 4
xor edx, edx
push edi
push 0x3085a8
push edx
push edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, eax
test ebp, ebp
je 0x308994
push 2
push ebp
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x30893a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x308985
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
push dword [edi + 0x34]
call fcn.00308280
push dword [edi + 0x38]
mov dword [edi + 0x34], 0
call fcn.00308280
add esp, 8
push dword [edi + 0x10]
mov dword [edi + 0x38], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x10], 0
mov eax, ebp
pop ecx
pop ebp
pop edi
ret
mov dword [edi + 0xc], ebp
mov edx, dword [esp]
mov dword [edi + 0x20], edx
xor eax, eax
pop ecx
pop ebp
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
push dword [edi + 0x34]
call fcn.00308280
push dword [edi + 0x38]
mov dword [edi + 0x34], 0
call fcn.00308280
add esp, 8
push dword [edi + 0x10]
mov dword [edi + 0x38], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x10], 0
mov eax, ebp
pop ecx
pop ebp
pop edi
ret
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [edi + 0x10], eax
test eax, eax
jne 0x30890b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
push dword [edi + 0x34]
call fcn.00308280
push dword [edi + 0x38]
mov dword [edi + 0x34], 0
call fcn.00308280
mov dword [edi + 0x38], 0
mov eax, ebp
add esp, 0xc
pop ebp
pop edi
ret
push dword [edi + 0x2c]
call fcn.0030825c
pop ecx
mov dword [edi + 0x38], eax
test eax, eax
jne 0x3088ed
push dword [edi + 0x34]
call fcn.00308280
pop ecx
mov eax, 8
pop ecx
pop ebp
pop edi
ret
push 0x800
call fcn.0030825c
pop ecx
mov dword [edi + 0x34], eax
test eax, eax
je 0x308a35
mov dword [edi + 0x28], 0x800
jmp 0x3088e2
Function at 0x308a5c
Capabilities:
Terminate thread

Disassembly:
push edi
push esi
push esi
mov edi, dword [esp + 0x10]
mov dword [edi + 0x30], 1
push 0xa
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_PurgeComm]
test eax, eax
jne 0x308a7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x2710
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x308b22
cmp eax, 0x102
jne 0x308af9
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [esp]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x308ac0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], 0x103
mov eax, dword [esp]
cmp eax, 0x103
jne 0x308ad5
push 0xffffffffffffffff
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x308ae8
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
mov dword [edi + 0xc], edx
mov dword [edi + 0x30], edx
mov eax, 0xc
pop ecx
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x308b14
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
mov dword [edi + 0xc], edx
mov dword [edi + 0x30], edx
mov eax, esi
pop ecx
pop esi
pop edi
ret
mov dword [edi + 0x30], 0
lea eax, [esp]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x308b47
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [edi + 0xc]
mov eax, dword [edi + 0x44]
mov dword [edi + 0x40], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x308b64
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop ecx
pop esi
pop edi
ret
mov dword [edi + 0xc], 0
xor eax, eax
pop ecx
pop esi
pop edi
ret
Function at 0x308ff8
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x20]
test eax, eax
je 0x309229
push 0
push dword [eax]
call fcn.00308194
add esp, 8
test eax, eax
je 0x309229
lea edx, [esp]
push edx
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x309036
call dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x1c
ret
push dword [esp + 4]
push dword [esp + 0x28]
call fcn.00308b74
add esp, 8
movzx eax, byte [esp + 8]
test al, 2
jne 0x309060
push 0
mov eax, dword [esp + 0x2c]
push eax
call fcn.00308b74
add esp, 8
jmp 0x309073
movzx eax, byte [esp + 0x13]
push eax
mov edx, dword [esp + 0x2c]
push edx
call fcn.00308b74
add esp, 8
movzx eax, byte [esp + 0x12]
push eax
push dword [esp + 0x30]
call fcn.00308b74
movzx eax, byte [esp + 0x1c]
push eax
push dword [esp + 0x3c]
call fcn.00308b74
movzx eax, byte [esp + 0x18]
and eax, 1
push eax
push dword [esp + 0x48]
call fcn.00308b74
movzx eax, byte [esp + 0x20]
and eax, 0x30
shr eax, 4
push eax
push dword [esp + 0x54]
call fcn.00308b74
movzx eax, byte [esp + 0x29]
and eax, 0x30
shr eax, 4
push eax
push dword [esp + 0x60]
call fcn.00308b74
movzx eax, byte [esp + 0x30]
and eax, 4
shr eax, 2
push eax
push dword [esp + 0x6c]
call fcn.00308b74
movzx eax, byte [esp + 0x38]
and eax, 8
shr eax, 3
push eax
push dword [esp + 0x78]
call fcn.00308b74
movzx eax, byte [esp + 0x40]
and eax, 0x40
shr eax, 6
push eax
push dword [esp + 0x84]
call fcn.00308b74
movzx eax, byte [esp + 0x49]
and eax, 1
push eax
push dword [esp + 0x90]
call fcn.00308b74
movzx eax, byte [esp + 0x51]
and eax, 2
shr eax, 1
push eax
push dword [esp + 0x9c]
call fcn.00308b74
movzx eax, word [esp + 0x5e]
push eax
push dword [esp + 0xa8]
call fcn.00308b74
movzx eax, word [esp + 0x68]
push eax
push dword [esp + 0xb4]
call fcn.00308b74
movzx eax, byte [esp + 0x68]
and eax, 0x80
shr eax, 7
push eax
push dword [esp + 0xc0]
call fcn.00308b74
movzx eax, byte [esp + 0x71]
and eax, 0x40
shr eax, 6
push eax
push dword [esp + 0xcc]
call fcn.00308b74
movzx eax, byte [esp + 0x79]
and eax, 4
shr eax, 2
push eax
push dword [esp + 0xd8]
call fcn.00308b74
add esp, 0x78
movzx eax, byte [esp + 9]
and eax, 8
shr eax, 3
push eax
push dword [esp + 0x6c]
call fcn.00308b74
add esp, 8
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x3091d7
movzx eax, byte [esp + 0x15]
mov edx, dword [esp + 0x6c]
mov byte [edx], al
mov eax, dword [esp + 0x70]
test eax, eax
je 0x3091ea
movzx eax, byte [esp + 0x16]
mov edx, dword [esp + 0x70]
mov byte [edx], al
mov eax, dword [esp + 0x74]
test eax, eax
je 0x3091fd
movzx eax, byte [esp + 0x17]
mov edx, dword [esp + 0x74]
mov byte [edx], al
mov eax, dword [esp + 0x78]
test eax, eax
je 0x309210
movzx eax, byte [esp + 0x18]
mov edx, dword [esp + 0x78]
mov byte [edx], al
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x309223
movzx eax, byte [esp + 0x19]
mov edx, dword [esp + 0x7c]
mov byte [edx], al
xor eax, eax
add esp, 0x1c
ret
mov eax, 0x57
add esp, 0x1c
ret
Function at 0x309918
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x1c
mov eax, dword [esp + 0x30]
test eax, eax
mov esi, dword [esp + 0x38]
je 0x309a83
push 0
push dword [eax]
call fcn.00308194
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x309a83
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x309a6c
test esi, esi
je 0x30995a
mov ebx, dword [esi]
test ebx, ebx
jne 0x309973
push dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
push edx
call fcn.003098f8
mov ebx, eax
add esp, 8
mov edx, dword [esp + 0x34]
sub ebx, edx
mov dword [esp], 0
xor edx, edx
test ebx, ebx
je 0x309a4d
xor edx, edx
mov dword [esp + 4], edx
mov dword [esp + 8], edx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
xor edx, edx
push edx
push edx
push 1
push edx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x309a5e
lea ecx, [esp + 0x18]
lea edx, [esp + 4]
push edx
push ecx
push ebx
mov edi, dword [esp + 0x40]
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x3099f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x3e5
je 0x3099f4
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
add esp, 0x1c
pop ebx
pop ebp
pop esi
pop edi
ret
lea ecx, [esp + 4]
lea edx, [esp]
push 1
push edx
push ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x309a28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
add esp, 0x1c
pop ebx
pop ebp
pop esi
pop edi
ret
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp]
cmp edx, ebx
je 0x309a4d
push edx
push esi
call fcn.00308b74
mov eax, 0x3e4
add esp, 0x24
pop ebx
pop ebp
pop esi
pop edi
ret
push edx
push esi
call fcn.00308b74
xor eax, eax
add esp, 0x24
pop ebx
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x1c
pop ebx
pop ebp
pop esi
pop edi
ret
push ebp
call fcn.003088c0
pop ecx
test eax, eax
je 0x309950
add esp, 0x1c
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, 0x57
add esp, 0x1c
pop ebx
pop ebp
pop esi
pop edi
ret
Function at 0x30ae68
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi]
test eax, eax
jle 0x30aeae
cmp eax, 0x17
jg 0x30aeae
cmp eax, 9
je 0x30af02
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, dword [esp + 8]
cmp eax, dword [edx]
jne 0x30aefb
mov eax, dword [esi]
cmp eax, 0xe
je 0x30aeca
push eax
call dword [sym.imp.MSVCRT.dll_raise]
pop ecx
test eax, eax
jne 0x30aeba
mov eax, dword [esp + 0x10]
mov dword [eax], 0
pop esi
ret
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x16
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [edx], eax
pop esi
ret
call fcn.0030b304
mov esi, eax
mov edx, dword [esi + 0x18]
test edx, edx
jne 0x30aee6
push esi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [esi + 0x18], 1
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0030b174
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
ret
call fcn.003057f4
jmp 0x30aeba
mov eax, dword [esp + 8]
push dword [eax]
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
je 0x30af36
push 9
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x30af2f
mov eax, dword [esp + 0x10]
mov dword [eax], 0
pop esi
ret
call fcn.003057f4
jmp 0x30aeba
call fcn.003057f4
jmp 0x30aeba

Function at 0x30b1ac
Capabilities:
Create thread
Terminate thread

Disassembly:
push esi
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [0x31c858]
mov dword [esp], 0
test eax, eax
jne 0x30b1d7
push 0x31c840
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x31c858], 1
mov edx, dword [0x31c85c]
test edx, edx
je 0x30b243
lea eax, [esp]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x30b243
mov eax, dword [esp]
cmp eax, 0x103
jne 0x30b243
push 0x31c840
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x31c860]
mov edx, dword [esp + 0x10]
mov dword [edx], eax
mov eax, dword [esi]
test eax, eax
jne 0x30b230
push 0
push dword [0x31c85c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [0x31c85c], 0
mov eax, dword [esi]
push 0x31c840
mov dword [0x31c860], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ecx
pop esi
ret
mov eax, dword [esp + 0x10]
xor edx, edx
push edx
mov dword [eax], edx
mov esi, dword [esi]
mov dword [0x31c860], esi
push edx
push edx
push 0x30b26c
push edx
push edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x31c85c], eax
pop ecx
pop esi
ret