joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4042e0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, dword [esp + 8]
cmp word [ebp], 0x5a4d
je 0x4042f1
xor eax, eax
pop ebp
ret
push ebx
mov ebx, dword [ebp + 0x3c]
add ebx, ebp
cmp dword [ebx], 0x4550
je 0x404304
pop ebx
xor eax, eax
pop ebp
ret
mov eax, dword [ebx + 0x50]
mov ecx, dword [ebx + 0x34]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
push 4
push 0x2000
push eax
push ecx
call esi
mov edi, eax
test edi, edi
jne 0x40433b
mov edx, dword [ebx + 0x50]
push 4
push 0x2000
push edx
push eax
call esi
mov edi, eax
test edi, edi
je 0x4043ee
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
xor eax, eax
push 4
mov dword [esi + 4], edi
mov dword [esi + 0xc], eax
mov dword [esi + 8], eax
mov dword [esi + 0x10], eax
mov eax, dword [ebx + 0x50]
push 0x1000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebx + 0x54]
push 4
push 0x1000
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [ebx + 0x54]
add edx, dword [ebp + 0x3c]
mov dword [esp + 0x14], eax
push edx
push ebp
push eax
call fcn.0040e3f0
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x20]
push esi
add eax, ecx
push ebx
mov dword [esi], eax
push ebp
mov dword [eax + 0x34], edi
call fcn.00403f70
mov eax, edi
add esp, 0x18
sub eax, dword [ebx + 0x34]
je 0x4043bd
push eax
mov eax, esi
call fcn.004040e0
add esp, 4
mov ecx, esi
call fcn.00404160
test eax, eax
je 0x4043e9
push esi
call fcn.00404020
mov edx, dword [esi]
mov eax, dword [edx + 0x28]
add esp, 4
test eax, eax
je 0x4043fc
add eax, edi
je 0x4043e9
push 0
push 1
push edi
call eax
test eax, eax
jne 0x4043f5
call fcn.004044b0
pop edi
pop esi
pop ebx
xor eax, eax
pop ebp
ret
mov dword [esi + 0x10], 1
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret

Function at 0x404540
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push esi
mov esi, dword [ebx + 8]
push edi
xor edi, edi
cmp esi, edi
je 0x404559
call fcn.004044b0
mov dword [ebx + 8], edi
mov eax, dword [ebx + 4]
cmp eax, edi
je 0x40456c
push eax
call fcn.0040ac99
add esp, 4
mov dword [ebx + 4], edi
mov dword [ebx], edi
mov edi, dword [ebp + 8]
mov esi, ebx
call fcn.004045e0
test eax, eax
je 0x4045c1
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call fcn.00404670
mov edi, eax
test edi, edi
je 0x4045c1
mov esi, dword [ebx]
mov edx, dword [ebx + 4]
xor ecx, ecx
test esi, esi
jbe 0x4045b2
lea ebx, [ebx]
mov eax, ecx
and eax, 0xf
mov al, byte [eax + edi]
xor byte [ecx + edx], al
add ecx, 1
cmp ecx, esi
jb 0x4045a0
mov ecx, dword [ebx + 4]
push ecx
call fcn.004042e0
add esp, 4
mov dword [ebx + 8], eax
xor eax, eax
cmp dword [ebx + 8], eax
pop edi
setne al
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4045e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x38
push ebx
xor ebx, ebx
cmp dword [esi + 4], ebx
je 0x4045f2
xor eax, eax
pop ebx
add esp, 0x38
ret
lea eax, [esp + 8]
push eax
push edi
call fcn.0040b913
mov ecx, dword [esp + 0x24]
push 0x421050
lea edx, [esp + 0x10]
push edi
push edx
mov dword [esi], ecx
mov dword [esp + 0x18], ebx
call fcn.0040bdd8
add esp, 0x14
test eax, eax
jne 0x40465b
cmp dword [esp + 4], ebx
je 0x40465b
mov eax, dword [esi]
push eax
call fcn.0040ac94
add esp, 4
cmp eax, ebx
mov dword [esi + 4], eax
je 0x40464e
mov ecx, dword [esp + 4]
mov edx, dword [esi]
push ecx
push 1
push edx
push eax
call fcn.0040c0c4
add esp, 0x10
mov ebx, 1
mov eax, dword [esp + 4]
push eax
call fcn.0040c151
add esp, 4
mov eax, ebx
pop ebx
add esp, 0x38
ret

Function at 0x404670
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x5c
xor eax, eax
push ebx
push ebp
mov dword [0x42b82c], eax
mov dword [0x42b830], eax
mov dword [0x42b834], eax
mov dword [0x42b838], eax
mov eax, 1
push esi
xor esi, esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x10]
push edi
push eax
xor ebp, ebp
mov dword [esp + 0x2c], 0x6a
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
call fcn.0040b7cd
add esp, 4
push esi
mov ebx, eax
mov edi, edx
call fcn.0040b7da
add esp, 4
cmp edx, edi
jl 0x40478f
jg 0x4046ea
cmp eax, ebx
jbe 0x40478f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 5
div ecx
test edx, edx
jne 0x40478f
mov ebx, dword [esp + 0x74]
lea edx, [esp + 0x38]
push edx
push ebx
call fcn.0040b913
mov edi, dword [esp + 0x54]
push 0x421050
lea eax, [esp + 0x80]
push ebx
push eax
mov dword [esp + 0x88], esi
call fcn.0040bdd8
add esp, 0x14
test eax, eax
jne 0x404783
cmp dword [esp + 0x74], esi
je 0x404783
push edi
call fcn.0040ac94
mov ebx, eax
add esp, 4
cmp ebx, esi
je 0x404772
mov ecx, dword [esp + 0x74]
push ecx
push 1
push edi
push ebx
call fcn.0040c0c4
push edi
push ebx
mov edi, 0x42b82c
call fcn.00401880
push ebx
mov ebp, 1
call fcn.0040ac99
add esp, 0x1c
mov edx, dword [esp + 0x74]
push edx
call fcn.0040c151
add esp, 4
cmp ebp, esi
jne 0x4047d8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 8
mov eax, dword [esp + 0x70]
push 0x421050
push eax
lea ecx, [esp + 0x7c]
push ecx
mov dword [esp + 0x80], esi
call fcn.0040bdd8
add esp, 0xc
test eax, eax
jne 0x404783
mov eax, dword [esp + 0x74]
cmp eax, esi
je 0x404783
push eax
push 1
push 0x10
push 0x42b82c
call fcn.0040c0c4
mov edx, dword [esp + 0x84]
push edx
call fcn.0040c151
add esp, 0x14
pop edi
pop esi
pop ebp
mov eax, 0x42b82c
pop ebx
add esp, 0x5c
ret 8
Function at 0x4047f0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push esi
call edi
test eax, eax
jne 0x40480e
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push esi
call edi
test eax, eax
je 0x404807
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x404807
push 0x30
lea eax, [esp + 0xc]
push 0
push eax
call fcn.0040dae0
lea ecx, [esp + 0x14]
push ecx
push esi
call fcn.0040b913
mov eax, dword [esp + 0x30]
add esp, 0x14
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x404be0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x41e59b
mov eax, dword fs:[0]
push eax
sub esp, 0x210
mov eax, dword [0x426050]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
push ebp
push edi
mov eax, dword [0x426050]
xor eax, esp
push eax
lea eax, [esp + 0x220]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x230]
mov eax, 1
mov dword [esp + 0x10], 0
test byte [0x42b810], al
jne 0x404c60
or dword [0x42b810], eax
mov eax, dword [0x42abd4]
mov edx, dword [eax + 0xc]
mov ecx, 0x42abd4
call edx
add eax, 0x10
push 0x41e950
mov dword [0x42b814], eax
call fcn.0040cb7b
add esp, 4
mov eax, dword [0x42b814]
cmp dword [eax - 0xc], 0
jne 0x404d21
push 0x206
lea ecx, [esp + 0x1a]
push 0
push ecx
mov word [esp + 0x20], 0
call fcn.0040dae0
add esp, 0xc
lea edx, [esp + 0x14]
push edx
push 0
push 0
push 0x801a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x404cd8
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [esp + 0x14]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404cb6
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x14]
mov ebx, eax
push ecx
mov eax, 0x42b814
call fcn.00402690
jmp 0x404d21
lea ebx, [esp + 0x10]
call fcn.00404b60
mov edi, 0x42b814
mov dword [esp + 0x228], 0
call fcn.004069d0
mov dword [esp + 0x228], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404d21
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [0x42b814]
add eax, 0xfffffff0
call fcn.00402800
add eax, 0x10
mov dword [ebp], eax
mov eax, ebp
mov ecx, dword [esp + 0x220]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0040ac69
add esp, 0x21c
ret
Function at 0x404ef0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
push esi
lea eax, [esp + 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.SoftwareWizissoftCyberArticle
push SysReAllocString
mov dword [esp + 0x1c], 0x400
mov dword [esp + 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404f5b
mov edx, dword [esp + 0x14]
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
push edx
lea eax, [esp + 0x14]
push eax
push esi
push 0x421080
push ecx
mov dword [esp + 0x24], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x404f50
lea esi, [eax + 1]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0xc
ret

Function at 0x404ff0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push ebx
push esi
push edi
mov esi, eax
call fcn.004047f0
mov edi, eax
cmp edi, 3
ja 0x405010
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 8
ret
push 0x421050
lea eax, [esp + 0x14]
push esi
xor ebx, ebx
push eax
mov dword [esp + 0x1c], ebx
call fcn.0040bdd8
add esp, 0xc
test eax, eax
jne 0x405097
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x405097
push eax
push 1
lea ecx, [esp + 0x14]
push 3
push ecx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], bl
mov byte [esp + 0x1e], bl
call fcn.0040c0c4
mov dl, byte [esp + 0x1d]
mov cl, byte [esp + 0x1c]
add esp, 0x10
cmp edi, 2
jb 0x40506e
cmp cl, 0xff
jne 0x40506e
cmp dl, 0xfe
jne 0x40506e
mov al, 1
jmp 0x405081
xor al, al
cmp cl, 0xef
jne 0x405081
cmp dl, 0xbb
jne 0x405081
cmp byte [esp + 0xe], 0xbf
je 0x40508a
cmp al, bl
jne 0x40508a
mov ebx, 1
mov edx, dword [esp + 0x10]
push edx
call fcn.0040c151
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 8
ret
Function at 0x4050a0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x41e689
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x426050]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov edi, dword [esp + 0x2c]
xor ebx, ebx
mov dword [esp + 0x24], ebx
mov esi, edi
mov dword [esp + 0x14], ebx
call fcn.00404f70
mov dword [esp + 0x24], ebx
mov eax, dword [edi]
cmp dword [eax - 0xc], ebx
mov dword [esp + 0x14], 1
jne 0x405201
call fcn.00402c80
cmp eax, 9
jne 0x405180
lea ebx, [esp + 0x10]
call fcn.00404d60
mov dword [esp + 0x24], 1
mov esi, dword [esp + 0x10]
cmp dword [esi - 0xc], 0
je 0x40515f
mov ecx, ebx
push ecx
lea edx, [esp + 0x1c]
push edx
mov ebx, 0x421014
call fcn.00403440
add esp, 8
mov byte [esp + 0x24], 2
call fcn.004069d0
mov byte [esp + 0x24], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40515f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x24], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405180
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [edi]
cmp dword [ecx - 0xc], 0
jne 0x405201
lea edx, [esp + 0x10]
push edx
call fcn.00404be0
push eax
lea eax, [esp + 0x20]
push eax
mov ebx, 0x421014
mov dword [esp + 0x30], 3
call fcn.00403440
add esp, 0xc
mov byte [esp + 0x24], 4
call fcn.004069d0
mov byte [esp + 0x24], 3
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4051dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x24], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405201
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov eax, dword [edx - 0xc]
test eax, eax
je 0x40522a
lea ecx, [eax - 1]
test ecx, ecx
jl 0x405255
cmp ecx, eax
jg 0x405255
movzx eax, word [edx + ecx*2]
cmp ax, 0x2f
je 0x40522a
cmp ax, 0x5c
je 0x40522a
call fcn.00406a30
mov esi, dword [edi]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405240
push esi
call fcn.0040ad74
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x18
ret
push 0x80070057
call fcn.00402bc0
int3
Function at 0x407820
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41e540
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebp
push esi
push edi
mov eax, dword [0x426050]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov edi, ecx
mov esi, edx
lea eax, [esp + 0x14]
push eax
mov ecx, esi
call fcn.00407b00
push eax
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x30], 0
call fcn.00407200
add esp, 8
mov byte [esp + 0x28], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407891
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x18]
cmp dword [ebp - 0xc], 0
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
jne 0x4078d4
call fcn.00407b00
mov byte [esp + 0x28], 3
call fcn.00406dc0
push eax
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x18]
call fcn.00406fd0
add esp, 8
mov byte [esp + 0x28], 4
call fcn.004069d0
mov byte [esp + 0x28], 3
jmp 0x407900
call fcn.00407b00
lea edx, [esp + 0x10]
push edx
mov ecx, ebp
lea esi, [esp + 0x20]
mov byte [esp + 0x2c], 5
call fcn.004071e0
add esp, 4
mov byte [esp + 0x28], 6
call fcn.004069d0
mov byte [esp + 0x28], 5
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407920
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x28], 2
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407945
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x28], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407969
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x1c
ret
Function at 0x40a895
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x426050]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0040a7d4
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.0040dae0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x40a8e4
cmp dword [ebp - 0x1c], 5
jb 0x40a8fc
jmp 0x40a8f8
cmp dword [ebp - 0x10], 1
jne 0x40a8fc
cmp dword [ebp - 0x1c], 4
ja 0x40a8f8
jne 0x40a8fc
cmp dword [ebp - 0x18], 0
jbe 0x40a8fc
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x41f328
call fcn.0040a687
test eax, eax
jge 0x40a91d
mov byte [0x42b80c], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0040ac69
add ebp, 0x78
leave
ret

