joyce8/EMBER2024-capa huggingface dataset:
Function at 0x441d80
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x441db3
push esi
call fcn.00450130
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x441dac
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x441e39
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x441e22
mov eax, dword [esi + 8]
test eax, eax
je 0x441dd7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x441e1e
cmp eax, 2
je 0x441e22
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x441dca
cmp eax, 3
je 0x441dfd
cmp eax, 1
jne 0x441dca
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x441dca
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x441dca
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00441e60
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x441e48
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00441e60
add esp, 4
pop esi
ret

Function at 0x4426d0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x4426f1
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x4426f1
mov eax, dword [eax + 0x44]
test eax, eax
je 0x4426f1
mov edx, dword [esp + 8]
push edx
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4701b0
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4701e8
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0046e264
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0046e23c
jmp 0x4701f4
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x47189e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4718e0
call fcn.00477357
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4718e0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4718d7
xor eax, eax
jmp 0x4718e8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004718ee
pop edi
pop esi
pop ebx
ret 4
Function at 0x477887
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4778b5
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4778d3
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004777ed
jmp 0x4778d3
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4778d3
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004777ed
test edi, edi
mov eax, edi
jne 0x4778bd
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x405500
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push 0xffffffffffffffff
push 0x40cfbe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x90
mov al, byte [esp + 3]
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], al
call fcn.00402160
mov cl, byte [esp + 0x13]
push ebx
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
mov dword [esp + 0xac], ebx
call fcn.00402160
push 0x410100
push 0x4100f4
push 0x4100d8
push 0x80000002
lea ecx, [esp + 0x54]
mov byte [esp + 0xb8], 1
call fcn.00404d10
mov ecx, dword [esp + 0xb4]
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0xac], 2
call fcn.00403b90
mov eax, dword [0x40e0f8]
mov ecx, dword [esp + 0xb0]
push eax
add ecx, 0x10
push ebx
push ecx
lea ecx, [esp + 0x20]
call fcn.00401e40
mov edx, dword [0x40e0f8]
mov ecx, dword [esp + 0x1c]
sub edx, ecx
cmp edx, 1
ja 0x4055bb
call fcn.00405eb0
mov eax, dword [esp + 0x1c]
push ebx
lea ecx, [esp + 0x18]
lea esi, [eax + 1]
push esi
call fcn.00402520
test al, al
je 0x4055e8
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
add ecx, edx
push esi
mov byte [ecx], 0x20
lea ecx, [esp + 0x18]
call fcn.00402500
mov eax, dword [0x40e0f8]
lea ecx, [esp + 0x24]
push eax
push ebx
push ecx
lea ecx, [esp + 0x20]
call fcn.00402250
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x40560a
mov eax, 0x40e0fc
push eax
lea edx, [esp + 0x48]
push 0x41016c
push edx
call fcn.00405160
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x68]
add esp, 0xc
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x5c], 0x44
inc eax
push eax
call fcn.00407000
mov edi, dword [esp + 0x1c]
add esp, 4
cmp edi, ebx
mov ebp, eax
jne 0x40564f
mov edi, 0x40e0fc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x34]
mov edx, ecx
mov esi, edi
mov edi, ebp
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x60]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov edi, eax
cmp edi, ebx
je 0x40569e
mov edx, dword [esp + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x34]
push eax
call esi
push ebp
call fcn.00405ea0
add esp, 4
lea ecx, [esp + 0x44]
mov byte [esp + 0xa8], 1
call fcn.00404fe0
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x4056dd
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4056d4
cmp al, 0xff
je 0x4056d4
dec al
mov byte [ecx], al
jmp 0x4056dd
push ecx
call fcn.00405ea0
add esp, 4
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], ebx
cmp eax, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
je 0x40570e
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x405705
cmp al, 0xff
je 0x405705
dec al
mov byte [ecx], al
jmp 0x40570e
push ecx
call fcn.00405ea0
add esp, 4
mov ecx, dword [esp + 0xa0]
mov eax, edi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x9c
ret
Function at 0x405a90
Capabilities:
Access peb ldr_data
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x40cff8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0xc], ebx
cmp dword [esi + 8], ebx
jne 0x405afd
mov esi, dword [esp + 0x30]
mov al, byte [esp + 0x30]
mov edi, 0x412ac0
or ecx, 0xffffffff
mov byte [esi], al
xor eax, eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x412ac0
mov ecx, esi
call fcn.00402340
mov eax, esi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x20
ret 8
mov cl, byte [esp + 0x30]
mov edi, 0x412ac0
mov byte [esp + 0x10], cl
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], ebx
push ecx
push 0x412ac0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call fcn.00402340
push 0x100
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], 0x100
call fcn.00407000
add esp, 4
mov ecx, dword [esi + 4]
lea edx, [esp + 0x10]
mov ebp, eax
mov eax, dword [esp + 0x38]
push ebx
push ebx
push ebx
push ebx
push edx
push ebp
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x405bab
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov esi, ecx
lea ecx, [esp + 0x18]
push esi
mov dword [esp + 0x40], esi
call fcn.00402520
test al, al
je 0x405bab
mov edi, dword [esp + 0x18]
mov ecx, esi
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov byte [eax + ecx], bl
push ebp
call fcn.00405ea0
mov esi, dword [esp + 0x38]
mov dl, byte [esp + 0x18]
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esi], dl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov eax, dword [0x40e0f8]
push eax
push ebx
push ecx
mov ecx, esi
call fcn.00401e40
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x405bff
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x405bf6
cmp al, 0xff
je 0x405bf6
dec al
mov byte [ecx], al
jmp 0x405bff
push ecx
call fcn.00405ea0
add esp, 4
mov ecx, dword [esp + 0x24]
pop ebp
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 8
Function at 0x405ca0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x40d018
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [esp + 8], ebx
cmp dword [esi + 8], ebx
jne 0x405d01
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x2c]
mov cl, byte [eax]
mov dword [esi + 4], ebx
mov byte [esi], cl
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov edx, dword [0x40e0f8]
push edx
push ebx
push eax
mov ecx, esi
call fcn.00401e40
mov eax, esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0x20
ret 0x10
mov eax, dword [esp + 0x34]
mov edx, dword [0x40e0f8]
push edi
push ebp
mov cl, byte [eax]
push edx
mov byte [esp + 0x18], cl
push ebx
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.00401e40
mov eax, dword [esp + 0x40]
mov dword [esp + 0x2c], ebx
push eax
call fcn.00407000
mov edx, dword [esp + 0x3c]
add esp, 4
lea ecx, [esp + 0x40]
mov ebp, eax
mov eax, dword [esi + 4]
push ecx
push ebp
push ebx
push ebx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405d9c
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov esi, ecx
lea ecx, [esp + 0x18]
push esi
mov dword [esp + 0x44], esi
call fcn.00402520
test al, al
je 0x405d9c
mov edi, dword [esp + 0x18]
mov ecx, esi
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov byte [eax + ecx], bl
push ebp
call fcn.00405ea0
mov esi, dword [esp + 0x38]
mov dl, byte [esp + 0x18]
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esi], dl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov eax, dword [0x40e0f8]
push eax
push ebx
push ecx
mov ecx, esi
call fcn.00401e40
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x405df0
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x405de7
cmp al, 0xff
je 0x405de7
dec al
mov byte [ecx], al
jmp 0x405df0
push ecx
call fcn.00405ea0
add esp, 4
mov ecx, dword [esp + 0x24]
pop ebp
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 0x10

Function at 0x405e10
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov eax, dword [ecx + 8]
test eax, eax
mov eax, dword [esp + 0xc]
je 0x405e49
mov dword [esp + 0xc], eax
lea edx, [esp]
lea eax, [esp + 0xc]
push edx
mov edx, dword [esp + 0xc]
push eax
mov eax, dword [ecx + 4]
push 0
push 0
push edx
push eax
mov dword [esp + 0x18], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0xc]
pop ecx
ret 8
Function at 0x4072b0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e170
push 0x40a6b8
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 [0x412b14], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x412b10], ecx
shl ecx, 8
add ecx, edx
mov dword [0x412b0c], ecx
shr eax, 0x10
mov dword [0x412b08], eax
call fcn.0040a670
test eax, eax
jne 0x40731a
push 0x1c
call fcn.00407480
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040a470
call fcn.0040a460
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x414034], eax
call fcn.00409e20
mov dword [0x412ac4], eax
test eax, eax
je 0x40734d
mov eax, dword [0x414034]
test eax, eax
jne 0x407357
push 0xffffffffffffffff
call fcn.004085a0
add esp, 4
call fcn.00409b70
call fcn.00409a80
call fcn.00408570
mov esi, dword [0x414034]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x407436
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x40739e
test al, al
je 0x40739e
and eax, 0xff
push eax
call fcn.00409a20
add esp, 4
test eax, eax
je 0x407378
inc esi
mov dword [ebp - 0x64], esi
jmp 0x407378
cmp byte [esi], 0x22
jne 0x4073a7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x4073b7
cmp al, 0x20
ja 0x4073b7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4073a7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x4073d8
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x4073dd
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.004085a0
jmp 0x40741b
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 0x4073a7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x407436

Function at 0x407480
Capabilities:
Terminate process

Disassembly:
cmp dword [0x412acc], 1
jne 0x40748e
call fcn.0040a790
mov eax, dword [esp + 4]
push eax
call fcn.0040a7d0
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x4085e0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x412b44]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x4085ff
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 [0x412b40], 1
mov byte [0x412b3c], bl
jne 0x408659
mov ecx, dword [0x41402c]
test ecx, ecx
je 0x408647
mov esi, dword [0x414028]
sub esi, 4
cmp esi, ecx
jb 0x408647
mov eax, dword [esi]
test eax, eax
je 0x408640
call eax
mov ecx, dword [0x41402c]
sub esi, 4
cmp esi, ecx
jae 0x408632
push 0x410040
push 0x410038
call fcn.00408690
add esp, 8
push 0x41004c
push 0x410044
call fcn.00408690
add esp, 8
test ebx, ebx
jne 0x408680
push ebp
mov dword [0x412b44], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x409e20
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x412c60]
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 0x409e62
call edi
mov esi, eax
test esi, esi
je 0x409e4c
mov eax, 1
jmp 0x409e5d
call ebp
mov ebx, eax
test ebx, ebx
je 0x409f6f
mov eax, 2
mov dword [0x412c60], eax
cmp eax, 1
jne 0x409f02
test esi, esi
jne 0x409e7b
call edi
mov esi, eax
test esi, esi
je 0x409f6f
cmp word [esi], 0
mov eax, esi
je 0x409e95
add eax, 2
cmp word [eax], 0
jne 0x409e83
add eax, 2
cmp word [eax], 0
jne 0x409e83
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 0x409ef4
push edi
call fcn.00408320
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x409ef4
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 0x409ee6
push ebx
call fcn.004074b0
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 0x409f6f
test ebx, ebx
jne 0x409f13
call ebp
mov ebx, eax
test ebx, ebx
je 0x409f6f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x409f2b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409f1b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409f1b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00408320
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x409f4d
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 0x40a7d0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x4103e8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40a7f4
add eax, 8
inc ebp
cmp eax, 0x410478
jb 0x40a7e5
cmp ecx, dword [ebp*8 + 0x4103e8]
jne 0x40a99b
mov eax, dword [0x412acc]
cmp eax, 1
je 0x40a95d
test eax, eax
jne 0x40a820
cmp dword [0x410214], 1
je 0x40a95d
cmp ecx, 0xfc
je 0x40a99b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40a85b
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 0x40a8a4
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 0x40e588
add ebx, ecx
push ebx
call fcn.0040c370
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, 0x40e568
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 + 0x4103ec]
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.0040c2e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x413f20]
test eax, eax
je 0x40a96e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40a978
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x4103ec]
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
Function at 0x40b900
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x414020]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40baad
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x413f20]
lea edi, [ecx*4 + 0x413f20]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40baad
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40b96e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x40b97f
push 2
push ebp
push eax
call fcn.0040c640
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40bade
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40ba29
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40b9da
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40b9c7
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 0x40b9aa
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 0x40bacf
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40ba25
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40b9a6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ba9e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40ba72
cmp eax, 5
jne 0x40ba5b
mov dword [0x412b00], eax
mov dword [0x412afc], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.0040b5d0
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 0x40ba92
cmp byte [ebp], 0x1a
jne 0x40ba92
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x412afc], 0x1c
jmp 0x40bab7
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x412afc], 9
pop edi
pop esi
pop ebp
mov dword [0x412b00], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40ba25
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 0x40bb0f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40ba29
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40ba29