joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bcd0
Capabilities:
Get proxy
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x248
mov eax, dword [0x41f608]
push esi
push edi
mov dword [esp + 0x24c], eax
xor eax, eax
mov byte [esp + 0x18], 0
mov ecx, 0x4a
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x14], 4
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x10]
push eax
push 1
push 0
lea ecx, [esp + 0x24]
push ecx
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40be0d
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push 0
push str.ProxyEnable
push ecx
call esi
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
mov edi, eax
lea eax, [esp + 0x14c]
push eax
push 0
push 0
push str.ProxyServer
push ecx
mov dword [esp + 0x24], pe_nt_image_headers32
call esi
mov edx, dword [esp + 0x10]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x40be0d
test esi, esi
jne 0x40be0d
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40be0d
lea eax, [esp + 0x148]
push 0x418d40
push eax
call fcn.0040f130
mov esi, eax
add esp, 8
test esi, esi
je 0x40bdcb
add esi, 5
jmp 0x40bdd2
lea esi, [esp + 0x148]
push 0x3a
push esi
call fcn.0040f070
mov edi, dword [ebp + 8]
add esp, 8
mov byte [eax], 0
mov ecx, esi
sub edi, esi
mov dl, byte [ecx]
mov byte [edi + ecx], dl
inc ecx
test dl, dl
jne 0x40bde7
inc eax
push eax
call fcn.0040e9ea
add esp, 4
mov ecx, dword [esp + 0x24c]
call fcn.0040e486
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x24c]
or eax, 0xffffffff
call fcn.0040e486
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40be30
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [0x41f608]
push ebx
push esi
push edi
mov dword [esp + 0x274], eax
xor eax, eax
mov byte [esp + 0x38], 0
mov ecx, 0x40
lea edi, [esp + 0x39]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x28]
push ecx
xor esi, esi
push esi
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x60]
push eax
push 0x80000003
mov dword [esp + 0x40], 0x104
mov dword [esp + 0x3c], esi
or edi, 0xffffffff
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [esp + 0xc]
cmp eax, esi
je 0x40bf0f
jbe 0x40bf0f
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
nop
lea ecx, [esp + 0x28]
push ecx
push 0
push 0
push 0
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x154]
push eax
push esi
push 0x80000003
mov dword [esp + 0x34], 0x12c
call ebx
test eax, eax
jne 0x40bf06
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x140]
push ecx
push edx
call fcn.0040bcd0
mov edi, eax
add esp, 8
test edi, edi
jg 0x40bf0f
mov eax, dword [esp + 0xc]
inc esi
cmp esi, eax
jb 0x40bec0
mov ecx, dword [esp + 0x274]
mov eax, edi
call fcn.0040e486
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c3b0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 8
push esi
mov esi, ecx
mov al, byte [esi + 0x38]
mov ecx, dword [esi + 0x34]
test al, al
push edi
mov eax, 0x10
je 0x40c4cc
cmp ecx, eax
jb 0x40c3d3
mov ecx, dword [esi + 0x20]
jmp 0x40c3d6
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], eax
jb 0x40c3e0
mov eax, dword [esi + 4]
jmp 0x40c3e3
lea eax, [esi + 4]
mov edi, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x18]
push ecx
push eax
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
push ebp
call fcn.0040e494
mov eax, edi
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c402
mov ecx, dword [esi + 0x30]
sub eax, edx
add ecx, dword [esi + 0x14]
push ebx
lea ebx, [ecx + eax + 0x3c]
cmp dword [esi + 0x34], 0x10
mov dword [esp + 0x14], ebx
jb 0x40c425
mov esi, dword [esi + 0x20]
jmp 0x40c428
add esi, 0x20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor esi, esi
cmp edi, esi
je 0x40c520
cmp edi, 0xffffffff
je 0x40c520
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
lea edx, [esp + 0x28]
push edx
push 0x400
add ebx, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x38], esi
call ebp
test eax, eax
je 0x40c4a8
mov eax, dword [esp + 0x24]
test eax, eax
jbe 0x40c4a8
cmp esi, dword [esp + 0x10]
ja 0x40c4a8
push 0
add esi, eax
lea eax, [esp + 0x28]
push eax
push 0x400
lea ecx, [esi + ebx]
push ecx
push edi
call ebp
test eax, eax
jne 0x40c481
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
add esi, edx
push edi
mov word [esi + eax], 0xa0d
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop ebp
pop edi
lea eax, [esi + 2]
pop esi
add esp, 8
ret 0xc
cmp ecx, eax
jb 0x40c4d5
mov ecx, dword [esi + 0x20]
jmp 0x40c4d8
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], eax
jb 0x40c4e2
mov eax, dword [esi + 4]
jmp 0x40c4e5
lea eax, [esi + 4]
mov edi, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
push eax
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
push ecx
call fcn.0040e494
mov eax, edi
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c503
mov ecx, dword [esi + 0x14]
sub eax, edx
mov edx, dword [esi + 0x30]
add edx, ecx
pop edi
lea eax, [edx + eax + 0x31]
pop esi
add esp, 8
ret 0xc
mov eax, ebx
pop ebx
pop ebp
pop edi
pop esi
add esp, 8
ret 0xc
Function at 0x40c5b0
Capabilities:
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4176f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [ecx + 0xc]
push ebx
xor edx, edx
cmp eax, edx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 4], edx
jne 0x40c5f8
push 0x41a5ec
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], str.connection_failed...
call fcn.0040ed3b
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
push edx
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40c658
push 0x41a5ec
lea edx, [ebp - 0x20]
push edx
mov dword [ebp - 0x20], str.response_failed...
call fcn.0040ed3b
mov esi, dword [ebp - 0x14]
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 0xc], 0
mov eax, 0x40c658
ret
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x40c920
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [ecx + 0x90]
xor edx, edx
test eax, eax
mov dword [esp + 4], ecx
mov dword [esp], edx
jbe 0x40c9c8
mov eax, dword [ecx + 0x8c]
push ebx
mov ebx, dword [eax]
cmp ebx, eax
je 0x40c9c1
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push edi
mov eax, dword [ebx + 8]
cmp byte [eax + 0x38], 0
je 0x40c9a0
cmp dword [eax + 0x34], 0x10
jb 0x40c964
mov eax, dword [eax + 0x20]
jmp 0x40c967
add eax, 0x20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call ebp
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push edi
add esi, 0x1800
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
jmp 0x40c9a5
mov esi, 0x2000
mov ebx, dword [ebx]
mov eax, dword [ecx + 0x8c]
add edx, esi
cmp ebx, eax
mov dword [esp + 0x10], edx
jne 0x40c950
pop edi
pop esi
pop ebp
mov eax, edx
pop ebx
add esp, 8
ret
mov eax, edx
pop ebx
add esp, 8
ret
mov eax, edx
add esp, 8
ret
Function at 0x40f470
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x419040
call fcn.00410fb0
mov edi, 0x94
mov eax, edi
call fcn.0040ee00
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x421090], ecx
mov eax, dword [esi + 4]
mov dword [0x42109c], eax
mov edx, dword [esi + 8]
mov dword [0x4210a0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x421094], esi
cmp ecx, 2
je 0x40f4d0
or esi, 0x8000
mov dword [0x421094], esi
shl eax, 8
add eax, edx
mov dword [0x421098], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40f50b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40f50b
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40f523
cmp eax, 0x20b
je 0x40f510
mov dword [ebp - 0x1c], esi
jmp 0x40f537
cmp dword [ecx + 0x84], 0xe
jbe 0x40f50b
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40f531
cmp dword [ecx + 0x74], 0xe
jbe 0x40f50b
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0041020c
pop ecx
test eax, eax
jne 0x40f563
cmp dword [0x421080], 1
jne 0x40f550
call fcn.0041383e
push 0x1c
call fcn.004136c7
push 0xff
call fcn.0040ffe5
pop ecx
pop ecx
call fcn.00413fe7
mov dword [ebp - 4], esi
call fcn.00413e3c
test eax, eax
jge 0x40f57c
push 0x1b
call fcn.0040f44b
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4226b8], eax
call fcn.00413d1a
mov dword [0x421078], eax
call fcn.00413c78
test eax, eax
jge 0x40f5a2
push 8
call fcn.0040f44b
pop ecx
call fcn.00413a45
test eax, eax
jge 0x40f5b3
push 9
call fcn.0040f44b
pop ecx
push 1
call fcn.00410015
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40f5c9
push eax
call fcn.0040f44b
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004139e8
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40f5ea
movzx eax, word [ebp - 0x40]
jmp 0x40f5ed
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00402900
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40f60b
push edi
call fcn.00410140
call fcn.00410162
jmp 0x40f63d
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00410feb
ret
Function at 0x40f94e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x421540]
mov eax, dword [0x41f608]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40fb14
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x421560]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x40fb14
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40f9b8
xor eax, eax
jmp 0x40fb28
test al, 0x20
je 0x40f9c9
push 2
push edi
push edi
push ecx
call fcn.004143e6
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40fa9e
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40fae5
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40fa2b
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40fa1c
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40f9fe
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40fa6b
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40fa77
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40f9f2
jmp 0x40fa79
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40fb0f
cmp dword [ebp + 0x3a4], edi
je 0x40fae5
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40fad7
mov dword [0x421088], eax
jmp 0x40fb1b
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40fac9
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x40fa79
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x40fa79
push dword [ebp + 0x3a4]
call fcn.0041406f
pop ecx
jmp 0x40fb25
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40fafd
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40f9b1
mov dword [0x421084], 0x1c
mov dword [0x421088], edi
jmp 0x40fb25
sub eax, dword [ebp - 0x7c]
jmp 0x40fb28
and dword [0x421088], 0
mov dword [0x421084], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040e486
add ebp, 0x39c
leave
ret
Function at 0x41007f
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4210d0], esi
push edi
jne 0x41009f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x4210cc], esi
mov byte [0x4210c8], al
jne 0x410105
mov ecx, dword [0x4226b0]
test ecx, ecx
je 0x4100e6
mov eax, dword [0x4226ac]
sub eax, 4
cmp eax, ecx
jmp 0x4100df
mov eax, dword [eax]
test eax, eax
je 0x4100d1
call eax
mov eax, dword [0x4226ac]
sub eax, 4
cmp eax, dword [0x4226b0]
mov dword [0x4226ac], eax
jae 0x4100c9
mov eax, 0x41c024
mov esi, 0x41c02c
cmp eax, esi
mov edi, eax
jae 0x410105
mov eax, dword [edi]
test eax, eax
je 0x4100fe
call eax
add edi, 4
cmp edi, esi
jb 0x4100f6
mov eax, 0x41c030
mov esi, 0x41c038
cmp eax, esi
mov edi, eax
jae 0x410124
mov eax, dword [edi]
test eax, eax
je 0x41011d
call eax
add edi, 4
cmp edi, esi
jb 0x410115
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x41013e
push dword [ebp + 8]
mov dword [0x4210d0], 1
call fcn.0040ffe5
pop ebp
ret
Function at 0x4123e8
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x412416
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x41241d
cmp ebx, dword [eax + 4]
jae 0x41241d
xor eax, eax
jmp 0x41260d
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x41242e
xor eax, eax
inc eax
jmp 0x41260c
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x412444
cmp ecx, edx
jae 0x412589
cmp dword [eax + 4], 0
je 0x41244d
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x412435
cmp dword [ebp + 8], 0
je 0x41246f
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x412589
cmp eax, esi
jae 0x412589
mov eax, dword [0x4210f8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x412494
cmp dword [esi*4 + 0x421100], edi
je 0x41258d
inc esi
cmp esi, eax
jl 0x412482
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x412609
cmp dword [ebp - 8], 0x1000000
jne 0x412609
test byte [ebp - 0xc], 0xcc
je 0x412512
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x412609
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x412609
cmp word [eax + 0x18], 0x10b
jne 0x412609
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x412609
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x412512
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x412512
test byte [ecx + 0x27], 0x80
jne 0x412589
push 1
push 0x421140
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x412426
mov ecx, dword [0x4210f8]
test ecx, ecx
mov edx, ecx
jle 0x412546
lea eax, [ecx*4 + 0x4210fc]
cmp dword [eax], edi
je 0x412546
dec edx
sub eax, 4
test edx, edx
jg 0x41253a
test edx, edx
jne 0x412577
push 0xf
pop ebx
cmp ecx, ebx
jg 0x412553
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x41256b
lea eax, [edx*4 + 0x421100]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x412559
cmp ecx, 0x10
jge 0x412577
inc ecx
mov dword [0x4210f8], ecx
push 0
push 0x421140
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x412426
xor eax, eax
jmp 0x41260c
test esi, esi
jle 0x412426
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x421140
call ebx
test eax, eax
jne 0x412426
cmp dword [esi*4 + 0x421100], edi
je 0x4125e3
mov eax, dword [0x4210f8]
lea esi, [eax - 1]
test esi, esi
jl 0x4125d1
cmp dword [esi*4 + 0x421100], edi
je 0x4125cd
dec esi
jns 0x4125c1
test esi, esi
jge 0x4125e1
cmp eax, 0x10
jge 0x4125dc
inc eax
mov dword [0x4210f8], eax
lea esi, [eax - 1]
jmp 0x4125e3
je 0x4125fb
xor ecx, ecx
test esi, esi
jl 0x4125fb
lea eax, [ecx*4 + 0x421100]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4125e9
push 0
push 0x421140
call ebx
jmp 0x412426
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4136c7
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x41f608]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x41f948]
je 0x4136fc
inc eax
cmp eax, 0x13
jb 0x4136ed
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41f948]
jne 0x413822
mov eax, dword [0x421080]
cmp eax, 1
je 0x4137fa
cmp eax, edx
jne 0x41372c
cmp dword [0x41f670], 1
je 0x4137fa
cmp ecx, 0xfc
je 0x413822
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x413762
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004130e0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004131e0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x413796
mov eax, edi
push eax
call fcn.004131e0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4190a0
push edi
call fcn.0040f1c0
add esp, 0x10
push edi
call fcn.004131e0
push dword [esi + 0x41f94c]
mov ebx, eax
call fcn.004131e0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040ee00
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004130e0
push edi
push ebx
call fcn.004130f0
push 0x41909c
push ebx
call fcn.004130f0
push dword [esi + 0x41f94c]
push ebx
call fcn.004130f0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00414811
add esp, 0x2c
jmp 0x413822
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x41f94c]
push dword [esi]
call fcn.004131e0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040e486
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x414811
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x421278], ebx
push esi
push edi
jne 0x414891
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4148cc
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x421278], eax
je 0x4148cc
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x42127c], eax
call esi
cmp dword [0x421090], 2
mov dword [0x421280], eax
jne 0x414891
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x421288], eax
je 0x414891
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x421284], eax
mov eax, dword [0x421284]
test eax, eax
je 0x4148d6
call eax
test eax, eax
je 0x4148bd
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x421288]
test eax, eax
je 0x4148bd
test byte [ebp - 8], 1
jne 0x4148d6
cmp dword [0x42109c], 4
jb 0x4148d0
or byte [ebp + 0x12], 0x20
jmp 0x4148f5
xor eax, eax
jmp 0x414905
or byte [ebp + 0x12], 4
jmp 0x4148f5
mov eax, dword [0x42127c]
test eax, eax
je 0x4148f5
call eax
mov ebx, eax
test ebx, ebx
je 0x4148f5
mov eax, dword [0x421280]
test eax, eax
je 0x4148f5
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x421278]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4159b7
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.0040ee00
mov eax, dword [0x41f608]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x421540]
mov dword [ebp - 4], eax
jae 0x415afa
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x421560]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x415afa
push 1
push esi
push ebx
call fcn.004142ef
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x415b04
push 2
push esi
push ebx
call fcn.004142ef
add esp, 0xc
cmp eax, 0xffffffff
je 0x415b04
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x415aa4
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00410da0
push 0x8000
push ebx
call fcn.0041709a
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x415a63
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.0040f94e
add esp, 0xc
cmp eax, 0xffffffff
je 0x415a81
sub edi, eax
test edi, edi
jg 0x415a58
jmp 0x415a97
cmp dword [0x421088], 5
jne 0x415a94
mov dword [0x421084], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0041709a
pop ecx
pop ecx
jmp 0x415ae4
jge 0x415ae4
push 0
push dword [ebp + 0xc]
push ebx
call fcn.004142ef
push ebx
call fcn.0041425c
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x415ae4
mov dword [0x421084], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x421088], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.004142ef
add esp, 0xc
mov eax, esi
pop edi
jmp 0x415b07
mov dword [0x421084], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0040e486
leave
ret