joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000ba80
Capabilities:
Hash data using fnv

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov eax, dword [esp + 0x24]
cmp eax, 0x10000001
jae 0x1000bbe2
mov ebx, ecx
dec eax
or eax, 1
bsr ecx, eax
xor ecx, 0x1f
neg cl
mov esi, 1
shl esi, cl
lea eax, [ebx + 0xc]
mov ebp, dword [ebx + 4]
mov edx, 2
shl edx, cl
mov ecx, eax
push ebp
push edx
call fcn.1000ad40
lea eax, [esi - 1]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], esi
mov eax, dword [ebx + 4]
mov eax, dword [eax]
cmp eax, ebp
je 0x1000bbd8
mov dword [esp + 4], ebx
mov dword [esp], ebp
jmp 0x1000baf4
mov dword [edx + ebx*4], ecx
mov dword [edx + esi*4], ecx
mov ebx, eax
mov eax, dword [esp + 0xc]
cmp eax, ebp
je 0x1000bbd8
mov ecx, eax
mov eax, dword [eax]
mov dword [esp + 0xc], eax
movzx edx, byte [ecx + 8]
xor edx, 0x11c9dc5
imul edx, edx, 0x1000193
movzx esi, byte [ecx + 9]
xor esi, edx
imul edi, esi, 0x1000193
and edi, dword [ebx + 0x18]
mov edx, dword [ebx + 0xc]
mov eax, ebx
lea ebx, [edi + edi]
lea esi, [edi*2 + 1]
mov edi, dword [edx + edi*8]
cmp edi, ebp
je 0x1000bae0
mov dword [esp + 8], ebx
mov ebp, dword [edx + esi*4]
movzx ebx, word [ecx + 8]
cmp bx, word [ebp + 8]
jne 0x1000bb70
mov edi, dword [ebp]
cmp edi, ecx
mov eax, dword [esp + 0xc]
je 0x1000bbc6
mov ebx, dword [ecx + 4]
mov dword [esp + 8], ebx
mov dword [ebx], eax
mov ebp, dword [eax + 4]
mov dword [ebp], edi
mov ebx, dword [edi + 4]
mov dword [ebx], ecx
mov dword [edi + 4], ebp
mov edi, dword [esp + 8]
mov dword [eax + 4], edi
mov dword [ecx + 4], ebx
jmp 0x1000bbc6
mov eax, dword [esp + 0xc]
nop word cs:[eax + eax]
cmp edi, ebp
je 0x1000bbaa
mov ebp, dword [ebp + 4]
cmp bx, word [ebp + 8]
jne 0x1000bb80
mov edx, dword [ebp]
mov esi, dword [ecx + 4]
mov dword [esi], eax
mov edi, dword [eax + 4]
mov dword [edi], edx
mov ebx, dword [edx + 4]
mov dword [ebx], ecx
mov dword [edx + 4], edi
mov dword [eax + 4], esi
mov dword [ecx + 4], ebx
jmp 0x1000bbc9
mov esi, dword [ecx + 4]
mov dword [esi], eax
mov edi, dword [eax + 4]
mov dword [edi], ebp
mov ebx, dword [ebp + 4]
mov dword [ebx], ecx
mov dword [ebp + 4], edi
mov dword [eax + 4], esi
mov dword [ecx + 4], ebx
mov esi, dword [esp + 8]
mov dword [edx + esi*4], ecx
mov ebx, dword [esp + 4]
mov ebp, dword [esp]
cmp eax, ebp
jne 0x1000baf4
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret 4
push str.invalid_hash_bucket_count
call fcn.1000cd5b
int3

