joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001c9c0
Capabilities:
Check os version
Create thread
Enumerate gui resources
Hide graphical window
Parse pe header

Disassembly:
sub esp, 0x19c
push esi
push edi
call fcn.1001bff0
test ax, ax
mov word [0x10039608], 0
jne 0x1001ca93
lea eax, [esp + 0xa0]
push 1
push eax
call fcn.1001c440
add esp, 8
cmp ax, 1
jne 0x1001ca0d
lea ecx, [esp + 0xa0]
push ecx
call fcn.1001cc00
add esp, 4
mov word [0x10039608], ax
cmp word [0x10039608], 0
jne 0x1001ca93
lea edx, [esp + 0xa0]
push 2
push edx
call fcn.1001c440
add esp, 8
cmp ax, 1
jne 0x1001ca45
lea eax, [esp + 0xa0]
push eax
call fcn.1001cc00
add esp, 4
mov word [0x10039608], ax
cmp word [0x10039608], 0
jne 0x1001ca93
lea ecx, [esp + 0xa0]
push 0
push ecx
call fcn.1001c440
add esp, 8
cmp ax, 1
jne 0x1001ca7d
lea edx, [esp + 0xa0]
push edx
call fcn.1001cc00
add esp, 4
mov word [0x10039608], ax
cmp word [0x10039608], 0
jne 0x1001ca93
xor ax, ax
pop edi
pop esi
add esp, 0x19c
ret
mov eax, dword [esp + 0x1ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x1001cac5
cmp word [eax], 0x5a4d
jne 0x1001cac5
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1001cac5
mov ax, word [ecx + 0x16]
shr eax, 0xd
and eax, 1
jmp 0x1001cac9
mov ax, 1
mov esi, dword [esp + 0x1a8]
mov word [0x1003a408], ax
test ax, ax
mov dword [0x1003a400], esi
mov dword [0x1003a404], 0x10033d7c
je 0x1001cb0a
push 0x1003a400
call fcn.1001c770
add esp, 4
test ax, ax
jne 0x1001cbe5
pop edi
pop esi
add esp, 0x19c
ret
or eax, 0xffffffff
mov ecx, 0x20
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
xor eax, eax
lea edi, [esp + 0x20]
mov dword [esp + 0xc], 0x94
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x1001cbb3
cmp dword [esp + 0x1c], 2
jne 0x1001cbb3
cmp dword [esp + 0x10], 5
jb 0x1001cbb3
push 0x1003960c
push 0x1001cec0
call dword [sym.imp.USER32.dll_EnumWindows]
mov eax, dword [0x1003960c]
test eax, eax
jne 0x1001cbb3
push 0
push esi
push 0
push 0
push 1
push 1
push 0xffffffffffffff9c
push 0xffffffffffffff9c
push 0x80000000
push 0
push str.BUTTON
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
test eax, eax
mov dword [0x1003960c], eax
je 0x1001cbb3
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x10039610], eax
lea edx, [esp + 8]
push edx
push 0
push 0x1003a400
push 0x1001c910
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x1001cbde
xor ax, ax
pop edi
pop esi
add esp, 0x19c
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov ax, 1
pop esi
add esp, 0x19c
ret
Function at 0x1001cc00
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
sub esp, 0x1a4
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0xb0]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0xb0]
push 3
lea edx, [esp + 0x18]
push ecx
push edx
call fcn.10020470
mov ebx, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
add esp, 0xc
lea eax, [esp + 0x14]
mov byte [esp + 0x17], 0
push eax
call ebx
cmp eax, 5
jne 0x1001cc8d
mov ecx, dword [esp + 0x1b8]
lea edx, [esp + 0x14]
push ecx
push edx
push 0x1002fbf4
push 0x10039500
call fcn.1001eb80
add esp, 0x10
push 0x10039500
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov ax, cx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
lea edx, [esp + 0xb0]
push 0x5c
push edx
call fcn.1001f9e0
mov edi, dword [esp + 0x1c0]
add esp, 8
mov byte [eax + 1], 0
lea eax, [esp + 0xb0]
push edi
push eax
push 0x1002fbf4
push 0x10039500
call fcn.1001eb80
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x10
push 0x10039500
call ebp
cmp eax, 0xffffffff
je 0x1001cce6
mov ax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
call fcn.10018130
push eax
call fcn.10018010
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.1001a5e0
add esp, 0xc
cmp ax, 1
jne 0x1001cd38
lea edx, [esp + 0x14]
push edi
push edx
push 0x1002fbf4
push 0x10039500
call fcn.1001eb80
add esp, 0x10
push 0x10039500
call ebp
cmp eax, 0xffffffff
je 0x1001cd38
mov ax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
lea eax, [esp + 0x18]
push eax
push 0x95
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
mov al, byte [esp + 0x18]
mov byte [esp + 0x10], 0
test al, al
je 0x1001cdde
mov eax, dword [esp + 0x10]
and eax, 0xff
lea esi, [esp + eax + 0x18]
push esi
call ebx
cmp eax, 5
jne 0x1001cd8e
push edi
push esi
push 0x1002fbf4
push 0x10039500
call fcn.1001eb80
add esp, 0x10
push 0x10039500
call ebp
cmp eax, 0xffffffff
jne 0x1001cdcf
cmp byte [esi], 0
je 0x1001cda9
inc byte [esp + 0x10]
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov al, byte [esp + ecx + 0x18]
test al, al
jne 0x1001cd93
inc byte [esp + 0x10]
mov eax, dword [esp + 0x10]
mov edx, eax
and edx, 0xff
mov cl, byte [esp + edx + 0x18]
test cl, cl
jne 0x1001cd5d
xor ax, ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov ax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0x1a4
ret
Function at 0x1001cf10
Capabilities:
Check if file exists
Get file attributes
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x108
push ebx
push esi
xor esi, esi
push edi
cmp eax, esi
jne 0x1001cf82
mov edi, dword [esp + 0x11c]
mov dword [0x10039624], esi
mov dword [0x10039628], esi
mov dword [0x1003962c], esi
mov ecx, 9
mov esi, 0x10039620
mov dword [0x10039620], 4
mov dword [0x10039630], 2
mov dword [0x10039634], 0x5a
mov dword [0x10039638], 0x28
rep movsd dword es:[edi], dword [esi]
mov esi, 1
mov ax, si
pop edi
pop esi
pop ebx
add esp, 0x108
ret
cmp word [esp + 0x120], si
je 0x1001cf9e
push str.00000001.LT1
push eax
lea eax, [esp + 0x18]
push str._s_s
push eax
jmp 0x1001cfae
push str.00000001.TMP
push eax
lea ecx, [esp + 0x18]
push str._s_s
push ecx
call fcn.1001eb80
add esp, 0x10
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1001d072
push esi
push 0x80
push 3
push esi
push esi
lea eax, [esp + 0x24]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, esi
je 0x1001d072
mov ecx, 9
xor eax, eax
mov edi, 0x10039620
push esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push ecx
push 0x24
push 0x10039620
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001d06b
mov eax, dword [esp + 0xc]
cmp eax, 0x14
jne 0x1001d032
mov edi, dword [esp + 0x11c]
mov ecx, 9
mov esi, 0x10039620
rep movsd dword es:[edi], dword [esi]
jmp 0x1001d066
cmp eax, 0x24
jne 0x1001d06b
mov eax, dword [esp + 0x11c]
mov ecx, 9
mov esi, 0x10039620
mov edi, eax
rep movsd dword es:[edi], dword [esi]
cmp dword [0x10039620], 2
jb 0x1001d066
mov edx, dword [esp + 0x124]
push eax
push edx
call fcn.1001d1f0
add esp, 8
mov esi, 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ax, si
pop edi
pop esi
pop ebx
add esp, 0x108
ret

