joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001aeb0
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.1001a590
test ax, ax
mov word [0x10037fc8], 0
jne 0x1001af83
lea eax, [esp + 0xa0]
push 1
push eax
call fcn.1001a930
add esp, 8
cmp ax, 1
jne 0x1001aefd
lea ecx, [esp + 0xa0]
push ecx
call fcn.1001b0f0
add esp, 4
mov word [0x10037fc8], ax
cmp word [0x10037fc8], 0
jne 0x1001af83
lea edx, [esp + 0xa0]
push 2
push edx
call fcn.1001a930
add esp, 8
cmp ax, 1
jne 0x1001af35
lea eax, [esp + 0xa0]
push eax
call fcn.1001b0f0
add esp, 4
mov word [0x10037fc8], ax
cmp word [0x10037fc8], 0
jne 0x1001af83
lea ecx, [esp + 0xa0]
push 0
push ecx
call fcn.1001a930
add esp, 8
cmp ax, 1
jne 0x1001af6d
lea edx, [esp + 0xa0]
push edx
call fcn.1001b0f0
add esp, 4
mov word [0x10037fc8], ax
cmp word [0x10037fc8], 0
jne 0x1001af83
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 0x1001afb5
cmp word [eax], 0x5a4d
jne 0x1001afb5
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1001afb5
mov ax, word [ecx + 0x16]
shr eax, 0xd
and eax, 1
jmp 0x1001afb9
mov ax, 1
mov esi, dword [esp + 0x1a8]
mov word [0x10038de0], ax
test ax, ax
mov dword [0x10038dd8], esi
mov dword [0x10038ddc], 0x10032744
je 0x1001affa
push 0x10038dd8
call fcn.1001ac60
add esp, 4
test ax, ax
jne 0x1001b0d5
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 0x1001b0a3
cmp dword [esp + 0x1c], 2
jne 0x1001b0a3
cmp dword [esp + 0x10], 5
jb 0x1001b0a3
push 0x10037fcc
push 0x1001b3b0
call dword [sym.imp.USER32.dll_EnumWindows]
mov eax, dword [0x10037fcc]
test eax, eax
jne 0x1001b0a3
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 [0x10037fcc], eax
je 0x1001b0a3
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 [0x10037fd0], eax
lea edx, [esp + 8]
push edx
push 0
push 0x10038dd8
push 0x1001ae00
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x1001b0ce
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 0x1001b0f0
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.1001e8b0
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 0x1001b17d
mov ecx, dword [esp + 0x1b8]
lea edx, [esp + 0x14]
push ecx
push edx
push 0x1002eb24
push 0x10037ec0
call fcn.1001cfc0
add esp, 0x10
push 0x10037ec0
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.1001de20
mov edi, dword [esp + 0x1c0]
add esp, 8
mov byte [eax + 1], 0
lea eax, [esp + 0xb0]
push edi
push eax
push 0x1002eb24
push 0x10037ec0
call fcn.1001cfc0
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x10
push 0x10037ec0
call ebp
cmp eax, 0xffffffff
je 0x1001b1d6
mov ax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
call fcn.10016f70
push eax
call fcn.10016e50
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.10019310
add esp, 0xc
cmp ax, 1
jne 0x1001b228
lea edx, [esp + 0x14]
push edi
push edx
push 0x1002eb24
push 0x10037ec0
call fcn.1001cfc0
add esp, 0x10
push 0x10037ec0
call ebp
cmp eax, 0xffffffff
je 0x1001b228
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 0x1001b2ce
mov eax, dword [esp + 0x10]
and eax, 0xff
lea esi, [esp + eax + 0x18]
push esi
call ebx
cmp eax, 5
jne 0x1001b27e
push edi
push esi
push 0x1002eb24
push 0x10037ec0
call fcn.1001cfc0
add esp, 0x10
push 0x10037ec0
call ebp
cmp eax, 0xffffffff
jne 0x1001b2bf
cmp byte [esi], 0
je 0x1001b299
inc byte [esp + 0x10]
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov al, byte [esp + ecx + 0x18]
test al, al
jne 0x1001b283
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 0x1001b24d
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 0x1001b400
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 0x1001b472
mov edi, dword [esp + 0x11c]
mov dword [0x10037fe4], esi
mov dword [0x10037fe8], esi
mov dword [0x10037fec], esi
mov ecx, 9
mov esi, 0x10037fe0
mov dword [0x10037fe0], 4
mov dword [0x10037ff0], 2
mov dword [0x10037ff4], 0x50
mov dword [0x10037ff8], 0xa
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 0x1001b48e
push str.00000001.LT1
push eax
lea eax, [esp + 0x18]
push str._s_s
push eax
jmp 0x1001b49e
push str.00000001.TMP
push eax
lea ecx, [esp + 0x18]
push str._s_s
push ecx
call fcn.1001cfc0
add esp, 0x10
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1001b562
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 0x1001b562
mov ecx, 9
xor eax, eax
mov edi, 0x10037fe0
push esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push ecx
push 0x24
push 0x10037fe0
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001b55b
mov eax, dword [esp + 0xc]
cmp eax, 0x14
jne 0x1001b522
mov edi, dword [esp + 0x11c]
mov ecx, 9
mov esi, 0x10037fe0
rep movsd dword es:[edi], dword [esi]
jmp 0x1001b556
cmp eax, 0x24
jne 0x1001b55b
mov eax, dword [esp + 0x11c]
mov ecx, 9
mov esi, 0x10037fe0
mov edi, eax
rep movsd dword es:[edi], dword [esi]
cmp dword [0x10037fe0], 2
jb 0x1001b556
mov edx, dword [esp + 0x124]
push eax
push edx
call fcn.1001b6e0
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 0x1001c471
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 0x1001c49f
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 0x1001c48c
pop ebx
mov byte [edi + esi], al
mov eax, esi
pop edi
pop esi
ret
Function at 0x1001cec0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.1001cf80
mov eax, dword [0x100384f0]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x1001cee4
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 [0x100384ec], 1
mov byte [0x100384e8], bl
jne 0x1001cf3e
mov ecx, dword [0x1003d9e0]
test ecx, ecx
je 0x1001cf2c
mov esi, dword [0x1003d9dc]
sub esi, 4
cmp esi, ecx
jb 0x1001cf2c
mov eax, dword [esi]
test eax, eax
je 0x1001cf25
call eax
mov ecx, dword [0x1003d9e0]
sub esi, 4
cmp esi, ecx
jae 0x1001cf17
push 0x1002e020
push 0x1002e018
call fcn.1001cfa0
add esp, 8
push 0x1002e02c
push 0x1002e024
call fcn.1001cfa0
add esp, 8
test ebx, ebx
je 0x1001cf5d
call fcn.1001cf90
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x100384f0], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x1001e960
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [esp + 8]
cmp eax, 1
jne 0x1001ea24
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x100384b4], eax
call fcn.1001f470
test eax, eax
jne 0x1001e984
ret 0xc
mov ecx, dword [0x100384b4]
xor edx, edx
mov eax, ecx
mov dl, ch
and eax, 0xff
mov dword [0x100384c0], edx
mov dword [0x100384bc], eax
shl eax, 8
add eax, edx
shr ecx, 0x10
mov dword [0x100384b8], eax
mov dword [0x100384b4], ecx
call fcn.10022190
test eax, eax
jne 0x1001e9c6
call fcn.1001f4b0
xor eax, eax
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1003d9d4], eax
call fcn.10023c50
mov ecx, dword [0x1003d9d4]
mov dword [0x10038518], eax
test ecx, ecx
je 0x1001ea15
test eax, eax
je 0x1001ea15
call fcn.100232c0
call fcn.100204c0
call fcn.100239a0
call fcn.100238b0
call fcn.1001ce40
mov eax, dword [0x10038514]
inc eax
mov dword [0x10038514], eax
mov eax, 1
ret 0xc
call fcn.100221f0
call fcn.1001f4b0
xor eax, eax
ret 0xc
test eax, eax
jne 0x1001ea64
mov eax, dword [0x10038514]
test eax, eax
jle 0x1001ea5f
mov ecx, eax
mov eax, dword [0x100384ec]
dec ecx
test eax, eax
mov dword [0x10038514], ecx
jne 0x1001ea48
call fcn.1001ceb0
call fcn.100234d0
call fcn.100221f0
call fcn.1001f4b0
mov eax, 1
ret 0xc
xor eax, eax
ret 0xc
cmp eax, 3
jne 0x1001ea73
push 0
call fcn.100222c0
add esp, 4
mov eax, 1
ret 0xc
Function at 0x10021580
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 0x100215ac
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 + 0x1003c8a0]
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 0x100215e7
push 2
push ebp
push ecx
call fcn.10021f60
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x10021749
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x10021691
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x10021642
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x1002162f
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 0x10021612
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 0x1002173a
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x1002168d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x1002160e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x10021729
mov eax, dword [esp + 0x18]
test eax, eax
je 0x100216e5
cmp eax, 5
jne 0x100216ce
call fcn.10021ec0
mov dword [eax], 9
call fcn.10021ed0
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.10021e40
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 0x10021705
cmp byte [ebp], 0x1a
jne 0x10021705
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.10021ec0
mov dword [eax], 0x1c
call fcn.10021ed0
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 0x1002168d
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 0x1002177a
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x10021691
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x10021691
Function at 0x10022190
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.1001f4f0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x100367b0], eax
je 0x100221e8
push 0x74
push 1
call fcn.100252c0
mov esi, eax
add esp, 8
test esi, esi
je 0x100221e8
mov eax, dword [0x100367b0]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x100221e8
push esi
call fcn.10022220
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 0x10022240
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 [0x100367b0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x100222ae
push 0x74
push 1
call fcn.100252c0
mov esi, eax
add esp, 8
test esi, esi
je 0x100222a4
mov ecx, dword [0x100367b0]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x100222a4
push esi
call fcn.10022220
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.1001eb30
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

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

Disassembly:
mov eax, dword [0x100367b0]
cmp eax, 0xffffffff
je 0x1002236f
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x100222e4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x10022360
mov eax, dword [esi + 0x24]
test eax, eax
je 0x100222f4
push eax
call fcn.1001c670
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x10022304
push eax
call fcn.1001c670
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x10022314
push eax
call fcn.1001c670
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10022324
push eax
call fcn.1001c670
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x10022334
push eax
call fcn.1001c670
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x10022344
push eax
call fcn.1001c670
add esp, 4
mov eax, dword [esi + 0x50]
cmp eax, 0x100370b0
je 0x10022357
push eax
call fcn.1001c670
add esp, 4
push esi
call fcn.1001c670
add esp, 4
mov eax, dword [0x100367b0]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x10023530
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.1001e330
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.10021f60
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x10023670
push 2
push ebp
push ebx
call fcn.10021f60
add esp, 0xc
cmp eax, 0xffffffff
je 0x10023670
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x10023611
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.10025890
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x100235b6
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.10021580
add esp, 0xc
cmp eax, 0xffffffff
je 0x100235d2
sub esi, eax
test esi, esi
jle 0x100235ea
jmp 0x100235a7
call fcn.10021ed0
cmp dword [eax], 5
jne 0x100235e7
call fcn.10021ec0
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.10025890
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.10021f60
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x10023657
push 0
push ecx
push ebx
call fcn.10021f60
add esp, 0xc
push ebx
call fcn.100231d0
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 0x10023657
call fcn.10021ec0
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.10021ed0
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.10021f60
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 0x10023c50
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x100389f0]
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 0x10023c92
call edi
mov esi, eax
test esi, esi
je 0x10023c7c
mov eax, 1
jmp 0x10023c8d
call ebp
mov ebx, eax
test ebx, ebx
je 0x10023d9f
mov eax, 2
mov dword [0x100389f0], eax
cmp eax, 1
jne 0x10023d32
test esi, esi
jne 0x10023cab
call edi
mov esi, eax
test esi, esi
je 0x10023d9f
cmp word [esi], 0
mov eax, esi
je 0x10023cc5
add eax, 2
cmp word [eax], 0
jne 0x10023cb3
add eax, 2
cmp word [eax], 0
jne 0x10023cb3
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 0x10023d24
push edi
call fcn.1001c6e0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10023d24
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 0x10023d16
push ebx
call fcn.1001c670
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 0x10023d9f
test ebx, ebx
jne 0x10023d43
call ebp
mov ebx, eax
test ebx, ebx
je 0x10023d9f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x10023d5b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10023d4b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10023d4b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.1001c6e0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x10023d7d
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 0x10023df0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x10036800
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x10023e14
add eax, 8
inc ebp
cmp eax, 0x10036890
jb 0x10023e05
cmp ecx, dword [ebp*8 + 0x10036800]
jne 0x10023fbb
mov eax, dword [0x10038520]
cmp eax, 1
je 0x10023f7d
test eax, eax
jne 0x10023e40
cmp dword [0x10038524], 1
je 0x10023f7d
cmp ecx, 0xfc
je 0x10023fbb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10023e7b
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 0x10023ec4
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 0x1002b638
add ebx, ecx
push ebx
call fcn.1001c570
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, 0x1002b618
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 + 0x10036804]
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.10025900
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x1003c8a0]
test eax, eax
je 0x10023f8e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x10023f98
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x10036804]
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