joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10071ed0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x2d], 0
jne 0x10071f6b
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 4]
push esi
push 0
push eax
push ebx
push dword [ebp + 0xc]
push dword [edi + 0x30]
call dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [ebp - 4]
cmp esi, ebx
je 0x10071f22
mov byte [edi + 0x2d], 0xff
test esi, esi
je 0x10071f22
cmp esi, ebx
jge 0x10071f22
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [edi + 0x18], 0
je 0x10071f65
add dword [edi + 0x1c], ebx
cmp dword [edi + 0x1c], 0xffff
jle 0x10071f65
xor eax, eax
mov word [edi + 0x1e], ax
mov eax, dword [edi]
push edi
mov esi, dword [eax + 0x2c]
mov ecx, esi
call dword [0x100783dc]
call esi
mov ecx, dword [edi + 0x18]
push 1
push dword [edi + 0x20]
mov esi, dword [ecx]
push eax
push ecx
mov ecx, dword [esi + 0xc]
call dword [0x100783dc]
call dword [esi + 0xc]
mov esi, dword [ebp - 4]
mov eax, esi
pop esi
pop ebx
jmp 0x10071f7d
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
pop edi
leave
ret 0xc

Function at 0x100721a0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x100bb864]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x10176174], 0
mov eax, dword [ebp + 8]
je 0x100721c8
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
jmp 0x100721e2
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.100066b0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
test eax, eax
setne al
xor ecx, ebp
call fcn.100762d0
leave
ret 4

Function at 0x100723b0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
mov eax, dword [0x100bb864]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x10176174], 0
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
je 0x100723e6
push ebx
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
jmp 0x10072445
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x310]
push eax
push esi
call fcn.100066b0
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.100066b0
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
mov esi, eax
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.100066b0
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100762d0
leave
ret 0x10
Function at 0x10072460
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x100bb864]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x10176174], 0
push esi
mov esi, dword [ebp + 0xc]
je 0x1007248c
push esi
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetTempPathW]
jmp 0x100724bd
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
test eax, eax
je 0x100724bb
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.100066b0
push esi
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x100724bd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.100762d0
leave
ret 8
Function at 0x100222e
Capabilities:
Copy file
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x10014cc
mov dword [ebp - 8], eax
call fcn.01001e75
test eax, eax
je 0x1002267
push 0x10014a4
call fcn.01001e75
test eax, eax
jne 0x100227b
mov eax, 0x522
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100233f
push esi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
xor edi, edi
push dword [edi + 0x1008038]
call fcn.01001f08
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x10022ff
push dword [edi + 0x1008030]
call fcn.01001f08
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x10022ff
push dword [edi + 0x1008040]
call fcn.01001f08
push 1
push eax
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebx
push dword [ebp - 4]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x10022ff
push dword [ebp - 0x14]
push ebx
push dword [ebp - 8]
call esi
push dword [ebp - 4]
push ebx
push dword [ebp - 8]
call esi
push dword [ebp - 0x10]
mov dword [ebp - 4], ebx
push ebx
push dword [ebp - 8]
call esi
add edi, 4
cmp edi, 8
mov dword [ebp - 0x10], ebx
jb 0x1002285
jmp 0x100233d
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [ebp - 0xc], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 0x14], ebx
je 0x1002321
push dword [ebp - 0x14]
push ebx
push dword [ebp - 8]
call esi
cmp dword [ebp - 4], ebx
je 0x100232f
push dword [ebp - 4]
push ebx
push dword [ebp - 8]
call esi
cmp dword [ebp - 0x10], ebx
je 0x100233d
push dword [ebp - 0x10]
push ebx
push dword [ebp - 8]
call esi
pop edi
pop esi
xor eax, eax
cmp dword [ebp - 0xc], ebx
pop ebx
sete al
leave
ret

Function at 0x100234f
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x808
mov eax, dword [0x100804c]
and dword [ebp - 0x808], 0
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov dword [ebp - 4], eax
call fcn.01002844
cmp eax, 0x3e8
pop ecx
jbe 0x1002381
push 0x7a
pop esi
jmp 0x10023ee
lea eax, [ebp - 0x808]
push eax
push 0x2000000
push 0
push 0x10011b0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x10023ee
push 0x1001140
push edi
lea eax, [ebp - 0x804]
push 0x10014f0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x804]
push eax
call fcn.01002844
add esp, 0x14
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x804]
push eax
push 2
push esi
push 0x1001224
push dword [ebp - 0x808]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
pop edi
sete al
pop esi
call fcn.0100252e
leave
ret 4
Function at 0x1002ad0
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x100804c]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x1008058]
je 0x1002afa
inc eax
cmp eax, 0x12
jb 0x1002aeb
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x1008058]
mov dword [ebp - 0x110], esi
jne 0x1002ca5
mov eax, dword [0x10085e8]
cmp eax, 1
je 0x1002c73
test eax, eax
jne 0x1002b30
cmp dword [0x1008054], 1
je 0x1002c73
cmp ecx, 0xfc
je 0x1002ca5
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 0x1002b6b
push 5
pop ecx
mov esi, 0x1001874
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 0x1002b76
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x1002bae
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002b8e
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x1001870
push ebx
call fcn.01004920
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002bb3
sub eax, edx
mov ecx, eax
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x100805c]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1002bcd
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.01003730
mov edx, esp
push 6
pop ecx
mov esi, 0x1001854
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 0x1002bf9
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1002c05
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 0x1002c1e
mov eax, dword [ebp - 0x110]
mov esi, 0x1001850
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x100805c]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002c3c
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1002c48
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x1001828
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.01004815
add esp, 0xc
jmp 0x1002ca5
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x1002ca5
mov esi, dword [esi + 0x100805c]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x1002c8a
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.0100252e
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1003151
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1008854]
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 0x10031a4
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x100318b
mov dword [0x1008854], 1
jmp 0x10031a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x100319f
mov eax, edi
mov dword [0x1008854], eax
jmp 0x10031a4
mov eax, dword [0x1008854]
cmp eax, 1
jne 0x1003210
cmp dword [ebp - 4], ebx
jne 0x10031be
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x10031be
xor eax, eax
jmp 0x10032cf
mov ecx, dword [ebp - 4]
cmp word [ecx], bx
mov eax, ecx
je 0x10031d6
add eax, edi
cmp word [eax], bx
jne 0x10031c8
add eax, edi
cmp word [eax], bx
jne 0x10031c8
sub eax, ecx
add eax, edi
mov esi, eax
push esi
call fcn.01004b0c
cmp eax, ebx
pop ecx
jne 0x10031f7
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
jmp 0x10032cf
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 0x10031e7
cmp eax, edi
je 0x1003218
cmp eax, ebx
jne 0x10031b7
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x10031b7
cmp byte [esi], bl
je 0x100325d
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x10031b7
add dword [ebp - 8], eax
mov eax, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1003249
sub eax, edi
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x100322b
mov esi, dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
add eax, eax
push eax
call fcn.01004b0c
cmp eax, ebx
pop ecx
mov dword [ebp - 0xc], eax
jne 0x1003276
push esi
jmp 0x10032e0
mov edi, esi
mov esi, eax
mov eax, dword [ebp - 4]
cmp byte [eax], bl
je 0x10032c0
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 0x10032d4
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10032a4
sub eax, edx
push esi
lea edi, [edi + eax + 1]
call fcn.01002844
cmp byte [edi], bl
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x1003281
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.01004a23
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x10031b7
Function at 0x10032f0
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x1008858]
test eax, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x1003334
call esi
test eax, eax
je 0x1003319
mov dword [0x1008858], 1
jmp 0x1003339
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x1003330
mov dword [0x1008858], 2
jmp 0x1003342
xor eax, eax
jmp 0x1003398
cmp eax, 1
jne 0x100333d
call esi
jmp 0x1003398
cmp eax, 2
jne 0x1003330
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 0x1003395
lea eax, [edi + edi]
push eax
call fcn.01004b0c
test eax, eax
pop ecx
mov dword [ebp - 4], eax
je 0x1003395
push edi
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push 1
push 0
call esi
test eax, eax
je 0x100338c
mov eax, dword [ebp - 4]
jmp 0x1003397
push dword [ebp - 4]
call fcn.01004a23
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x1004815
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 [0x100887c], ebx
push esi
push edi
jne 0x1004897
push 0x1001900
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x10048d2
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10018f4
push edi
call esi
test eax, eax
mov dword [0x100887c], eax
je 0x10048d2
push 0x10018e4
push edi
call esi
push 0x10018d0
push edi
mov dword [0x1008880], eax
call esi
cmp dword [0x10085f8], 2
mov dword [0x1008884], eax
jne 0x1004897
push 0x10018b4
push edi
call esi
test eax, eax
mov dword [0x100888c], eax
je 0x1004897
push 0x100189c
push edi
call esi
mov dword [0x1008888], eax
mov eax, dword [0x1008888]
test eax, eax
je 0x10048dc
call eax
test eax, eax
je 0x10048c3
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x100888c]
test eax, eax
je 0x10048c3
test byte [ebp - 8], 1
jne 0x10048dc
cmp dword [0x1008604], 4
jb 0x10048d6
or byte [ebp + 0x12], 0x20
jmp 0x10048fb
xor eax, eax
jmp 0x100490b
or byte [ebp + 0x12], 4
jmp 0x10048fb
mov eax, dword [0x1008880]
test eax, eax
je 0x10048fb
call eax
mov ebx, eax
test ebx, ebx
je 0x10048fb
mov eax, dword [0x1008884]
test eax, eax
je 0x10048fb
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x100887c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10054b6
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 0x10054e7
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 0x10054ee
cmp ebx, dword [ebp + 8]
jae 0x10054ee
xor eax, eax
jmp 0x10056de
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x10054ff
xor eax, eax
inc eax
jmp 0x10056dd
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x1005515
cmp ecx, edx
jae 0x100565a
cmp dword [eax + 4], 0
je 0x100551e
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x1005506
cmp dword [ebp + 8], 0
je 0x1005540
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x100565a
cmp eax, esi
jae 0x100565a
mov eax, dword [0x1008890]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x1005565
cmp dword [esi*4 + 0x1008898], edi
je 0x100565e
inc esi
cmp esi, eax
jl 0x1005553
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10056da
cmp dword [ebp - 8], 0x1000000
jne 0x10056da
test byte [ebp - 0xc], 0xcc
je 0x10055e3
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x10056da
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x10056da
cmp word [eax + 0x18], 0x10b
jne 0x10056da
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x10056da
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x10055e3
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x10055e3
test byte [ecx + 0x27], 0x80
jne 0x100565a
push 1
push 0x10088d8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x10054f7
mov ecx, dword [0x1008890]
test ecx, ecx
mov edx, ecx
jle 0x1005617
lea eax, [ecx*4 + 0x1008894]
cmp dword [eax], edi
je 0x1005617
dec edx
sub eax, 4
test edx, edx
jg 0x100560b
test edx, edx
jne 0x1005648
push 0xf
pop ebx
cmp ecx, ebx
jg 0x1005624
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x100563c
lea eax, [edx*4 + 0x1008898]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x100562a
cmp ecx, 0x10
jge 0x1005648
inc ecx
mov dword [0x1008890], ecx
push 0
push 0x10088d8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x10054f7
xor eax, eax
jmp 0x10056dd
test esi, esi
jle 0x10054f7
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x10088d8
call ebx
test eax, eax
jne 0x10054f7
cmp dword [esi*4 + 0x1008898], edi
je 0x10056b4
mov eax, dword [0x1008890]
lea esi, [eax - 1]
test esi, esi
jl 0x10056a2
cmp dword [esi*4 + 0x1008898], edi
je 0x100569e
dec esi
jns 0x1005692
test esi, esi
jge 0x10056b2
cmp eax, 0x10
jge 0x10056ad
inc eax
mov dword [0x1008890], eax
lea esi, [eax - 1]
jmp 0x10056b4
je 0x10056cc
xor ecx, ecx
test esi, esi
jl 0x10056cc
lea eax, [ecx*4 + 0x1008898]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x10056ba
push 0
push 0x10088d8
call ebx
jmp 0x10054f7
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10056e7
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 [0x1009928]
mov eax, dword [0x100804c]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 0x41c], edi
jae 0x10058cd
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x1009940]
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 0x10058cd
and dword [ebp - 0x414], 0
and dword [ebp - 0x420], 0
cmp dword [ebp + 0x10], 0
jne 0x1005758
xor eax, eax
jmp 0x10058e1
test al, 0x20
je 0x100576b
push 2
push 0
push 0
push ecx
call fcn.01006860
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x100582b
and dword [ebp - 0x40c], 0
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x410], edi
jbe 0x10058a7
mov ecx, dword [ebp - 0x410]
xor edi, edi
sub ecx, dword [ebp - 0x41c]
lea eax, [ebp - 0x408]
cmp ecx, dword [ebp + 0x10]
jae 0x10057da
mov edx, dword [ebp - 0x410]
inc dword [ebp - 0x410]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x10057c8
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 0x10057a4
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 0x1005859
mov eax, dword [ebp - 0x418]
add dword [ebp - 0x414], eax
cmp eax, edi
jl 0x1005865
mov eax, dword [ebp - 0x410]
sub eax, dword [ebp - 0x41c]
cmp eax, dword [ebp + 0x10]
jb 0x1005790
jmp 0x1005865
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 0x1005859
mov eax, dword [ebp - 0x418]
and dword [ebp - 0x40c], 0
mov dword [ebp - 0x414], eax
jmp 0x1005865
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40c], eax
mov eax, dword [ebp - 0x414]
test eax, eax
jne 0x10058c5
cmp dword [ebp - 0x40c], eax
je 0x10058a1
push 5
pop eax
cmp dword [ebp - 0x40c], eax
jne 0x1005893
mov dword [0x10085ec], 9
mov dword [0x10085f0], eax
jmp 0x10058de
push dword [ebp - 0x40c]
call fcn.0100672a
pop ecx
jmp 0x10058de
mov edi, dword [ebp - 0x41c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x10058b9
cmp byte [edi], 0x1a
je 0x1005751
mov dword [0x10085ec], 0x1c
jmp 0x10058d7
sub eax, dword [ebp - 0x420]
jmp 0x10058e1
mov dword [0x10085ec], 9
and dword [0x10085f0], 0
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100252e
leave
ret
Function at 0x1005eef
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 4
pop eax
call fcn.01003730
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1005f55
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x10085f8]
mov esi, dword [ebp - 0x40]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
lea edx, [esi - 1]
and ecx, 0x103
not edx
and edx, ebx
inc ecx
sub edx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffff1
add eax, 0x11
imul eax, esi
add eax, edi
cmp edx, eax
jae 0x1005f59
xor eax, eax
jmp 0x1005f66
lea eax, [ebp - 4]
push eax
push ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x50]
pop edi
pop esi
pop ebx
leave
ret