joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40fe10
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0xcc]
mov ecx, 0x33
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 8], ecx
mov esi, esp
push 4
lea eax, [ebp + 0xc]
push eax
push 4
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp esi, esp
call fcn.0041561c
pop edi
pop esi
pop ebx
add esp, 0xcc
cmp ebp, esp
call fcn.0041561c
mov esp, ebp
pop ebp
ret 8

Function at 0x40fe70
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0xcc]
mov ecx, 0x33
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 8], ecx
mov esi, esp
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp esi, esp
call fcn.0041561c
lea ecx, [eax + eax + 2]
mov esi, esp
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp esi, esp
call fcn.0041561c
pop edi
pop esi
pop ebx
add esp, 0xcc
cmp ebp, esp
call fcn.0041561c
mov esp, ebp
pop ebp
ret 0xc
Function at 0x412f10
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf0
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0xf0]
mov ecx, 0x3c
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
shl ecx, 1
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov esi, esp
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x20]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp esi, esp
call fcn.0041561c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x412f7b
mov eax, dword [ebp - 0x14]
jmp 0x412fc8
cmp dword [ebp - 0x20], 1
je 0x412f8e
cmp dword [ebp - 0x20], 2
je 0x412f8e
mov eax, 0xd
jmp 0x412fc8
cmp dword [ebp + 0xc], 0
je 0x412fbc
mov eax, dword [ebp - 0x2c]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x412fb5
mov eax, dword [ebp - 0x2c]
shr eax, 1
mov ecx, dword [ebp + 0xc]
movzx edx, word [ecx + eax*2 - 2]
test edx, edx
je 0x412fbc
mov eax, 0xd
jmp 0x412fc8
mov eax, dword [ebp - 0x2c]
shr eax, 1
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x412ff0]
call fcn.0041563f
pop eax
pop edx
pop edi
pop esi
pop ebx
add esp, 0xf0
cmp ebp, esp
call fcn.0041561c
mov esp, ebp
pop ebp
ret 0xc
Function at 0x41539d
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x74
push 0x41bd00
call fcn.00415158
xor edi, edi
mov dword [ebp - 0x20], edi
push edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call ebx
cmp word [eax], 0x5a4d
jne 0x4153dd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4153dd
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4153f5
cmp eax, 0x20b
je 0x4153e2
mov dword [ebp - 0x1c], edi
jmp 0x415409
cmp dword [ecx + 0x84], 0xe
jbe 0x4153dd
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x415403
cmp dword [ecx + 0x74], 0xe
jbe 0x4153dd
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
push 2
call dword [sym.imp.MSVCR71.dll___set_app_type]
pop ecx
or dword [0x4238fc], 0xffffffff
or dword [0x423900], 0xffffffff
call dword [sym.imp.MSVCR71.dll___p__fmode]
mov ecx, dword [0x423878]
mov dword [eax], ecx
call dword [sym.imp.MSVCR71.dll___p__commode]
mov ecx, dword [0x423874]
mov dword [eax], ecx
mov eax, dword [sym.imp.MSVCR71.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x4238f8], eax
call fcn.00415730
call fcn.004157d0
cmp dword [0x423410], edi
jne 0x415469
push fcn.004157d0
call dword [sym.imp.MSVCR71.dll___setusermatherr]
pop ecx
call fcn.004157be
push 0x423054
push 0x423050
call sub.MSVCR71.dll__initterm
push 0x415774
call fcn.00415215
mov eax, dword [0x423870]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [0x42386c]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.MSVCR71.dll___wgetmainargs]
add esp, 0x20
mov dword [ebp - 0x3c], eax
cmp eax, edi
jge 0x4154bd
push 8
call sub.MSVCR71.dll__amsg_exit
pop ecx
push 0x42304c
push section..data
call sub.MSVCR71.dll__initterm
pop ecx
pop ecx
mov eax, dword [sym.imp.MSVCR71.dll__wcmdln]
mov esi, dword [eax]
cmp esi, edi
jne 0x4154e7
or dword [ebp - 4], 0xffffffff
mov eax, 0xff
jmp 0x4155a1
mov dword [ebp - 0x24], esi
mov ax, word [esi]
cmp ax, 0x20
ja 0x415556
cmp ax, di
je 0x4154fd
cmp dword [ebp - 0x20], edi
jne 0x415556
mov ax, word [esi]
cmp ax, di
je 0x415512
cmp ax, 0x20
ja 0x415512
inc esi
inc esi
mov dword [ebp - 0x24], esi
jmp 0x4154fd
mov dword [ebp - 0x58], edi
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [ebp - 0x58], 1
je 0x41552e
movzx eax, word [ebp - 0x54]
jmp 0x415531
push 0xa
pop eax
push eax
push esi
push edi
push edi
call ebx
push eax
call fcn.0040706a
mov esi, eax
mov dword [ebp - 0x40], esi
cmp dword [ebp - 0x1c], edi
jne 0x41554e
push esi
call dword [sym.imp.MSVCR71.dll_exit]
call dword [sym.imp.MSVCR71.dll__cexit]
jmp 0x41559b
cmp ax, 0x22
jne 0x415567
xor eax, eax
cmp dword [ebp - 0x20], edi
sete al
mov dword [ebp - 0x20], eax
inc esi
inc esi
jmp 0x4154e7
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.00415193
ret
Function at 0x4162ca
Capabilities:
Parse pe header

Disassembly:
push 0x2c
push 0x41c280
call fcn.00415158
push 0x1c
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x1c], ecx
cmp word [ecx], 0x5a4d
jne 0x416336
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x20], eax
cmp dword [eax], 0x4550
je 0x41630e
xor al, al
or dword [ebp - 4], 0xffffffff
jmp 0x41633c
mov edx, dword [eax + 0xd8]
lea esi, [edx + ecx]
cmp dword [ebp + 0xc], esi
jb 0x416306
mov eax, dword [eax + 0xdc]
add eax, edx
add eax, ecx
cmp dword [ebp + 0xc], eax
jae 0x416306
mov al, 1
jmp 0x416308
or dword [ebp - 4], 0xffffffff
xor al, al
call fcn.00415193
ret
Function at 0x41643e
Capabilities:
Allocate or change rwx memory
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
mov esi, eax
cmp esi, 0x7ff80000
push edi
mov ebx, 0x10000
jbe 0x416461
lea eax, [esi - 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x416464
mov dword [ebp - 4], ebx
cmp esi, 0x80000000
jae 0x416477
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 8], eax
jmp 0x41647e
mov dword [ebp - 8], 0xfff80000
mov eax, dword [0x4238dc]
test eax, eax
mov ecx, dword [0x4238d8]
jne 0x416498
test ecx, ecx
je 0x4164ad
mov eax, ecx
mov dword [0x4238dc], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x4164ad
cmp edx, dword [ebp - 4]
jb 0x4164ad
cmp edx, dword [ebp - 8]
jbe 0x416581
mov eax, ecx
test ecx, ecx
jmp 0x4164d1
test eax, eax
je 0x4164cc
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x4164cc
cmp ecx, dword [ebp - 4]
jb 0x4164cc
cmp ecx, dword [ebp - 8]
jbe 0x416581
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x4238dc], eax
jne 0x4164b3
mov eax, esi
and eax, 0xffff
sub esi, eax
cmp esi, dword [ebp - 4]
mov edi, esi
jbe 0x41661c
cmp edi, 0x70000000
jb 0x416501
cmp edi, 0x80000000
ja 0x416501
mov edi, 0x6fff0000
push 0x1c
lea eax, [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41661c
cmp dword [ebp - 0x30], ebx
jne 0x416520
cmp dword [ebp - 0x34], ebx
jae 0x416533
mov edi, dword [ebp - 0x3c]
add edi, 0xffff0000
cmp edi, dword [ebp - 4]
ja 0x4164ec
jmp 0x41661c
push 0x40
push 0x3000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x4238dc], eax
je 0x41661c
mov ecx, dword [0x4238d8]
xor edx, edx
mov dword [eax + 4], ecx
mov dword [eax], 0x52727464
mov dword [eax + 8], edx
mov dword [0x4238d8], eax
lea ecx, [eax + 0xffe0]
mov esi, 0x7fd
mov dword [ecx + 0x18], edx
mov edx, ecx
sub ecx, 0x20
dec esi
jne 0x416573
mov dword [eax + 8], edx
mov esi, dword [eax + 8]
cmp esi, dword [ebp - 4]
jb 0x416621
cmp esi, dword [ebp - 8]
ja 0x416621
mov ecx, dword [esi + 0x18]
push 0x20
push 0xcc
push esi
mov dword [eax + 8], ecx
call sub.MSVCR71.dll_memset
add esp, 0xc
mov eax, esi
jmp 0x416623
cmp esi, 0x70000000
jb 0x4165c5
cmp esi, 0x80000000
ja 0x4165c5
mov esi, 0x80010000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x416621
cmp dword [ebp - 0x14], ebx
jne 0x416613
cmp dword [ebp - 0x18], ebx
jb 0x416613
mov ecx, esi
and ecx, 0xffff
je 0x4165f7
mov eax, ebx
sub eax, ecx
sub dword [ebp - 0x18], eax
add dword [ebp - 0x24], eax
mov esi, dword [ebp - 0x24]
push 0x40
push 0x3000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x4238dc], eax
jne 0x41654f
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
lea esi, [eax + ecx]
cmp esi, dword [ebp - 8]
jb 0x4165b0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x416649
Capabilities:
Parse pe header

Disassembly:
push 0x28
push 0x41c290
call fcn.00415158
push 0x1c
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4166a4
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x34]
cmp word [ecx], 0x5a4d
jne 0x4166a0
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x1c], eax
cmp dword [eax], 0x4550
jne 0x4166a0
cmp word [eax + 0x14], 0
jne 0x416695
xor eax, eax
or dword [ebp - 4], 0xffffffff
jmp 0x4166a6
mov eax, ecx
jmp 0x41668f
or dword [ebp - 4], 0xffffffff
xor eax, eax
call fcn.00415193
ret

Function at 0x4166be
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push edi
xor edi, edi
cmp dword [0x4238e4], edi
jne 0x4166e1
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x4238e4
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x4166e8
mov eax, 0x10dd
jmp 0x41672c
push esi
mov esi, dword [0x4238d8]
mov dword [0x4238e0], edi
mov dword [0x4238f4], edi
mov dword [0x4238f0], edi
mov dword [0x4238e8], edi
mov dword [0x4238ec], edi
jmp 0x416725
lea eax, [esp + 8]
push eax
push 0x40
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [esi + 4]
cmp esi, edi
jne 0x41670f
xor eax, eax
pop esi
pop edi
pop ecx
ret

Function at 0x41672f
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x4238e4], eax
je 0x416745
mov eax, 0x10dd
pop ecx
ret
push ebx
push esi
mov esi, dword [0x4238f4]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x416790
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi + 4], ebx
jne 0x416781
mov edi, dword [esi + 0x10]
cmp edi, ebx
je 0x416781
call fcn.00416628
mov dword [esi + 0x10], ebx
mov edi, dword [esi]
push esi
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x416754
mov dword [0x4238f4], ebx
call fcn.00416417
mov esi, dword [0x4238f0]
cmp esi, ebx
je 0x4167bd
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi]
push esi
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x4167a5
pop edi
pop esi
mov dword [0x4238f0], ebx
mov dword [0x4238e4], ebx
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x416a10
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x4238e8]
test eax, eax
jne 0x416a80
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 8]
cmp edi, eax
jne 0x416a2c
xor eax, eax
jmp 0x416a7f
push esi
push 8
call fcn.004150f2
mov esi, eax
test esi, esi
pop ecx
jne 0x416a40
push 8
pop edi
jmp 0x416a5b
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x416a6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
pop ecx
and dword [0x4238ec], 0
mov dword [0x4238e8], edi
mov eax, edi
jmp 0x416a7e
mov eax, dword [0x4238f0]
mov dword [esi], eax
mov dword [esi + 4], edi
mov dword [0x4238f0], esi
xor eax, eax
pop esi
pop edi
ret 4
Function at 0x416cc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x4238e4], eax
je 0x416cdc
mov eax, 0x10dd
jmp 0x416db8
mov eax, dword [0x4238e8]
test eax, eax
jne 0x416db8
push edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x416cf9
push 6
pop eax
jmp 0x416db7
cmp dword [edi], 0
push ebx
push esi
jne 0x416d0d
push 6
pop eax
mov dword [0x4238e8], eax
jmp 0x416daf
push 0x18
call fcn.004150f2
mov esi, eax
test esi, esi
pop ecx
jne 0x416d20
push 8
pop edi
jmp 0x416d99
mov edi, dword [edi]
push 0
push dword [ebp + 0xc]
call fcn.004166ac
movzx ecx, byte [edi + 0x17]
mov ebx, dword [edi + 0x18]
xor edx, edx
sub ebx, ecx
cmp ecx, edx
je 0x416d8e
cmp ecx, 0x17
ja 0x416d8e
cmp dword [edi + 0x1c], eax
jne 0x416d8e
lea eax, [ebp - 4]
push eax
push 0x40
push ecx
push ebx
mov dword [ebp - 4], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x416d64
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x416d99
mov eax, dword [ebp + 8]
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov dword [esi + 0x10], edi
mov dword [esi + 0xc], ebx
mov eax, dword [ebp - 4]
mov dword [esi + 0x14], eax
mov eax, dword [0x4238f4]
mov dword [esi], eax
mov dword [0x4238f4], esi
xor eax, eax
jmp 0x416db5
cmp dword [0x4238e0], edx
push 9
pop edi
jne 0x416d9f
mov dword [0x4238e8], edi
test esi, esi
je 0x416daa
push esi
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, edi
mov edi, dword [ebp + 8]
mov dword [0x4238ec], edi
pop esi
pop ebx
pop edi
leave
ret 8
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x40d058], 1
mov dword [0x40d054], 1
mov dword [0x40d050], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x40d00c], eax
mov eax, dword [0x40d064]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x40d078]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x40d060]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x4091f0], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], dbg._matherr
call dbg.__mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056

Function at 0x401761
Capabilities:
Check for time delay via gettickcount

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0x384
call dword [sym.imp.KERNEL32.dll_SleepEx]
sub esp, 8
call esi
sub eax, ebx
cmp eax, 0x351
setbe al
add esp, 0x14
pop ebx
pop esi
ret
Function at 0x401b90
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
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 sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x401bf0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x40d06c]
test esi, esi
jle 0x401d10
mov eax, dword [0x40d070]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401c24
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401ca7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401c10
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401d37
mov eax, dword [0x40d070]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x40d070]
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 0x401d17
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401ca0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401cb0
add dword [0x40d06c], 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 [0x40d070]
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 0x401ca0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x401c2e
mov eax, dword [0x40d070]
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 dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop
Function at 0x402250
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x40d088
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40d080]
sub esp, 4
test ebx, ebx
je 0x4022a5
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 0x40229e
test esi, esi
je 0x40229e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402280
mov dword [esp], 0x40d088
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4025e0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402605
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402610
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402605
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 0x402658
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40264e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40265a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402640
xor eax, eax
pop ebx
pop esi
ret
Function at 0x40b6e2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x48d640
cmp edx, dword [eax]
je 0x40b704
add eax, 8
inc ecx
cmp eax, 0x48d6d0
jl 0x40b6f5
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x48d640]
jne 0x40b832
mov eax, dword [0x4980b0]
cmp eax, 1
je 0x40b80c
test eax, eax
jne 0x40b735
cmp dword [0x48ab84], 1
je 0x40b80c
cmp edx, 0xfc
je 0x40b832
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b76c
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040c6a0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00405b80
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40b7af
lea eax, [ebp - 0x1a4]
push eax
call fcn.00405b80
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4840b8
push edi
call fcn.004046b0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040c6a0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040c6b0
lea eax, [ebp - 0xa0]
push 0x484098
push eax
call fcn.0040c6b0
push dword [esi + 0x48d644]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040c6b0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040dcec
add esp, 0x2c
pop edi
jmp 0x40b832
lea eax, [ebp + 8]
lea esi, [esi + 0x48d644]
push 0
push eax
push dword [esi]
call fcn.00405b80
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]
pop esi
leave
ret
Function at 0x412424
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
cmp dword [ebp + 0x10], 0
je 0x41243a
mov eax, dword [ebp + 0x10]
mov dword [0x49dca8], eax
jmp 0x412444
mov dword [0x49dca8], 0xffffffff
mov ecx, dword [ebp + 0x14]
mov dword [0x49dca4], ecx
cmp dword [0x498764], 0
je 0x412465
mov edx, dword [0x49dcb0]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x4124d6
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x49dcb0], eax
cmp dword [0x49dcb0], 0
jne 0x412485
xor eax, eax
jmp 0x4124db
push 4
push 1
call fcn.0040c790
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x41249e
xor eax, eax
jmp 0x4124db
mov eax, dword [ebp - 4]
mov ecx, dword [0x49dcb0]
mov dword [eax], ecx
mov edx, dword [ebp - 4]
push edx
push 0
push 0x412391
call fcn.0047294a
add esp, 0xc
mov dword [0x498764], eax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x498764], 0
jne 0x4124d6
xor eax, eax
jmp 0x4124db
mov eax, dword [0x498764]
mov esp, ebp
pop ebp
ret

Function at 0x412500
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push eax
call fcn.00404a9d
add esp, 4
mov dword [0x49875c], eax
cmp dword [0x49875c], 0
je 0x412527
mov eax, dword [0x49875c]
jmp 0x4125a0
lea ecx, [ebp - 0x10]
push ecx
push 1
push 0
push 0x48e214
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x41259e
mov dword [ebp - 0xc], 0xc7
lea edx, [ebp - 0xc]
push edx
push 0x498694
lea eax, [ebp - 4]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x412590
mov dword [0x49875c], 0x498694
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x49875c]
jmp 0x4125a0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x4125a0
xor eax, eax
mov esp, ebp
pop ebp
ret