joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a710
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42a8cb
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x434674]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea ecx, [esi + 4]
mov dword [esi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.00411087
push 4
mov dword [ebp - 4], 0
call fcn.004122cd
mov edi, eax
add esp, 4
test edi, edi
je 0x40a78c
call fcn.00410f5f
mov dword [edi], eax
call fcn.00410d1e
push 0
lea ecx, [ebp - 0x10]
mov ebx, eax
call fcn.00411048
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x40a782
inc eax
mov dword [ebx + 4], eax
lea ecx, [ebp - 0x10]
call fcn.00411070
jmp 0x40a78e
xor edi, edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi + 0x38], edi
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40a800
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42a8cb
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x434674]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea ecx, [esi + 4]
mov dword [esi], vtable.std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__.0
call fcn.00411087
push 4
mov dword [ebp - 4], 0
call fcn.004122cd
mov edi, eax
add esp, 4
test edi, edi
je 0x40a87c
call fcn.00410f5f
mov dword [edi], eax
call fcn.00410d1e
push 0
lea ecx, [ebp - 0x10]
mov ebx, eax
call fcn.00411048
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x40a872
inc eax
mov dword [ebx + 4], eax
lea ecx, [ebp - 0x10]
call fcn.00411070
jmp 0x40a87e
xor edi, edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi + 0x38], edi
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x40ca60
Capabilities:
Contain obfuscated stackstrings

Disassembly:
inc dword [eax]
mov byte [ebp - 0x6b6], 0x9b
and byte [ebp - 0x6b5], 0
mov byte [ebp - 0x6b4], 0x33
mov byte [ebp - 0x6b3], 0x16
mov byte [ebp - 0x6b2], 0xd
dec esi
stc
invalid
dec dword [0xf94f85c6]
invalid
call dword [eax]
mov byte [ebp - 0x6b0], 1
mov byte [ebp - 0x6af], 0x34
mov byte [ebp - 0x6ae], 0x16
push ss
mov byte [ebp - 0x6ad], 0xb
mov byte [ebp - 0x6ac], 7
mov byte [ebp - 0x6ab], 1
test dword [ebp - 7], edx
invalid
inc dword [ecx]
mov byte [ebp - 0x6aa], 0x17
mov byte [ebp - 0x6a9], 0x17
stc
invalid
call dword [edi]
mov byte [ebp - 0x6a8], 0x29
mov byte [ebp - 0x6a7], 1
mov byte [ebp - 0x6a6], 9
mov byte [ebp - 0x6a5], 0xb
mov byte [ebp - 0x6a4], 0x16
mov byte [ebp - 0x6a3], 0x1d
mov byte [ebp - 0x6a2], 0x64
lea eax, [ebp - 0x6b8]
push eax
call fcn.0040bd66
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.0040bd1b
add esp, 0xc
or al, 0x89
test dword [eax - 7], esi
invalid
inc esi
test dword [eax - 7], esp
invalid
dec dword [ebx - 0x69e7280]
invalid
invalid
inc esi
test dword [edx - 7], esp
invalid
call dword [ebp - 0x3a]
test dword [ebx - 7], esp
invalid
dec dword [ebx - 0x69b7a3a]
invalid
invalid
in al, dx
lea eax, [ebp - 0x694]
push eax
push 5
lea eax, [ebp - 0x6a0]
push eax
push dword [ebp - 0x33c]
push 0xffffffffffffffff
call dword [ebp - 0x690]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c0], eax
dec dword [ebx - 0x7a76efbb]
inc esp
stc
invalid
jmp [eax]
adc byte [eax], al
add byte [edx + 8], ch
or bh, bh
mov ch, 0x8c
stc
invalid
invalid
call dword [ebp - 0x67c]
mov dword [ebp - 0x698], eax
stc
invalid
invalid
call fcn.0040bd56
dec ebp
mov dword [0xb5ff69d1], eax
push 0x8dfffff9
test dword [eax - 7], eax
invalid
Function at 0x40d120
Capabilities:
Contain obfuscated stackstrings

Disassembly:
inc dword [ebx - 0x6cb43]
inc dword [eax]
je 0x40dee9
push 5
mov eax, dword [ebp - 0x378]
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax - 0x1d]
push eax
lea eax, [ebp - 0x394]
push eax
call fcn.0040bcc7
add esp, 0xc
and dword [ebp - 0x700], 0
jmp 0x40d163
mov eax, dword [ebp - 0x700]
inc eax
mov dword [ebp - 0x700], eax
cmp dword [ebp - 0x700], 5
jge 0x40d1ac
mov eax, dword [ebp - 0x700]
movsx eax, byte [ebp + eax - 0x394]
movsx ecx, byte [ebp - 0x24]
xor eax, ecx
mov ecx, dword [ebp - 0x700]
mov byte [ebp + ecx - 0x394], al
mov eax, dword [ebp - 0x700]
movsx eax, byte [ebp + eax - 0x394]
not eax
mov ecx, dword [ebp - 0x700]
mov byte [ebp + ecx - 0x394], al
jmp 0x40d156
call fcn.0040bd56
salc
add dl, byte [ebp + 0x54]
and byte [ebp - 0x72c], 0
and byte [ebp - 0x72b], 0
mov byte [ebp - 0x72a], 0xc2
and byte [ebp - 0x729], 0
mov byte [ebp - 0x728], 0x6b
mov byte [ebp - 0x727], 0x54
mov byte [ebp - 0x726], 0x4f
mov byte [ebp - 0x725], 0x49
mov byte [ebp - 0x724], 0x48
clc
invalid
dec dword [eax - 0x3a]
test ebp, ebx
clc
invalid
call [esi + eax*8 - 0x7b]
fdivp st(0)
invalid
call dword [ecx - 0x3a]
test edi, ebx
clc
invalid
jmp [ebp - 0x3a]
test eax, esp
clc
invalid
dec dword [edi - 0x3a]
test ecx, esp
clc
invalid
call dword [edx - 0x3a]
test edx, esp
clc
invalid
dec dword [ecx - 0x3a]
test ebx, esp
clc
invalid
call [eax - 0x3a]
test esp, esp
clc
invalid
call [esi - 0x3a]
test ebp, esp
clc
invalid
dec dword [ecx - 0x3a]
test esi, esp
clc
invalid
invalid
cmp eax, 0xffeb17e8
call ecx
or ah, al
pop ecx
invalid
test esp, edx
clc
invalid
pop edi
pop esi
pop ebx
leave
ret

Function at 0x411d6c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x434674]
jne 0x411d76
repz ret
jmp fcn.00418332

Function at 0x41396b
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x413992
call fcn.00413279
mov dword [eax], esi
call fcn.00413266
push 0x16
pop esi
mov dword [eax], esi
call fcn.0041977d
mov eax, esi
jmp 0x4139e7
test dword [ebp + 0xc], 0xfffffff9
jne 0x413978
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4139bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041328c
pop ecx
call fcn.00413266
mov eax, dword [eax]
jmp 0x4139e7
test al, 0x10
jne 0x4139e5
test al, 1
je 0x4139e5
test byte [ebp + 0xc], 2
je 0x4139e5
call fcn.00413279
mov dword [eax], 5
call fcn.00413266
mov dword [eax], 0xd
jmp 0x4139b6
xor eax, eax
pop esi
pop ebp
ret
Function at 0x425da3
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x434674]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.004190fc
and dword [ebp - 0x14], 0
cmp dword [0x436f0c], 0
mov dword [ebp - 0x18], eax
jne 0x425e56
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x425efe
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x425efe
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x436f0c], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x436f10], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x436f14], eax
call edi
push eax
call esi
mov dword [0x436f1c], eax
test eax, eax
je 0x425e56
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x436f18], eax
mov eax, dword [0x436f18]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x425eaf
cmp dword [0x436f1c], ecx
je 0x425eaf
push eax
call esi
push dword [0x436f1c]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x425eaf
test ebx, ebx
je 0x425eaf
call edi
test eax, eax
je 0x425ea6
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x425ea6
test byte [ebp - 8], 1
jne 0x425eaf
or dword [ebp + 0x10], 0x200000
jmp 0x425ee2
mov eax, dword [0x436f10]
cmp eax, dword [ebp - 0x18]
je 0x425ee2
push eax
call esi
test eax, eax
je 0x425ee2
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x425ee2
mov eax, dword [0x436f14]
cmp eax, dword [ebp - 0x18]
je 0x425ee2
push eax
call esi
test eax, eax
je 0x425ee2
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x436f0c]
call esi
test eax, eax
je 0x425efe
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x425f00
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00411d6c
leave
ret
Function at 0x401050
Capabilities:
Check os version
Get system information on windows

Disassembly:
sub esp, 0xc0
push esi
lea eax, [esp + 0xa0]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea ecx, [esp + 8]
mov dword [esp + 8], 0x9c
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x18]
mov esi, 2
sub eax, esi
mov edi, 1
jne 0x401269
mov eax, dword [esp + 0xc]
cmp eax, 7
jb 0x4010e0
call fcn.00401000
test eax, eax
jne 0x4010bc
pop edi
mov eax, 0xc
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 7
jb 0x4010e0
call fcn.00401000
test eax, eax
je 0x4010dc
pop edi
mov eax, 0xb
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 6
jne 0x40122c
cmp dword [esp + 0x10], esi
jbe 0x401141
call fcn.00401000
test eax, eax
jne 0x401106
pop edi
mov eax, 0xa
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 6
jne 0x40122c
cmp dword [esp + 0x10], esi
jbe 0x401141
call fcn.00401000
test eax, eax
je 0x401130
pop edi
mov eax, 9
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 6
jne 0x40122c
cmp dword [esp + 0x10], esi
jne 0x401191
call fcn.00401000
test eax, eax
jne 0x40115a
pop edi
mov eax, 8
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 6
jne 0x40122c
cmp dword [esp + 0x10], esi
jne 0x401191
call fcn.00401000
test eax, eax
je 0x401184
pop edi
mov eax, 7
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 6
jne 0x40122c
cmp dword [esp + 0x10], edi
jne 0x4011dd
call fcn.00401000
test eax, eax
jne 0x4011ae
pop edi
mov eax, 6
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 6
jne 0x40122c
cmp dword [esp + 0x10], edi
jne 0x4011dd
call fcn.00401000
test eax, eax
je 0x4011d4
pop edi
mov eax, 5
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 6
jne 0x40122c
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x401269
call fcn.00401000
test eax, eax
jne 0x401200
pop edi
mov eax, 4
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 6
jne 0x40122c
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x401269
call fcn.00401000
test eax, eax
je 0x401228
pop edi
mov eax, 3
pop esi
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
cmp eax, 5
jne 0x401247
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x401249
pop edi
mov eax, 0xd
pop esi
add esp, 0xc0
ret
ja 0x401269
call fcn.00401000
test eax, eax
jne 0x40125d
mov eax, esi
pop edi
pop esi
add esp, 0xc0
ret
cmp dword [esp + 0xc], 5
ja 0x401269
call fcn.00401000
mov eax, edi
pop edi
pop esi
add esp, 0xc0
ret
Function at 0x401790
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x403aa8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x408ad4], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x408ad0], ecx
shl ecx, 8
add ecx, edx
mov dword [0x408acc], ecx
shr eax, 0x10
mov dword [0x408ac8], eax
call fcn.00402540
test eax, eax
jne 0x4017fa
push 0x1c
call fcn.00401930
add esp, 4
mov dword [ebp - 4], 0
call fcn.004037b0
call fcn.004037a0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x409eb4], eax
call fcn.00403370
mov dword [0x408aa4], eax
test eax, eax
je 0x40182d
mov eax, dword [0x409eb4]
test eax, eax
jne 0x401837
push 0xffffffffffffffff
call fcn.00402cd0
add esp, 4
call fcn.004030c0
call fcn.00402fd0
call fcn.00402ca0
mov esi, dword [0x409eb4]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x401916
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x40187e
test al, al
je 0x40187e
and eax, 0xff
push eax
call fcn.00402f70
add esp, 4
test eax, eax
je 0x401858
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401858
cmp byte [esi], 0x22
jne 0x401887
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x401897
cmp al, 0x20
ja 0x401897
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401887
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x4018b8
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x4018bd
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00402cd0
jmp 0x4018fb
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x401887
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401916
Function at 0x401a90
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x409ea0]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x401c3d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x409da0]
lea edi, [ecx*4 + 0x409da0]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x401c3d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x401afe
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x401b0f
push 2
push ebp
push eax
call fcn.00403da0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x401c6e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x401bb9
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x401b6a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x401b57
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 0x401b3a
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 0x401c5f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x401bb5
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x401b36
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x401c2e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401c02
cmp eax, 5
jne 0x401beb
mov dword [0x408ac0], eax
mov dword [0x408abc], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00403fd0
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 0x401c22
cmp byte [ebp], 0x1a
jne 0x401c22
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x408abc], 0x1c
jmp 0x401c47
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x408abc], 9
pop edi
pop esi
pop ebp
mov dword [0x408ac0], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x401bb5
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 0x401c9f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x401bb9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x401bb9
Function at 0x402d10
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x408b04]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x402d2f
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 [0x408b00], 1
mov byte [0x408afc], bl
jne 0x402d89
mov ecx, dword [0x409ea8]
test ecx, ecx
je 0x402d77
mov esi, dword [0x409ea4]
sub esi, 4
cmp esi, ecx
jb 0x402d77
mov eax, dword [esi]
test eax, eax
je 0x402d70
call eax
mov ecx, dword [0x409ea8]
sub esi, 4
cmp esi, ecx
jae 0x402d62
push 0x40601c
push 0x406014
call fcn.00402dc0
add esp, 8
push 0x406024
push 0x406020
call fcn.00402dc0
add esp, 8
test ebx, ebx
jne 0x402db0
push ebp
mov dword [0x408b04], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x403370
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x408c18]
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 0x4033b2
call edi
mov esi, eax
test esi, esi
je 0x40339c
mov eax, 1
jmp 0x4033ad
call ebp
mov ebx, eax
test ebx, ebx
je 0x4034bf
mov eax, 2
mov dword [0x408c18], eax
cmp eax, 1
jne 0x403452
test esi, esi
jne 0x4033cb
call edi
mov esi, eax
test esi, esi
je 0x4034bf
cmp word [esi], 0
mov eax, esi
je 0x4033e5
add eax, 2
cmp word [eax], 0
jne 0x4033d3
add eax, 2
cmp word [eax], 0
jne 0x4033d3
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 0x403444
push edi
call fcn.004046c0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x403444
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 0x403436
push ebx
call fcn.00401e00
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 0x4034bf
test ebx, ebx
jne 0x403463
call ebp
mov ebx, eax
test ebx, ebx
je 0x4034bf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40347b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40346b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40346b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004046c0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40349d
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 0x403bc0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x4083e8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x403be4
add eax, 8
inc ebp
cmp eax, 0x408478
jb 0x403bd5
cmp ecx, dword [ebp*8 + 0x4083e8]
jne 0x403d8b
mov eax, dword [0x408aac]
cmp eax, 1
je 0x403d4d
test eax, eax
jne 0x403c10
cmp dword [0x40621c], 1
je 0x403d4d
cmp ecx, 0xfc
je 0x403d8b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403c4b
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 0x403c94
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 0x4052e0
add ebx, ecx
push ebx
call fcn.00404800
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, 0x4052c0
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 + 0x4083ec]
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.00404770
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x409da0]
test eax, eax
je 0x403d5e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x403d68
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x4083ec]
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