Function at 0x100127f9
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10012838
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10012838
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10012838
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10012838
cmp dword [ecx + 0x74], 0xe
jbe 0x10012838
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10018cf4
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x10018d91
push ebx
push esi
call fcn.10018cbd
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.10018c53
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10018d3e
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10018d90
push edi
push eax
call fcn.10016130
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10018d5e
call fcn.10014f90
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10018d8f
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10018c53
add esp, 0x20
test eax, eax
jne 0x10018d7d
push edi
call fcn.10014f90
jmp 0x10018d85
push ebx
call fcn.10014f90
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x1001d067
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
mov eax, dword [eax + 0xc]
nop
shr eax, 3
test al, 1
je 0x1001d081
mov al, 1
leave
ret
mov eax, dword [ebp + 8]
push ebx
push esi
mov eax, dword [eax + 0xc]
nop
test al, 0xc0
mov eax, dword [ebp + 8]
je 0x1001d098
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x1001d0f0
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.1001bf42
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x1001d0f0
xor ebx, ebx
lea eax, [ebp - 0x10]
inc ebx
xorps xmm0, xmm0
push ebx
push eax
movlpd qword [ebp - 8], xmm0
push dword [ebp - 4]
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1001d0f0
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1001d0f0
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x1001d0ea
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x1001d0ec
xor bl, bl
mov al, bl
jmp 0x1001d0f2
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x100200b2
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, edx
sar ecx, 6
and eax, 0x3f
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x1002ead8]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x100200f4
cmp byte [ebx], 0xa
jne 0x100200f4
or byte [edi + eax + 0x28], 4
jmp 0x100200f9
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x100201fc
mov cl, byte [eax]
cmp cl, 0x1a
je 0x100201d7
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x10020128
mov eax, dword [ebp - 8]
jmp 0x10020148
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x10020164
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x10020142
add eax, 2
mov cl, 0xa
jmp 0x10020145
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov byte [esi], cl
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
add esi, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jb 0x1002010a
jmp 0x100201fc
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100201d2
cmp dword [ebp - 0x10], 0
je 0x100201d2
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x1002ead8]
test byte [eax + edi + 0x28], 0x48
je 0x100201b1
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x100201a1
mov byte [esi], 0xa
jmp 0x100201fb
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x1002ead8]
mov byte [eax + edi + 0x2a], cl
jmp 0x100201fb
cmp byte [ebp - 1], 0xa
jne 0x100201bb
cmp esi, ebx
je 0x1002019c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10020022
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x100201fc
mov byte [esi], 0xd
jmp 0x100201fb
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x1002ead8]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x100201f9
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x100201fc
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10020205
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
and eax, 0x3f
push ebx
mov ebx, dword [ebp + 0xc]
sar edx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [edx*4 + 0x1002ead8]
mov dword [ebp - 8], edx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x10020249
push 0xa
pop esi
cmp word [ebx], si
jne 0x10020249
or byte [eax + edi + 0x28], 4
jmp 0x1002024e
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + edx*2]
mov eax, ebx
mov dword [ebp - 0x10], edx
mov esi, ebx
cmp ebx, edx
jae 0x100203b9
movzx edx, word [eax]
mov ecx, edx
mov dword [ebp - 0xc], ecx
movzx ecx, cx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
cmp edx, 0x1a
je 0x10020391
lea ebx, [eax + 2]
mov dword [ebp - 4], ebx
push 0xd
pop ebx
cmp dx, bx
mov ebx, dword [ebp + 0xc]
je 0x1002029b
mov ebx, dword [ebp - 0x14]
mov edx, esi
mov eax, dword [ebp - 4]
movzx ebx, bx
mov dword [ebp - 4], ebx
jmp 0x100202c5
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x100202e4
push 0xa
pop ebx
cmp word [edx], bx
jne 0x100202b2
push ebx
add eax, 4
pop edx
jmp 0x100202ba
mov eax, edx
mov edx, dword [ebp - 0xc]
movzx edx, dx
movzx edx, dx
mov dword [ebp - 4], edx
mov edx, esi
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], 2
mov word [esi], cx
mov esi, dword [ebp - 0xc]
add esi, edx
cmp eax, dword [ebp - 0x10]
jb 0x10020260
jmp 0x100203b9
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002038c
cmp dword [ebp - 0x14], 0
je 0x1002038c
mov eax, dword [ebp - 8]
push 0xa
mov eax, dword [eax*4 + 0x1002ead8]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x10020368
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x10020330
mov word [esi], ax
jmp 0x100203b6
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebp - 8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov eax, dword [eax*4 + 0x1002ead8]
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x1002ead8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1002ead8]
pop ecx
mov byte [eax + edi + 0x2c], cl
jmp 0x100203b6
cmp word [ebp - 4], ax
jne 0x10020372
cmp esi, ebx
je 0x10020328
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10020022
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x100203b9
push 0xd
pop eax
jmp 0x10020328
mov eax, ecx
and ecx, 0x3f
sar eax, 6
imul ecx, ecx, 0x38
mov edi, dword [eax*4 + 0x1002ead8]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x100203b3
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x100203b9
mov word [esi], dx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10020be3
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.10020b5f
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10020d52
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10020d52
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x10020d07
jg 0x10020c3f
test eax, eax
je 0x10020cfd
push 1
push 0x1000
call fcn.10014f30
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10020c62
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10020cf4
push 0x8000
push ebx
call fcn.10020a8e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10020c8b
jg 0x10020c86
cmp ecx, 0x1000
jb 0x10020c8b
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.1001b95c
add esp, 0x10
cmp eax, 0xffffffff
je 0x10020cd0
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x10020c86
jl 0x10020cb7
test ecx, ecx
jne 0x10020c78
push dword [ebp - 0xc]
push ebx
call fcn.10020a8e
push esi
call fcn.10014f90
add esp, 0xc
xor ebx, ebx
jmp 0x10020d60
cmp byte [edi + 0x24], 0
je 0x10020ce7
cmp dword [edi + 0x20], 5
jne 0x10020ce7
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x10020cf2
mov ebx, dword [edi + 0x18]
jmp 0x10020cf4
xor ebx, ebx
push esi
call fcn.10014f90
pop ecx
jmp 0x10020d60
test ecx, ecx
jg 0x10020cc9
jl 0x10020d07
test eax, eax
jae 0x10020cc9
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10020022
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10020d27
cmp byte [edi + 0x1c], 0
je 0x10020cc9
jmp 0x10020d58
push ebx
call fcn.1001bf42
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10020cc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10020d60
cmp byte [edi + 0x1c], 0
je 0x10020d5d
mov ebx, dword [edi + 0x18]
jmp 0x10020d60
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10020022
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x10022340
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1002236d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1002236d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x5010e0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.00501e20
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.00501e20
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x501140
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x505070]
test esi, esi
jle 0x501260
mov eax, dword [0x505074]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x501174
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x5011f7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x501160
mov dword [esp], ebx
call fcn.00501b30
mov edi, eax
test eax, eax
je 0x501287
mov eax, dword [0x505074]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.00501c70
mov edx, dword [0x505074]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x501267
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x5011f0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x501200
add dword [0x505070], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x505074]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x5011f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.005010e0
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x50117e
mov eax, dword [0x505074]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.005010e0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.005010e0
lea esi, [esi]
nop
Function at 0x5017a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x50508c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x505084]
sub esp, 4
test ebx, ebx
je 0x5017f5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x5017ee
test esi, esi
je 0x5017ee
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x5017d0
mov dword [esp], 0x50508c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x501b30
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x501b55
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x501b60
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x501b55
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x501ba8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x501b9e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x501baa
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x501b90
xor eax, eax
pop ebx
pop esi
ret
Function at 0x40271d
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
and dword [ebp - 0x20], 0
and dword [ebp - 0x34], 0
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
and dword [ebp - 0x28], 0
and dword [ebp - 0x1c], 0
and dword [ebp - 0x30], 0
and dword [ebp - 0x10], 0
and dword [ebp - 0x2c], 0
and dword [ebp - 8], 0
and dword [ebp - 0x24], 0
push 0xaa
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
and dword [ebp - 0x14], 0
and dword [ebp - 0x18], 0
push 0
push 0
call fcn.004023d0
pop ecx
pop ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor eax, eax
leave
ret 0x10
Function at 0x402862
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x407130
call fcn.004035ec
mov edi, 0x94
mov eax, edi
call fcn.00402800
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 [0x493930], ecx
mov eax, dword [esi + 4]
mov dword [0x49393c], eax
mov edx, dword [esi + 8]
mov dword [0x493940], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x493934], esi
cmp ecx, 2
je 0x4028c2
or esi, 0x8000
mov dword [0x493934], esi
shl eax, 8
add eax, edx
mov dword [0x493938], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4028fd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4028fd
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x402915
cmp eax, 0x20b
je 0x402902
mov dword [ebp - 0x1c], esi
jmp 0x402929
cmp dword [ecx + 0x84], 0xe
jbe 0x4028fd
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x402923
cmp dword [ecx + 0x74], 0xe
jbe 0x4028fd
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040359b
pop ecx
test eax, eax
jne 0x402955
cmp dword [0x493920], 1
jne 0x402942
call fcn.00402d50
push 0x1c
call fcn.00402bd9
push 0xff
call fcn.00402a3e
pop ecx
pop ecx
call fcn.004034f9
mov dword [ebp - 4], esi
call fcn.0040334e
test eax, eax
jge 0x40296e
push 0x1b
call fcn.0040283d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x493eb4], eax
call fcn.0040322c
mov dword [0x493918], eax
call fcn.0040318a
test eax, eax
jge 0x402994
push 8
call fcn.0040283d
pop ecx
call fcn.00402f57
test eax, eax
jge 0x4029a5
push 9
call fcn.0040283d
pop ecx
push 1
call fcn.00402a6e
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4029bb
push eax
call fcn.0040283d
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00402efa
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4029dc
movzx eax, word [ebp - 0x40]
jmp 0x4029df
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040271d
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4029fd
push edi
call fcn.00402b99
call fcn.00402bbb
jmp 0x402a2f
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00403627
ret
Function at 0x402ad8
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x493970], esi
push edi
jne 0x402af8
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 [0x49396c], esi
mov byte [0x493968], al
jne 0x402b5e
mov ecx, dword [0x493ea8]
test ecx, ecx
je 0x402b3f
mov eax, dword [0x493ea4]
sub eax, 4
cmp eax, ecx
jmp 0x402b38
mov eax, dword [eax]
test eax, eax
je 0x402b2a
call eax
mov eax, dword [0x493ea4]
sub eax, 4
cmp eax, dword [0x493ea8]
mov dword [0x493ea4], eax
jae 0x402b22
mov eax, 0x40901c
mov esi, 0x409020
cmp eax, esi
mov edi, eax
jae 0x402b5e
mov eax, dword [edi]
test eax, eax
je 0x402b57
call eax
add edi, 4
cmp edi, esi
jb 0x402b4f
mov eax, 0x409024
mov esi, 0x409028
cmp eax, esi
mov edi, eax
jae 0x402b7d
mov eax, dword [edi]
test eax, eax
je 0x402b76
call eax
add edi, 4
cmp edi, esi
jb 0x402b6e
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x402b97
push dword [ebp + 8]
mov dword [0x493970], 1
call fcn.00402a3e
pop ebp
ret

Function at 0x402bd9
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x491c40]
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 + 0x491b08]
je 0x402c0e
inc eax
cmp eax, 0x13
jb 0x402bff
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x491b08]
jne 0x402d34
mov eax, dword [0x493920]
cmp eax, 1
je 0x402d0c
cmp eax, edx
jne 0x402c3e
cmp dword [0x491b04], 1
je 0x402d0c
cmp ecx, 0xfc
je 0x402d34
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 0x402c74
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00403900
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00403b30
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x402ca8
mov eax, edi
push eax
call fcn.00403b30
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x407548
push edi
call fcn.00403a00
add esp, 0x10
push edi
call fcn.00403b30
push dword [esi + 0x491b0c]
mov ebx, eax
call fcn.00403b30
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00402800
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00403900
push edi
push ebx
call fcn.00403910
push 0x407528
push ebx
call fcn.00403910
push dword [esi + 0x491b0c]
push ebx
call fcn.00403910
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004037fd
add esp, 0x2c
jmp 0x402d34
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x491b0c]
push dword [esi]
call fcn.00403b30
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.00403bec
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret