joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002050
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0x24
mov dword [0x100659a0], 0x1fdd
mov dword [ebp - 8], 0
mov eax, dword fs:[0x30]
mov dword [ebp - 8], eax
xor ecx, ecx
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0x10]
mov edx, dword [edx + 0x3c]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], ecx
jmp 0x100020d7
mov eax, 0x1145
xor ecx, ecx
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
cmp word [edx + esi*2 - 0x14], 0x64
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
je 0x1000216f
jmp 0x100021f6
mov eax, 0x1145
xor ecx, ecx
mov dword [0x1006599c], 0x2a11
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
cmp word [edx + esi*2 - 0x16], 0x61
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
je 0x10002087
jmp 0x100021f6
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
cmp word [ecx + eax*2], 0
mov edx, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], edx
je 0x10002113
mov eax, dword [0x1006599c]
add eax, 0xffffe6db
mov dword [0x1006599c], eax
mov eax, dword [ebp - 0x24]
add eax, 1
cmp eax, 0x104
mov ecx, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x28], eax
jl 0x100020d7
mov eax, dword [ebp - 0x28]
mov ecx, 0x1145
xor edx, edx
mov dword [0x1006599c], 0x111f
mov esi, dword [ebp - 0x10]
cmp word [esi + eax*2 - 0x1a], 0x6c
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], edx
jne 0x100021f6
mov eax, 0x1145
xor ecx, ecx
mov dword [0x1006599c], 0x15d2
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
cmp word [edx + esi*2 - 0x18], 0x6f
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
je 0x100020ac
jmp 0x100021f6
mov eax, 0x1145
xor ecx, ecx
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
cmp word [edx + esi*2 - 0x12], 0x64
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
jne 0x100021f6
mov eax, 0x1145
xor ecx, ecx
mov edx, dword [0x100659a0]
add edx, 0x13b1
mov dword [0x1006599c], edx
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
cmp word [edx + esi*2 - 0x10], 0x6c
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
jne 0x100021f6
mov eax, 0x1145
xor ecx, ecx
mov dword [0x1006599c], 0xf06
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
cmp word [edx + esi*2 - 0xe], 0x6c
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
jne 0x100021f6
mov eax, 1
mov ecx, dword [0x100659a0]
add ecx, 0xa8d
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov dword [0x1006599c], ecx
add esp, 0x24
pop esi
pop ebp
ret

Function at 0x10002300
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
lea eax, [fcn.10002300]
mov dword [0x1006599c], 0x1c38
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp word [eax], 0x5a4d
mov dword [ebp - 8], eax
jne 0x1000233d
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x3c]
cmp dword [eax + ecx], 0x4550
jne 0x1000233d
mov eax, dword [ebp - 8]
add esp, 8
pop ebp
ret
mov eax, dword [ebp - 8]
add eax, 0xfffff000
and eax, 0xfffff000
mov dword [ebp - 4], eax
jmp 0x10002319
Function at 0x10002880
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [0x100659a4], 0
mov dword [0x100659a8], 0
mov dword [0x100659b4], 0
mov dword [0x1006599c], 0x3e3a
cmp eax, 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], edi
je 0x100029c4
mov eax, dword [ebp - 0x20]
mov ecx, 0x100
mov edx, eax
add edx, 1
mov dword [0x1006599c], 0x5a2
mov esi, dword [0x100659a4]
add esi, 1
mov dword [ebp - 0x24], eax
mov eax, esi
mov dword [ebp - 0x28], edx
cdq
idiv ecx
mov dword [0x100659a4], edx
mov esi, dword [0x100659a8]
mov edi, dword [ebp - 0x1c]
movzx edx, byte [edi + edx]
add edx, esi
mov eax, edx
cdq
idiv ecx
mov dword [0x100659a8], edx
mov ecx, dword [0x100659a4]
mov bl, byte [edi + ecx]
mov byte [0x100659ac], bl
mov bl, byte [edi + edx]
mov byte [edi + ecx], bl
mov bl, byte [0x100659ac]
mov ecx, dword [0x100659a8]
mov byte [edi + ecx], bl
mov dword [0x100659a0], 0x16b1
mov ecx, dword [0x100659a4]
movzx ecx, byte [edi + ecx]
mov edx, dword [0x100659a8]
movzx edx, byte [edi + edx]
add edx, ecx
and edx, 0xff
mov dword [0x100659b4], edx
mov dword [0x100659a0], 0x13c9
mov bl, byte [edi + edx]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
movzx esi, byte [ecx + edx]
mov dword [esp], esi
movzx esi, bl
mov dword [esp + 4], esi
call fcn.10001000
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
mov byte [ecx + edx], al
mov dword [0x100659a0], 0xb0e
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x10]
cmp esi, edi
mov dword [ebp - 0x20], esi
jne 0x100028d9
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x10002ba0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
xor esi, esi
mov dword [0x1006599c], 0x1bc1
mov dword [0x100659a8], 0
mov byte [0x100659ac], 0
mov dword [0x100659a4], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp - 0x1c]
mov ecx, eax
mov dl, cl
mov ecx, dword [ebp - 0x18]
mov byte [ecx + eax], dl
mov eax, dword [0x1006599c]
add eax, 0x567
mov dword [0x1006599c], eax
mov eax, dword [0x100659a4]
add eax, 1
mov dword [0x100659a4], eax
cmp eax, 0x100
mov dword [ebp - 0x1c], eax
jl 0x10002be5
mov dword [0x1006599c], 0x2d6
mov dword [0x100659a4], 0
mov eax, 0x100
mov dword [0x100659b0], 0
mov ecx, dword [0x100659a8]
mov edx, dword [0x100659a4]
mov esi, dword [ebp - 0x18]
movzx edi, byte [esi + edx]
add edi, ecx
mov dword [ebp - 0x20], eax
mov eax, edx
xor edx, edx
mov ecx, dword [ebp - 0x10]
div ecx
mov ebx, dword [ebp - 0x14]
movzx edx, byte [ebx + edx]
add edi, edx
mov dword [0x100659b0], edi
mov dword [0x1006599c], 0x23ea
mov eax, edi
cdq
mov edi, dword [ebp - 0x20]
idiv edi
mov dword [0x100659a8], edx
mov ecx, dword [0x100659a4]
mov bl, byte [esi + ecx]
mov byte [0x100659ac], bl
mov bl, byte [esi + edx]
mov byte [esi + ecx], bl
mov dword [0x1006599c], 0xaf6
mov bl, byte [0x100659ac]
mov ecx, dword [0x100659a8]
mov byte [esi + ecx], bl
mov dword [0x100659a0], 0x1eaf
mov ecx, dword [0x100659a4]
add ecx, 1
mov dword [0x100659a4], ecx
cmp ecx, 0x100
jl 0x10002c2e
mov eax, dword [0x1006599c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
add eax, 0xffffeafb
mov dword [0x100659a0], eax
mov eax, dword [ebp - 0x24]
add eax, 0xd7f
mov dword [0x1006599c], eax
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x401030
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
cmp dword [ebp + 0x18], 0x10
push esi
push edi
lea ebx, [ebp + 4]
jb 0x401048
mov eax, dword [ebx]
jmp 0x40104a
mov eax, ebx
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 0
push 0
push eax
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x401075
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x18], 0x10
jb 0x401084
mov eax, dword [eax + 4]
jmp 0x401087
add eax, 4
push 0
push 0x80
push 3
push 0
push 0
push 0
push eax
call esi
mov esi, eax
cmp esi, 0xffffffff
jne 0x4010b6
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret 8
lea eax, [esp + 0x10]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
cmp dword [ebp + 0x18], 0x10
jb 0x4010d0
mov eax, dword [ebx]
jmp 0x4010d2
mov eax, ebx
push eax
push 8
lea ecx, [esp + 0x20]
push ecx
push str.time
push str.Total
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStructA]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
dec eax
pop edi
neg eax
pop esi
sbb eax, eax
pop ebp
inc eax
pop ebx
add esp, 0x10
ret 8
Function at 0x401df0
Capabilities:
Download url
Receive data

Disassembly:
sub esp, 0x24
push ebx
mov ebx, ecx
mov ecx, dword [ebx + 0x60]
push esi
mov esi, dword [ebx + 0x5c]
xor eax, eax
cmp esi, ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], esi
je 0x401f40
push ebp
push edi
lea ebp, [esi + 0x20]
mov eax, dword [ebp + 0x40]
test eax, eax
jne 0x401f25
mov eax, dword [ebx + 0x54]
mov edi, 0x10
cmp eax, edi
jb 0x401e30
mov eax, dword [ebx + 0x40]
jmp 0x401e33
lea eax, [ebx + 0x40]
push esi
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00401b90
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
add esp, 0xc
cmp eax, edi
jae 0x401e52
lea ecx, [esp + 0x1c]
cmp dword [ebp + 0x14], edi
jb 0x401e5c
mov eax, dword [ebp]
jmp 0x401e5e
mov eax, ebp
push 0
push 0
push ecx
push eax
push 0
call sub.urlmon.dll_URLDownloadToFileA
test eax, eax
jne 0x401efd
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
inc ecx
cmp eax, edi
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], ecx
mov dword [ebp + 0x40], 1
jae 0x401e93
lea eax, [esp + 0x1c]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea edi, [ebp + 0x34]
push edi
push 0
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x38]
mov edx, 0x10
cmp eax, edx
jb 0x401ed5
mov ecx, dword [ebx + 0x24]
jmp 0x401ed8
lea ecx, [ebx + 0x24]
cmp dword [ebp + 0x30], edx
jb 0x401ee2
mov eax, dword [ebp + 0x1c]
jmp 0x401ee5
lea eax, [ebp + 0x1c]
push ecx
push edx
push edi
push eax
push str.FILE
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStructA]
mov esi, dword [esp + 0x14]
mov edi, 0x10
cmp dword [esp + 0x30], edi
jb 0x401f10
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00403afd
add esp, 4
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], 0
mov byte [esp + 0x1c], 0
mov eax, dword [ebx + 0x60]
add esi, 0x64
add ebp, 0x64
cmp esi, eax
mov dword [esp + 0x14], esi
jne 0x401e14
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x24
ret
Function at 0x402230
Capabilities:
Copy file
Create directory
Delete file
Download url
Read .ini file
Receive data

Disassembly:
sub esp, 0x120
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x54]
lea esi, [edi + 0x3c]
mov ebx, 0x10
cmp eax, ebx
jb 0x40224f
mov eax, dword [esi + 4]
jmp 0x402252
lea eax, [esi + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str.tmp.ini
lea eax, [esp + 0x10]
push esi
push eax
call fcn.00401ae0
mov eax, dword [edi + 0x1c]
add esp, 0xc
cmp eax, ebx
jb 0x40227a
mov eax, dword [edi + 8]
jmp 0x40227d
lea eax, [edi + 8]
push eax
push 0x104
lea ecx, [esp + 0x30]
push ecx
push str.http:__wnie.wn51.com_wnwb_update.ini
push str.UpdateURL
push str.GLOBAL
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp dword [esp + 0x24], ebx
mov eax, dword [esp + 0x10]
jae 0x4022ab
lea eax, [esp + 0x10]
push 0
push 0
push eax
lea edx, [esp + 0x34]
push edx
push 0
call sub.urlmon.dll_URLDownloadToFileA
test eax, eax
je 0x4022df
cmp dword [esp + 0x24], ebx
jb 0x402306
mov eax, dword [esp + 0x10]
push eax
call fcn.00403afd
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x120
ret
lea esi, [edi + 0x20]
push esi
lea ecx, [esp + 0x10]
push ecx
mov ecx, edi
call fcn.00401030
test eax, eax
jne 0x402312
cmp dword [esp + 0x24], ebx
jb 0x402306
mov edx, dword [esp + 0x10]
push edx
call fcn.00403afd
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x120
ret
cmp dword [esi + 0x18], ebx
jb 0x40231c
mov esi, dword [esi + 4]
jmp 0x40231f
add esi, 4
cmp dword [esp + 0x24], ebx
mov eax, dword [esp + 0x10]
jae 0x40232d
lea eax, [esp + 0x10]
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
cmp dword [esp + 0x24], ebx
mov eax, dword [esp + 0x10]
jae 0x402345
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x24], ebx
jb 0x40235f
mov eax, dword [esp + 0x10]
push eax
call fcn.00403afd
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x120
ret
Function at 0x4035d0
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x6c
push esi
push str._WNUpdateMutex
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403627
mov eax, dword [esp + 0x7c]
push 0x40a2e8
push eax
call fcn.004042cd
add esp, 8
push eax
lea ecx, [esp + 8]
call fcn.00402b60
lea ecx, [esp + 4]
call fcn.00403540
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 4]
call fcn.00402e60
xor eax, eax
pop esi
add esp, 0x6c
ret 0x10

Function at 0x404207
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x404224
call fcn.00406043
mov dword [eax], 0x16
xor eax, eax
jmp 0x40428e
push esi
push 0x8c
push 1
call fcn.004060bf
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x404279
push esi
call fcn.004054a2
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x404257
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x404172
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x40428d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00404b61
test ebx, ebx
pop ecx
je 0x40428b
push ebx
call fcn.0040604c
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4043cb
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40a3d0
call fcn.00405b2c
mov edi, 0x94
mov eax, edi
call fcn.00406ab0
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 [0x40db6c], ecx
mov eax, dword [esi + 4]
mov dword [0x40db78], eax
mov edx, dword [esi + 8]
mov dword [0x40db7c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40db70], esi
cmp ecx, 2
je 0x40442b
or esi, 0x8000
mov dword [0x40db70], esi
shl eax, 8
add eax, edx
mov dword [0x40db74], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x404466
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404466
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40447e
cmp eax, 0x20b
je 0x40446b
mov dword [ebp - 0x1c], esi
jmp 0x404492
cmp dword [ecx + 0x84], 0xe
jbe 0x404466
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40448c
cmp dword [ecx + 0x74], 0xe
jbe 0x404466
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00406a5d
pop ecx
test eax, eax
jne 0x4044a6
push 0x1c
call fcn.004043a7
pop ecx
call fcn.0040569c
test eax, eax
jne 0x4044b7
push 0x10
call fcn.004043a7
pop ecx
call fcn.004069bb
mov dword [ebp - 4], esi
call fcn.004067bd
test eax, eax
jge 0x4044d0
push 0x1b
call fcn.00404382
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40e234], eax
call fcn.0040669b
mov dword [0x40d9f0], eax
call fcn.004065f9
test eax, eax
jge 0x4044f6
push 8
call fcn.00404382
pop ecx
call fcn.004063c6
test eax, eax
jge 0x404507
push 9
call fcn.00404382
pop ecx
push 1
call fcn.00405d72
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40451d
push eax
call fcn.00404382
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00406369
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40453e
movzx eax, word [ebp - 0x40]
jmp 0x404541
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004035d0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40455f
push edi
call fcn.00405e9f
call fcn.00405ec1
jmp 0x404591
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00405b67
ret
Function at 0x405ddc
Capabilities:
Terminate process

Disassembly:
push 8
push 0x40a500
call fcn.00405b2c
push 8
call fcn.00405afb
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x40dbac], esi
jne 0x405e10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x40dba8], esi
mov al, byte [ebp + 0x10]
mov byte [0x40dba4], al
cmp dword [ebp + 0xc], edi
jne 0x405e5a
cmp dword [0x40e228], edi
je 0x405e4a
mov eax, dword [0x40e224]
sub eax, 4
mov dword [0x40e224], eax
cmp eax, dword [0x40e228]
jb 0x405e4a
mov eax, dword [eax]
cmp eax, edi
je 0x405e2b
call eax
jmp 0x405e2b
push 0x40d024
mov eax, 0x40d020
call fcn.00405d5a
pop ecx
push 0x40d030
mov eax, 0x40d028
call fcn.00405d5a
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x405e8b
cmp dword [ebp + 0x10], edi
jne 0x405e99
mov dword [0x40dbac], esi
push dword [ebp + 8]
call fcn.00405d18
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x405e98
push 8
call fcn.00405a46
pop ecx
ret
call fcn.00405b67
ret

Function at 0x4061b9
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40d124]
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 + 0x40d440]
je 0x4061ee
inc eax
cmp eax, 0x13
jb 0x4061df
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40d440]
jne 0x406314
mov eax, dword [0x40d9f8]
cmp eax, 1
je 0x4062ec
cmp eax, edx
jne 0x40621e
cmp dword [0x40d114], 1
je 0x4062ec
cmp ecx, 0xfc
je 0x406314
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 0x406254
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004058b0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00404680
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x406288
mov eax, edi
push eax
call fcn.00404680
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40a918
push edi
call fcn.00408520
add esp, 0x10
push edi
call fcn.00404680
push dword [esi + 0x40d444]
mov ebx, eax
call fcn.00404680
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00406ab0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004058b0
push edi
push ebx
call fcn.004058c0
push 0x40a8f8
push ebx
call fcn.004058c0
push dword [esi + 0x40d444]
push ebx
call fcn.004058c0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040841e
add esp, 0x2c
jmp 0x406314
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40d444]
push dword [esi]
call fcn.00404680
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.004061ab
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x407fe4
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 0x408012
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 0x408019
cmp ebx, dword [eax + 4]
jae 0x408019
xor eax, eax
jmp 0x408209
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40802a
xor eax, eax
inc eax
jmp 0x408208
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x408040
cmp ecx, edx
jae 0x408185
cmp dword [eax + 4], 0
je 0x408049
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x408031
cmp dword [ebp + 8], 0
je 0x40806b
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x408185
cmp eax, esi
jae 0x408185
mov eax, dword [0x40dce0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x408090
cmp dword [esi*4 + 0x40dce8], edi
je 0x408189
inc esi
cmp esi, eax
jl 0x40807e
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x408205
cmp dword [ebp - 8], 0x1000000
jne 0x408205
test byte [ebp - 0xc], 0xcc
je 0x40810e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x408205
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x408205
cmp word [eax + 0x18], 0x10b
jne 0x408205
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x408205
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40810e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40810e
test byte [ecx + 0x27], 0x80
jne 0x408185
push 1
push 0x40dd28
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x408022
mov ecx, dword [0x40dce0]
test ecx, ecx
mov edx, ecx
jle 0x408142
lea eax, [ecx*4 + 0x40dce4]
cmp dword [eax], edi
je 0x408142
dec edx
sub eax, 4
test edx, edx
jg 0x408136
test edx, edx
jne 0x408173
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40814f
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x408167
lea eax, [edx*4 + 0x40dce8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x408155
cmp ecx, 0x10
jge 0x408173
inc ecx
mov dword [0x40dce0], ecx
push 0
push 0x40dd28
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x408022
xor eax, eax
jmp 0x408208
test esi, esi
jle 0x408022
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x40dd28
call ebx
test eax, eax
jne 0x408022
cmp dword [esi*4 + 0x40dce8], edi
je 0x4081df
mov eax, dword [0x40dce0]
lea esi, [eax - 1]
test esi, esi
jl 0x4081cd
cmp dword [esi*4 + 0x40dce8], edi
je 0x4081c9
dec esi
jns 0x4081bd
test esi, esi
jge 0x4081dd
cmp eax, 0x10
jge 0x4081d8
inc eax
mov dword [0x40dce0], eax
lea esi, [eax - 1]
jmp 0x4081df
je 0x4081f7
xor ecx, ecx
test esi, esi
jl 0x4081f7
lea eax, [ecx*4 + 0x40dce8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4081e5
push 0
push 0x40dd28
call ebx
jmp 0x408022
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret