joyce8/EMBER2024-capa huggingface dataset:
Function at 0x6f181e70
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x6f989378]
test esi, esi
jle 0x6f181f5d
mov edi, dword [0x6f98937c]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x6f181ea4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x6f181f56
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x6f181e90
mov dword [esp], eax
mov esi, eax
call fcn.6f182610
test eax, eax
mov edi, eax
je 0x6f181f9a
mov esi, dword [0x6f98937c]
lea ebx, [ebx + ebx*2]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call fcn.6f182720
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x6f98937c]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x6f181f7a
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x6f181f4f
sub eax, 0x40
and eax, 0xffffffbf
je 0x6f181f4f
mov eax, dword [esp + 0x20]
add ebx, dword [0x6f98937c]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x6f181f64
add dword [0x6f989378], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor ebx, ebx
jmp 0x6f181eae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.6f181e10
mov eax, dword [0x6f98937c]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.6f181e10
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.6f181e10
lea esi, [esi]

Function at 0x6f182280
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x6f989388
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x6f989380]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x6f1822d5
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x6f1822ce
test esi, esi
je 0x6f1822ce
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x6f1822b0
mov dword [esp], 0x6f989388
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x10055a2
Capabilities:
Create process on windows
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x10110ec]
push esi
mov esi, dword [ebp + 0xc]
push edi
xor ecx, ecx
lea edx, [ebp - 0x418]
push edx
push ecx
push dword [esi + 0x14]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push dword [esi + 8]
mov dword [ebp - 0x424], eax
mov eax, dword [esi + 0x28]
mov edi, eax
shr edi, 0x1f
push eax
push dword [esi + 0x2c]
not edi
mov dword [ebp - 0x428], ecx
mov dword [ebp - 0x418], ecx
mov dword [ebp - 0x41c], ecx
and edi, 1
call fcn.0100b90f
test eax, eax
je 0x1005744
push ebx
push dword [ebp - 0x418]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 0x420], eax
je 0x1005743
lea ecx, [ebp - 0x418]
push ecx
push eax
push dword [esi + 0x14]
push dword [esi + 8]
push dword [esi + 0x28]
push dword [esi + 0x2c]
call fcn.0100b90f
test eax, eax
je 0x100571a
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
je 0x100571a
cmp eax, esi
ja 0x100571a
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test edi, edi
jne 0x10056ee
lea eax, [ebp - 0x20c]
push eax
push 0x10012b0
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.0100550e
add esp, 0x10
test eax, eax
jl 0x100571a
mov edi, dword [ebp - 0x418]
add edi, 0xe
push edi
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
mov dword [ebp - 0x41c], esi
je 0x100571a
push str._url
push edi
push esi
call fcn.010054e1
test eax, eax
jl 0x100571a
push dword [ebp - 0x420]
push edi
push esi
call fcn.01005575
test eax, eax
jl 0x100571a
push 1
push 0
push esi
lea eax, [ebp - 0x414]
push eax
jmp 0x10056fa
push 1
push 0
push 0
push dword [ebp - 0x420]
push 0x10012a0
push dword [ebp - 0x424]
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x20
pop ecx
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [ebp - 0x428], eax
push dword [ebp - 0x420]
push 0
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
cmp dword [ebp - 0x41c], 0
je 0x1005743
push dword [ebp - 0x41c]
push 0
call ebx
push eax
call edi
pop ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x428]
pop edi
pop esi
call fcn.010060f9
leave
ret 8
Function at 0x1005a8e
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x10110ec]
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
lea eax, [ebp - 0x420]
push eax
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x41c], ebx
mov dword [ebp - 0x420], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x1005ade
cmp dword [ebp - 0x420], ebx
je 0x1005ade
xor eax, eax
inc eax
jmp 0x1005c13
push esi
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, ebx
je 0x1005b12
cmp eax, 0xf8
ja 0x1005b12
mov word [ebp + eax*2 - 0x20c], 0x5c
inc eax
mov word [ebp + eax*2 - 0x20c], bx
jmp 0x1005b1b
mov word [ebp - 0x20c], bx
xor eax, eax
add eax, 0xb
cmp eax, esi
ja 0x1005c0c
lea eax, [ebp - 0x20c]
push eax
push esi
lea eax, [ebp - 0x414]
push eax
call fcn.01005005
push str.winsrv.dll
push esi
lea eax, [ebp - 0x414]
push eax
call fcn.0100553c
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
mov dword [ebp - 0x424], eax
je 0x1005c0c
push 0x1001314
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [0x1012020], eax
je 0x1005c00
push edi
lea eax, [ebp - 0x418]
push eax
push 8
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtOpenProcessToken]
test eax, eax
mov esi, dword [sym.imp.ntdll.dll_NtClose]
jl 0x1005bbd
lea eax, [ebp - 0x42c]
push eax
push dword [ebp - 0x418]
call dword [0x1012020]
push dword [ebp - 0x418]
mov edi, eax
call esi
cmp edi, ebx
jge 0x1005bf5
lea eax, [ebp - 0x418]
push eax
push 1
push 8
push 0xfffffffffffffffe
call dword [sym.imp.ntdll.dll_NtOpenThreadToken]
test eax, eax
jl 0x1005bff
lea eax, [ebp - 0x42c]
push eax
push dword [ebp - 0x418]
call dword [0x1012020]
push dword [ebp - 0x418]
mov edi, eax
call esi
cmp edi, ebx
jl 0x1005bff
mov dword [ebp - 0x41c], 1
pop edi
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x41c]
pop esi
mov ecx, dword [ebp - 4]
pop ebx
call fcn.010060f9
leave
ret
Function at 0x1006240
Capabilities:
Parse pe header

Disassembly:
push 0x60
push 0x1001348
call fcn.01007688
mov edi, 0x94
mov eax, edi
call fcn.01006950
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x101203c], ecx
mov eax, dword [esi + 4]
mov dword [0x1012048], eax
mov edx, dword [esi + 8]
mov dword [0x101204c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x1012040], esi
cmp ecx, 2
je 0x10062a0
or esi, 0x8000
mov dword [0x1012040], esi
shl eax, 8
add eax, edx
mov dword [0x1012044], eax
cmp word [0x1000000], 0x5a4d
jne 0x10062dd
mov eax, dword [0x100003c]
cmp dword [eax + 0x1000000], 0x4550
jne 0x10062dd
movzx ecx, word [eax + 0x1000018]
cmp ecx, 0x10b
je 0x10062f6
cmp ecx, 0x20b
je 0x10062e3
and dword [ebp - 0x1c], 0
jmp 0x100630d
cmp dword [eax + 0x1000084], 0xe
jbe 0x10062dd
xor ecx, ecx
cmp dword [eax + 0x10000f8], ecx
jmp 0x1006307
cmp dword [eax + 0x1000074], 0xe
jbe 0x10062dd
xor ecx, ecx
cmp dword [eax + 0x10000e8], ecx
setne cl
mov dword [ebp - 0x1c], ecx
push 0
call fcn.0100762c
pop ecx
test eax, eax
jne 0x100633a
cmp dword [0x101202c], 1
jne 0x1006327
call fcn.01006d20
push 0x1c
call fcn.01006b33
push 0xff
call fcn.01006992
pop ecx
pop ecx
and dword [ebp - 4], 0
call fcn.0100745c
test eax, eax
jge 0x100634f
push 0x1b
call fcn.01006211
pop ecx
call fcn.010073ac
mov dword [0x10136b0], eax
call fcn.0100720d
mov dword [0x1012028], eax
call fcn.01007170
test eax, eax
jge 0x1006374
push 8
call fcn.01006211
pop ecx
call fcn.01006f2f
test eax, eax
jge 0x1006385
push 9
call fcn.01006211
pop ecx
call fcn.010069ec
mov dword [ebp - 0x28], eax
test eax, eax
je 0x1006398
push eax
call fcn.01006211
pop ecx
and dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.01006ed6
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x10063ba
movzx eax, word [ebp - 0x40]
jmp 0x10063bd
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push 0
push 0x1000000
call fcn.01005cb3
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp dword [ebp - 0x1c], 0
jne 0x10063de
push esi
call fcn.01006acc
call fcn.01006b04
jmp 0x1006410
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x7c]
call fcn.010076c3
ret
Function at 0x1006b33
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x10110ec]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x1011100]
je 0x1006b5d
inc eax
cmp eax, 0x12
jb 0x1006b4e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x1011100]
mov dword [ebp - 0x110], esi
jne 0x1006d08
mov eax, dword [0x101202c]
cmp eax, 1
je 0x1006cd6
test eax, eax
jne 0x1006b93
cmp dword [0x10110f4], 1
je 0x1006cd6
cmp ecx, 0xfc
je 0x1006d08
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
mov byte [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1006bce
push 5
pop ecx
mov esi, 0x10016bc
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebx, [ebp - 0x10c]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1006bd9
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x1006c11
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1006bf1
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x10016b8
push ebx
call fcn.01009250
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1006c16
sub eax, edx
mov ecx, eax
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x1011104]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1006c30
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.01006950
mov edx, esp
push 6
pop ecx
mov esi, 0x100169c
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1006c5c
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1006c68
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1006c81
mov eax, dword [ebp - 0x110]
mov esi, 0x1001698
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x1011104]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1006c9f
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1006cab
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x1001670
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.01009144
add esp, 0xc
jmp 0x1006d08
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x1006d08
mov esi, dword [esi + 0x1011104]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x1006ced
push 0
sub ecx, edx
lea edx, [ebp - 0x114]
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x120]
mov ecx, dword [ebp - 4]
call fcn.010060f9
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100720d
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1012294]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
cmp eax, ebx
push 2
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
pop edi
jne 0x1007260
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x1007247
mov dword [0x1012294], 1
jmp 0x1007265
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x100725b
mov eax, edi
mov dword [0x1012294], eax
jmp 0x1007260
mov eax, dword [0x1012294]
cmp eax, 1
jne 0x10072cc
cmp dword [ebp - 4], ebx
jne 0x100727a
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x100727a
xor eax, eax
jmp 0x100738b
mov ecx, dword [ebp - 4]
cmp word [ecx], bx
mov eax, ecx
je 0x1007292
add eax, edi
cmp word [eax], bx
jne 0x1007284
add eax, edi
cmp word [eax], bx
jne 0x1007284
sub eax, ecx
add eax, edi
mov esi, eax
push esi
call fcn.010065ee
cmp eax, ebx
pop ecx
jne 0x10072b3
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
jmp 0x100738b
mov ecx, esi
mov esi, dword [ebp - 4]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, eax
jmp 0x10072a3
cmp eax, edi
je 0x10072d4
cmp eax, ebx
jne 0x1007273
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x1007273
cmp byte [esi], bl
je 0x1007319
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x1007273
add dword [ebp - 8], eax
mov eax, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1007305
sub eax, edi
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x10072e7
mov esi, dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
add eax, eax
push eax
call fcn.010065ee
cmp eax, ebx
pop ecx
mov dword [ebp - 0xc], eax
jne 0x1007332
push esi
jmp 0x100739c
mov edi, esi
mov esi, eax
mov eax, dword [ebp - 4]
cmp byte [eax], bl
je 0x100737c
mov ecx, dword [ebp - 8]
mov eax, esi
sub eax, dword [ebp - 0xc]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x1007390
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1007360
sub eax, edx
push esi
lea edi, [edi + eax + 1]
call fcn.010093aa
cmp byte [edi], bl
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x100733d
push dword [ebp - 4]
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp - 0xc]
call fcn.0100649a
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x1007273
Function at 0x10073ac
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x1012298]
test eax, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x10073f0
call esi
test eax, eax
je 0x10073d5
mov dword [0x1012298], 1
jmp 0x10073f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x10073ec
mov dword [0x1012298], 2
jmp 0x10073fe
xor eax, eax
jmp 0x1007454
cmp eax, 1
jne 0x10073f9
call esi
jmp 0x1007454
cmp eax, 2
jne 0x10073ec
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push eax
push 1
push 0
mov dword [ebp - 8], eax
call esi
mov edi, eax
test edi, edi
je 0x1007451
lea eax, [edi + edi]
push eax
call fcn.010065ee
test eax, eax
pop ecx
mov dword [ebp - 4], eax
je 0x1007451
push edi
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push 1
push 0
call esi
test eax, eax
je 0x1007448
mov eax, dword [ebp - 4]
jmp 0x1007453
push dword [ebp - 4]
call fcn.0100649a
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x1009144
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x10122c8], ebx
push esi
push edi
jne 0x10091c6
push 0x1001754
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x1009201
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x1001748
push edi
call esi
test eax, eax
mov dword [0x10122c8], eax
je 0x1009201
push 0x1001738
push edi
call esi
push 0x1001724
push edi
mov dword [0x10122cc], eax
call esi
cmp dword [0x101203c], 2
mov dword [0x10122d0], eax
jne 0x10091c6
push 0x1001708
push edi
call esi
test eax, eax
mov dword [0x10122d8], eax
je 0x10091c6
push 0x10016f0
push edi
call esi
mov dword [0x10122d4], eax
mov eax, dword [0x10122d4]
test eax, eax
je 0x100920b
call eax
test eax, eax
je 0x10091f2
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x10122d8]
test eax, eax
je 0x10091f2
test byte [ebp - 8], 1
jne 0x100920b
cmp dword [0x1012048], 4
jb 0x1009205
or byte [ebp + 0x12], 0x20
jmp 0x100922a
xor eax, eax
jmp 0x100923a
or byte [ebp + 0x12], 4
jmp 0x100922a
mov eax, dword [0x10122cc]
test eax, eax
je 0x100922a
call eax
mov ebx, eax
test ebx, ebx
je 0x100922a
mov eax, dword [0x10122d0]
test eax, eax
je 0x100922a
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x10122c8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10094e6
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
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 0x1009517
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x100951e
cmp ebx, dword [ebp + 8]
jae 0x100951e
xor eax, eax
jmp 0x100970e
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x100952f
xor eax, eax
inc eax
jmp 0x100970d
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x1009545
cmp ecx, edx
jae 0x100968a
cmp dword [eax + 4], 0
je 0x100954e
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x1009536
cmp dword [ebp + 8], 0
je 0x1009570
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x100968a
cmp eax, esi
jae 0x100968a
mov eax, dword [0x10122e0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x1009595
cmp dword [esi*4 + 0x10122e8], edi
je 0x100968e
inc esi
cmp esi, eax
jl 0x1009583
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x100970a
cmp dword [ebp - 8], 0x1000000
jne 0x100970a
test byte [ebp - 0xc], 0xcc
je 0x1009613
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x100970a
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x100970a
cmp word [eax + 0x18], 0x10b
jne 0x100970a
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x100970a
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x1009613
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x1009613
test byte [ecx + 0x27], 0x80
jne 0x100968a
push 1
push 0x1012328
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x1009527
mov ecx, dword [0x10122e0]
test ecx, ecx
mov edx, ecx
jle 0x1009647
lea eax, [ecx*4 + 0x10122e4]
cmp dword [eax], edi
je 0x1009647
dec edx
sub eax, 4
test edx, edx
jg 0x100963b
test edx, edx
jne 0x1009678
push 0xf
pop ebx
cmp ecx, ebx
jg 0x1009654
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x100966c
lea eax, [edx*4 + 0x10122e8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x100965a
cmp ecx, 0x10
jge 0x1009678
inc ecx
mov dword [0x10122e0], ecx
push 0
push 0x1012328
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x1009527
xor eax, eax
jmp 0x100970d
test esi, esi
jle 0x1009527
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x1012328
call ebx
test eax, eax
jne 0x1009527
cmp dword [esi*4 + 0x10122e8], edi
je 0x10096e4
mov eax, dword [0x10122e0]
lea esi, [eax - 1]
test esi, esi
jl 0x10096d2
cmp dword [esi*4 + 0x10122e8], edi
je 0x10096ce
dec esi
jns 0x10096c2
test esi, esi
jge 0x10096e2
cmp eax, 0x10
jge 0x10096dd
inc eax
mov dword [0x10122e0], eax
lea esi, [eax - 1]
jmp 0x10096e4
je 0x10096fc
xor ecx, ecx
test esi, esi
jl 0x10096fc
lea eax, [ecx*4 + 0x10122e8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x10096ea
push 0
push 0x1012328
call ebx
jmp 0x1009527
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10097ab
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x1013588]
mov eax, dword [0x10110ec]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 0x41c], edi
jae 0x1009991
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x10135a0]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x424], ebx
je 0x1009991
and dword [ebp - 0x414], 0
and dword [ebp - 0x420], 0
cmp dword [ebp + 0x10], 0
jne 0x100981c
xor eax, eax
jmp 0x10099a5
test al, 0x20
je 0x100982f
push 2
push 0
push 0
push ecx
call fcn.0100a6af
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x10098ef
and dword [ebp - 0x40c], 0
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x410], edi
jbe 0x100996b
mov ecx, dword [ebp - 0x410]
xor edi, edi
sub ecx, dword [ebp - 0x41c]
lea eax, [ebp - 0x408]
cmp ecx, dword [ebp + 0x10]
jae 0x100989e
mov edx, dword [ebp - 0x410]
inc dword [ebp - 0x410]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x100988c
inc dword [ebp - 0x420]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x424]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x1009868
mov edi, eax
lea eax, [ebp - 0x408]
sub edi, eax
push 0
lea eax, [ebp - 0x418]
push eax
push edi
lea eax, [ebp - 0x408]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100991d
mov eax, dword [ebp - 0x418]
add dword [ebp - 0x414], eax
cmp eax, edi
jl 0x1009929
mov eax, dword [ebp - 0x410]
sub eax, dword [ebp - 0x41c]
cmp eax, dword [ebp + 0x10]
jb 0x1009854
jmp 0x1009929
push 0
lea ecx, [ebp - 0x418]
push ecx
push dword [ebp + 0x10]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100991d
mov eax, dword [ebp - 0x418]
and dword [ebp - 0x40c], 0
mov dword [ebp - 0x414], eax
jmp 0x1009929
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40c], eax
mov eax, dword [ebp - 0x414]
test eax, eax
jne 0x1009989
cmp dword [ebp - 0x40c], eax
je 0x1009965
push 5
pop eax
cmp dword [ebp - 0x40c], eax
jne 0x1009957
mov dword [0x1012030], 9
mov dword [0x1012034], eax
jmp 0x10099a2
push dword [ebp - 0x40c]
call fcn.0100a579
pop ecx
jmp 0x10099a2
mov edi, dword [ebp - 0x41c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x100997d
cmp byte [edi], 0x1a
je 0x1009815
mov dword [0x1012030], 0x1c
jmp 0x100999b
sub eax, dword [ebp - 0x420]
jmp 0x10099a5
mov dword [0x1012030], 9
and dword [0x1012034], 0
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.010060f9
leave
ret