Function at 0x40ac69
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x426050]
jne 0x40ac73
repz ret
jmp fcn.0040de58
Function at 0x40be28
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x40be65
cmp dword [ebp + 0x14], edi
je 0x40be65
cmp ecx, edi
jne 0x40be6c
call fcn.0040e221
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.0040e1c2
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x40be80
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x40bea1
cmp ebx, 0xffffffff
je 0x40be90
push ebx
push edi
push ecx
call fcn.0040dae0
add esp, 0xc
cmp esi, edi
je 0x40be4d
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x40be4d
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x40bebd
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x40bec4
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x40bfb5
test word [esi + 0xc], 0x10c
je 0x40bf18
mov eax, dword [esi + 4]
test eax, eax
je 0x40bf18
jl 0x40c016
cmp ebx, eax
mov edi, ebx
jb 0x40bee9
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x40bfbd
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040ac9e
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x40bfad
cmp ebx, dword [ebp - 0xc]
jb 0x40bf85
cmp dword [ebp - 0xc], 0
je 0x40bf42
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x40bf37
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x40bf3e
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x40bf4d
mov eax, SysReAllocString
cmp ebx, eax
ja 0x40bf4d
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x40bfe9
push eax
push dword [ebp - 8]
push esi
call fcn.00411d09
pop ecx
push eax
call fcn.00411c0c
add esp, 0xc
test eax, eax
je 0x40c028
cmp eax, 0xffffffff
je 0x40c016
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x40bfad
push esi
call fcn.0041152b
cmp eax, 0xffffffff
pop ecx
je 0x40c01a
cmp dword [ebp - 4], 0
je 0x40bfe9
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x40becc
mov eax, dword [ebp + 0x14]
jmp 0x40be67
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x40bfd4
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.0040dae0
add esp, 0xc
call fcn.0040e221
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x40be5d
cmp dword [ebp + 0xc], 0xffffffff
je 0x40bfff
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.0040dae0
add esp, 0xc
call fcn.0040e221
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x40be5d
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x40be67
or dword [esi + 0xc], 0x10
jmp 0x40c01a
Function at 0x4139a1
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x426dd0]
je 0x4139bc
inc edi
cmp edi, 0x17
jb 0x4139ad
cmp edi, 0x17
jae 0x413b3c
push ebp
push 3
call fcn.004189e7
cmp eax, 1
pop ecx
je 0x413b08
push 3
call fcn.004189e7
test eax, eax
pop ecx
jne 0x4139f0
cmp dword [0x426040], 1
je 0x413b08
cmp ebx, 0xfc
je 0x413b3b
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x42b1e8
push ebp
call fcn.004153cb
add esp, 0xc
test eax, eax
je 0x413a26
push esi
push esi
push esi
push esi
push esi
call fcn.0040e0c6
add esp, 0x14
push 0x104
mov esi, 0x42b201
push esi
push 0
mov byte [0x42b305], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x413a6a
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004153cb
add esp, 0xc
test eax, eax
je 0x413a6a
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040e0c6
add esp, 0x14
push esi
call fcn.004143f0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x413aaf
push esi
call fcn.004143f0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x42b4fc
push 0x41faf4
sub ecx, eax
push ecx
push eax
call fcn.004165c2
add esp, 0x14
test eax, eax
je 0x413aaf
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0040e0c6
add esp, 0x14
jmp 0x413ab1
xor esi, esi
push 0x41faf0
push ebx
push ebp
call fcn.00417fcd
add esp, 0xc
test eax, eax
je 0x413ad1
push esi
push esi
push esi
push esi
push esi
call fcn.0040e0c6
add esp, 0x14
push dword [edi*8 + 0x426dd4]
push ebx
push ebp
call fcn.00417fcd
add esp, 0xc
test eax, eax
je 0x413af3
push esi
push esi
push esi
push esi
push esi
call fcn.0040e0c6
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.0041882a
add esp, 0xc
jmp 0x413b3b
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x413b3b
cmp ebp, 0xffffffff
je 0x413b3b
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x426dd4]
push dword [esi]
call fcn.004143f0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x41882a
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00412960
xor ebx, ebx
cmp dword [0x42b7d4], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x418900
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4189e0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4189e0
push eax
call fcn.004128f2
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x42b7d4], eax
call esi
push eax
call fcn.004128f2
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x42b7d8], eax
call esi
push eax
call fcn.004128f2
mov dword [0x42b7dc], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00413d50
test eax, eax
pop ecx
pop ecx
je 0x4188ce
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040e0c6
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x418900
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004128f2
cmp eax, ebx
pop ecx
mov dword [0x42b7e4], eax
je 0x418900
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004128f2
pop ecx
mov dword [0x42b7e0], eax
mov eax, dword [0x42b7e0]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x418985
cmp dword [0x42b7e4], ecx
je 0x418985
push eax
call fcn.00412969
push dword [0x42b7e4]
mov esi, eax
call fcn.00412969
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x418985
cmp edi, ebx
je 0x418985
call esi
cmp eax, ebx
je 0x418952
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x418952
test byte [ebp - 0x18], 1
jne 0x418985
lea eax, [ebp - 0x10]
push eax
call fcn.00413d87
test eax, eax
pop ecx
je 0x41896d
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040e0c6
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x41897c
or dword [ebp + 0x10], 0x200000
jmp 0x4189c0
or dword [ebp + 0x10], 0x40000
jmp 0x4189c0
mov eax, dword [0x42b7d8]
cmp eax, dword [ebp - 8]
je 0x4189c0
push eax
call fcn.00412969
cmp eax, ebx
pop ecx
je 0x4189c0
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4189c0
mov eax, dword [0x42b7dc]
cmp eax, dword [ebp - 8]
je 0x4189c0
push eax
call fcn.00412969
cmp eax, ebx
pop ecx
je 0x4189c0
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x42b7d4]
call fcn.00412969
cmp eax, ebx
pop ecx
je 0x4189e0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4189e2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret