joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45ec30
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4a0738
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x30]
push esi
mov ebx, ecx
push edi
mov esi, dword [ebp]
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
dec ecx
cmp eax, ecx
jge 0x45ec69
inc eax
mov dword [esi + 0x10], eax
jmp 0x45ed7c
mov eax, dword [ebx + 0x3c]
mov ecx, dword [esi + 8]
cmp ecx, eax
jne 0x45ec7d
mov eax, 0xffffffc7
jmp 0x45ed7e
mov esi, dword [esi]
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
cmp edx, ecx
jl 0x45ec8e
cmp dword [esi + 8], eax
jne 0x45ec7d
cmp dword [esi + 8], eax
jne 0x45eca7
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
cmp eax, ecx
jl 0x45eca7
mov eax, 0xffffffc7
jmp 0x45ed7e
mov eax, dword [esi + 4]
xor edi, edi
cmp eax, edi
je 0x45ecbb
push eax
mov ecx, ebx
call fcn.0045e460
mov dword [esi + 4], edi
mov dword [ebp], esi
mov ecx, dword [esi + 0x10]
inc ecx
mov dword [esi + 0x10], ecx
lea ecx, [esp + 0x10]
call fcn.0042d950
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x3c]
test edi, edi
jne 0x45ecec
mov ecx, dword [ebx + 4]
mov edx, dword [ecx + 8]
lea ecx, [esp + 0x10]
push edx
call fcn.0042d970
mov edi, eax
mov eax, dword [esi + 8]
push edi
push eax
mov ecx, ebx
call fcn.0045dbd0
test eax, eax
mov dword [esp + 0x38], eax
je 0x45ed1f
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x10], 0x5c6d10
call fcn.0042db50
mov eax, dword [esp + 0x38]
jmp 0x45ed7e
mov ecx, dword [esi + 0x10]
push ecx
push edi
mov ecx, ebx
call fcn.0045ea90
mov dl, byte [edi]
and dl, 1
cmp dl, 1
jne 0x45ed63
mov ecx, dword [esp + 0x34]
push ebp
push ecx
push edi
push eax
mov ecx, ebx
call fcn.0045eab0
mov esi, eax
test esi, esi
jne 0x45ed93
mov edx, dword [ebp]
push eax
push edi
mov ecx, ebx
mov dword [edx + 0x10], eax
call fcn.0045ea90
mov cl, byte [edi]
and cl, 1
cmp cl, 1
je 0x45ed35
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x10], 0x5c6d10
call fcn.0042db50
xor eax, eax
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 0xc
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x10], 0x5c6d10
call fcn.0042db50
mov eax, esi
jmp 0x45ed7e

Function at 0x461ec0
Capabilities:
Create thread

Disassembly:
push ecx
cmp dword [ecx + 0xcc], 1
je 0x461f20
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x461f20
mov eax, dword [ecx + 0xb0]
test eax, eax
je 0x461f20
push esi
mov edx, 5
mov esi, dword [ecx + 0xbc]
cmp esi, edx
pop esi
je 0x461f20
mov dword [ecx + 0xb4], eax
mov dword [ecx + 0x94], 0
mov dword [ecx + 0xbc], edx
lea eax, [esp]
push eax
push 0
push ecx
push 0x461f60
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
ret
Function at 0x4680b0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4a0d68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
lea eax, [esp + 0xc]
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
push 0
lea ecx, [esp + 0x20]
call fcn.00497929
mov eax, dword [esi + 0xd0]
lea edx, [esp + 0x1c]
push eax
push eax
push edx
mov dword [esp + 0x44], 0
call fcn.00467a50
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
add eax, 0x64
add esp, 0xc
add ecx, 0x64
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov dword [esp + 4], ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00497857
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
push 1
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 1]
xor edx, edx
test eax, eax
setl dl
dec edx
mov ecx, esi
and eax, edx
push eax
push 0
push 0
call fcn.00494041
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 4
mov eax, edx
push 1
shr eax, 0x1f
lea eax, [edx + eax + 1]
test eax, eax
setl cl
dec ecx
and eax, ecx
mov ecx, esi
push eax
push 0
push 1
call fcn.00494041
push 1
push 0
push 0
mov ecx, esi
call fcn.00493fe9
push 1
push 0
push 1
mov ecx, esi
call fcn.00493fe9
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.0049799b
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x468230
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4a0d88
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x20]
call fcn.00497929
push 0x3e8
lea eax, [esp + 0x20]
push 0x3e8
push eax
mov dword [esp + 0x44], 0
call fcn.00467a50
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
add ecx, 0x64
add esp, 0xc
mov dword [esp + 4], ecx
lea ecx, [esp + 4]
add eax, 0x96
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], eax
call fcn.00497857
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 4]
cmp dword [esp + 0x44], 1
jne 0x4682f4
cmp dword [esp + 0x40], 1
jne 0x4682f2
cmp ecx, eax
jge 0x4682f4
mov eax, ecx
cmp eax, 0xc8
jge 0x468300
mov eax, 0xc8
mov ecx, esi
mov dword [esi + 0xd0], eax
call fcn.004680b0
mov ecx, dword [esi + 0x1c]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.0049799b
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 8
Function at 0x468a70
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4a0df3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0049245e
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.00497bd1
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.00499129
test eax, eax
je 0x468b8c
mov ecx, dword [esp + 0x3c]
call fcn.00497bfe
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x468b50
push edi
mov ecx, esi
call fcn.004951bc
mov ecx, esi
call fcn.00468cf0
cmp dword [esp + 0x38], 1
jne 0x468b85
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.00495326
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x46b5b0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x46b5e3
push esi
call fcn.0046e6c0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x46b5dc
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 0x46b669
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x46b652
mov eax, dword [esi + 8]
test eax, eax
je 0x46b607
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 0x46b64e
cmp eax, 2
je 0x46b652
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x46b5fa
cmp eax, 3
je 0x46b62d
cmp eax, 1
jne 0x46b5fa
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 0x46b5fa
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x46b5fa
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.0046b690
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x46b678
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.0046b690
add esp, 4
pop esi
ret

Function at 0x493254
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x49328c
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.004912e1
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004912b9
jmp 0x493298
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x494945
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 0x494987
call fcn.0049a630
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x494987
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x49497e
xor eax, eax
jmp 0x49498f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00494995
pop edi
pop esi
pop ebx
ret 4

Function at 0x49ab60
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 0x49ab8e
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x49abac
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0049aac6
jmp 0x49abac
mov eax, dword [esi + 0x14]
test eax, eax
je 0x49abac
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0049aac6
test edi, edi
mov eax, edi
jne 0x49ab96
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x403540
Capabilities:
Read .ini file

Disassembly:
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push edi
push 0x410940
push 1
push str.Mode
push str.Setup
call esi
xor edi, edi
push 0x410940
push edi
push 0x40c3c8
push str.Setup
mov dword [0x40c030], eax
mov dword [0x40c034], eax
call esi
push 0x410940
push edi
push 0x40c3b8
push str.Setup
mov dword [0x4108c4], eax
call esi
push 0x410940
push edi
push 0x40c3ac
push str.Setup
mov dword [0x4108cc], eax
call esi
push 0x410940
push edi
push 0x40c39c
push str.Setup
mov dword [0x4108c0], eax
call esi
mov ecx, dword [0x4108c0]
mov edx, dword [0x4108c4]
mov dword [0x4108c8], eax
push eax
mov eax, dword [0x4108cc]
push eax
push ecx
push edx
call fcn.004037a0
add esp, 0x10
test eax, eax
jne 0x403614
mov eax, dword [0x4108b0]
push 0x10
push 0x40c038
push str.Invalid_Margin_Values__
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [0x4108c8], edi
mov dword [0x4108c0], edi
mov dword [0x4108cc], edi
mov dword [0x4108c4], edi
mov ecx, dword [0x4108c4]
mov edx, dword [0x4108cc]
mov eax, dword [0x4108c0]
push 0x410940
mov dword [0x410ac4], ecx
mov ecx, dword [0x4108c8]
push 0x96
push str.Timer
push str.Setup
mov dword [0x410acc], edx
mov dword [0x410ac0], eax
mov dword [0x410ac8], ecx
call esi
pop edi
mov dword [0x40c054], eax
mov dword [0x410914], eax
pop esi
ret

Function at 0x405570
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x4055e1
push ebx
call fcn.004056a0
add esp, 4
test eax, eax
jne 0x4055af
mov dword [0x410520], 0xf
mov dword [0x41051c], 0xd
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4055f1
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x405687
inc eax
cmp eax, 0x104
ja 0x405687
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x405640
cmp eax, ecx
jg 0x40561d
mov eax, ecx
push eax
call fcn.004054a0
mov edx, eax
add esp, 4
test edx, edx
jne 0x40565a
mov dword [0x41051c], 0xc
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x40565a
mov dword [0x41051c], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret
Function at 0x4056a0
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x4056ae
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x4056dd
cmp eax, 1
je 0x4056dd
mov eax, 1
ret
xor eax, eax
ret

Function at 0x405ad0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x408368
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 [0x410534], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x410530], ecx
shl ecx, 8
add ecx, edx
mov dword [0x41052c], ecx
shr eax, 0x10
mov dword [0x410528], eax
call fcn.00405ca0
test eax, eax
jne 0x405b3a
push 0x1c
call fcn.00405c70
add esp, 4
mov dword [ebp - 4], 0
call fcn.00408070
call fcn.00408060
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x411c34], eax
call fcn.00407c30
mov dword [0x410504], eax
test eax, eax
je 0x405b6d
mov eax, dword [0x411c34]
test eax, eax
jne 0x405b77
push 0xffffffffffffffff
call fcn.00407150
add esp, 4
call fcn.00407980
call fcn.00407890
call fcn.00407120
mov esi, dword [0x411c34]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x405c56
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x405bbe
test al, al
je 0x405bbe
and eax, 0xff
push eax
call fcn.00407830
add esp, 4
test eax, eax
je 0x405b98
inc esi
mov dword [ebp - 0x64], esi
jmp 0x405b98
cmp byte [esi], 0x22
jne 0x405bc7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x405bd7
cmp al, 0x20
ja 0x405bd7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x405bc7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x405bf8
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x405bfd
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.00407150
jmp 0x405c3b
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 0x405bc7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x405c56
Function at 0x407190
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x410564]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x4071af
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 [0x410560], 1
mov byte [0x41055c], bl
jne 0x407209
mov ecx, dword [0x411c28]
test ecx, ecx
je 0x4071f7
mov esi, dword [0x411c24]
sub esi, 4
cmp esi, ecx
jb 0x4071f7
mov eax, dword [esi]
test eax, eax
je 0x4071f0
call eax
mov ecx, dword [0x411c28]
sub esi, 4
cmp esi, ecx
jae 0x4071e2
push 0x40c01c
push 0x40c014
call fcn.00407240
add esp, 8
push 0x40c024
push 0x40c020
call fcn.00407240
add esp, 8
test ebx, ebx
jne 0x407230
push ebp
mov dword [0x410564], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x407c30
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4106a0]
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 0x407c72
call edi
mov esi, eax
test esi, esi
je 0x407c5c
mov eax, 1
jmp 0x407c6d
call ebp
mov ebx, eax
test ebx, ebx
je 0x407d7f
mov eax, 2
mov dword [0x4106a0], eax
cmp eax, 1
jne 0x407d12
test esi, esi
jne 0x407c8b
call edi
mov esi, eax
test esi, esi
je 0x407d7f
cmp word [esi], 0
mov eax, esi
je 0x407ca5
add eax, 2
cmp word [eax], 0
jne 0x407c93
add eax, 2
cmp word [eax], 0
jne 0x407c93
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 0x407d04
push edi
call fcn.004054a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x407d04
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 0x407cf6
push ebx
call fcn.00405330
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 0x407d7f
test ebx, ebx
jne 0x407d23
call ebp
mov ebx, eax
test ebx, ebx
je 0x407d7f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x407d3b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x407d2b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x407d2b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004054a0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x407d5d
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 0x408480
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40fed8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x4084a4
add eax, 8
inc ebp
cmp eax, 0x40ff68
jb 0x408495
cmp ecx, dword [ebp*8 + 0x40fed8]
jne 0x40864b
mov eax, dword [0x41050c]
cmp eax, 1
je 0x40860d
test eax, eax
jne 0x4084d0
cmp dword [0x40dd04], 1
je 0x40860d
cmp ecx, 0xfc
je 0x40864b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40850b
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 0x408554
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 0x40b360
add ebx, ecx
push ebx
call fcn.00409300
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, 0x40b340
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 + 0x40fedc]
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.00409800
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x411b20]
test eax, eax
je 0x40861e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x408628
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40fedc]
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