Function at 0x1001df81
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 8]
push esi
mov esi, dword [esp + 8]
push edi
mov dl, byte [ecx]
xor eax, eax
xor edi, edi
mov byte [esi], dl
cmp byte [ecx], al
je 0x1001dfaf
mov edx, esi
push ebx
sub edx, ecx
mov bl, byte [ecx + 1]
inc edi
inc ecx
dec bl
xor bl, byte [edx + ecx - 1]
mov byte [edx + ecx], bl
cmp byte [ecx], al
jne 0x1001df9c
pop ebx
mov byte [edi + esi], al
mov eax, esi
pop edi
pop esi
ret
Function at 0x1001e9d0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.1001ea90
mov eax, dword [0x10039b30]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x1001e9f4
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x10039b2c], 1
mov byte [0x10039b28], bl
jne 0x1001ea4e
mov ecx, dword [0x1003f080]
test ecx, ecx
je 0x1001ea3c
mov esi, dword [0x1003f07c]
sub esi, 4
cmp esi, ecx
jb 0x1001ea3c
mov eax, dword [esi]
test eax, eax
je 0x1001ea35
call eax
mov ecx, dword [0x1003f080]
sub esi, 4
cmp esi, ecx
jae 0x1001ea27
push 0x1002f01c
push 0x1002f014
call fcn.1001eab0
add esp, 8
push 0x1002f024
push 0x1002f020
call fcn.1001eab0
add esp, 8
test ebx, ebx
je 0x1001ea6d
call fcn.1001eaa0
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x10039b30], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x10020520
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [esp + 8]
cmp eax, 1
jne 0x100205e4
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x10039af4], eax
call fcn.10021010
test eax, eax
jne 0x10020544
ret 0xc
mov ecx, dword [0x10039af4]
xor edx, edx
mov eax, ecx
mov dl, ch
and eax, 0xff
mov dword [0x10039b00], edx
mov dword [0x10039afc], eax
shl eax, 8
add eax, edx
shr ecx, 0x10
mov dword [0x10039af8], eax
mov dword [0x10039af4], ecx
call fcn.10023de0
test eax, eax
jne 0x10020586
call fcn.10021050
xor eax, eax
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1003f074], eax
call fcn.100258a0
mov ecx, dword [0x1003f074]
mov dword [0x10039b58], eax
test ecx, ecx
je 0x100205d5
test eax, eax
je 0x100205d5
call fcn.10024f10
call fcn.10022060
call fcn.100255f0
call fcn.10025500
call fcn.1001e950
mov eax, dword [0x10039b54]
inc eax
mov dword [0x10039b54], eax
mov eax, 1
ret 0xc
call fcn.10023e40
call fcn.10021050
xor eax, eax
ret 0xc
test eax, eax
jne 0x10020624
mov eax, dword [0x10039b54]
test eax, eax
jle 0x1002061f
mov ecx, eax
mov eax, dword [0x10039b2c]
dec ecx
test eax, eax
mov dword [0x10039b54], ecx
jne 0x10020608
call fcn.1001e9c0
call fcn.10025120
call fcn.10023e40
call fcn.10021050
mov eax, 1
ret 0xc
xor eax, eax
ret 0xc
cmp eax, 3
jne 0x10020633
push 0
call fcn.10023f10
add esp, 4
mov eax, 1
ret 0xc
Function at 0x100231d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x100231fc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x1003df40]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x10023237
push 2
push ebp
push ecx
call fcn.10023bb0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x10023399
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x100232e1
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x10023292
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x1002327f
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x10023262
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1002338a
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x100232dd
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x1002325e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x10023379
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10023335
cmp eax, 5
jne 0x1002331e
call fcn.10023b10
mov dword [eax], 9
call fcn.10023b20
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.10023a90
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x10023355
cmp byte [ebp], 0x1a
jne 0x10023355
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.10023b10
mov dword [eax], 0x1c
call fcn.10023b20
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x100232dd
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100233ca
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x100232e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x100232e1
Function at 0x10023de0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.10021090
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x10037df8], eax
je 0x10023e38
push 0x74
push 1
call fcn.10026d50
mov esi, eax
add esp, 8
test esi, esi
je 0x10023e38
mov eax, dword [0x10037df8]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x10023e38
push esi
call fcn.10023e70
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x10023e90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x10037df8]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x10023efe
push 0x74
push 1
call fcn.10026d50
mov esi, eax
add esp, 8
test esi, esi
je 0x10023ef4
mov ecx, dword [0x10037df8]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x10023ef4
push esi
call fcn.10023e70
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.100206f0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

Function at 0x10023f10
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov eax, dword [0x10037df8]
cmp eax, 0xffffffff
je 0x10023fbf
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x10023f34
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x10023fb0
mov eax, dword [esi + 0x24]
test eax, eax
je 0x10023f44
push eax
call fcn.1001e180
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x10023f54
push eax
call fcn.1001e180
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x10023f64
push eax
call fcn.1001e180
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10023f74
push eax
call fcn.1001e180
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x10023f84
push eax
call fcn.1001e180
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x10023f94
push eax
call fcn.1001e180
add esp, 4
mov eax, dword [esi + 0x50]
cmp eax, 0x100386e0
je 0x10023fa7
push eax
call fcn.1001e180
add esp, 4
push esi
call fcn.1001e180
add esp, 4
mov eax, dword [0x10037df8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x10025180
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.1001fef0
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.10023bb0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x100252c0
push 2
push ebp
push ebx
call fcn.10023bb0
add esp, 0xc
cmp eax, 0xffffffff
je 0x100252c0
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x10025261
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.10027320
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x10025206
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.100231d0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10025222
sub esi, eax
test esi, esi
jle 0x1002523a
jmp 0x100251f7
call fcn.10023b20
cmp dword [eax], 5
jne 0x10025237
call fcn.10023b10
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.10027320
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.10023bb0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x100252a7
push 0
push ecx
push ebx
call fcn.10023bb0
add esp, 0xc
push ebx
call fcn.10024e20
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x100252a7
call fcn.10023b10
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.10023b20
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.10023bb0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x100258a0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x1003a030]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x100258e2
call edi
mov esi, eax
test esi, esi
je 0x100258cc
mov eax, 1
jmp 0x100258dd
call ebp
mov ebx, eax
test ebx, ebx
je 0x100259ef
mov eax, 2
mov dword [0x1003a030], eax
cmp eax, 1
jne 0x10025982
test esi, esi
jne 0x100258fb
call edi
mov esi, eax
test esi, esi
je 0x100259ef
cmp word [esi], 0
mov eax, esi
je 0x10025915
add eax, 2
cmp word [eax], 0
jne 0x10025903
add eax, 2
cmp word [eax], 0
jne 0x10025903
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x10025974
push edi
call fcn.1001e1f0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10025974
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x10025966
push ebx
call fcn.1001e180
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x100259ef
test ebx, ebx
jne 0x10025993
call ebp
mov ebx, eax
test ebx, ebx
je 0x100259ef
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x100259ab
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1002599b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1002599b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.1001e1f0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x100259cd
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x10025a40
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x10037e48
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x10025a64
add eax, 8
inc ebp
cmp eax, 0x10037ed8
jb 0x10025a55
cmp ecx, dword [ebp*8 + 0x10037e48]
jne 0x10025c0b
mov eax, dword [0x10039b60]
cmp eax, 1
je 0x10025bcd
test eax, eax
jne 0x10025a90
cmp dword [0x10039b64], 1
je 0x10025bcd
cmp ecx, 0xfc
je 0x10025c0b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10025acb
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x10025b14
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x1002c628
add ebx, ecx
push ebx
call fcn.1001e080
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x1002c608
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x10037e4c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.10027390
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x1003df40]
test eax, eax
je 0x10025bde
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x10025be8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x10037e4c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret