joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4e2ff2
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x649400]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4e3035
cmp word [esi], dx
jne 0x4e3035
or byte [edi + eax + 0x28], 4
jmp 0x4e303a
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4e3173
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4e3153
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4e307c
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4e30b2
cmp eax, edx
jae 0x4e30be
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4e3054
jmp 0x4e3173
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 0x4e314f
cmp dword [ebp - 0x14], 0
je 0x4e314f
mov eax, dword [ebx*4 + 0x649400]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4e3127
mov cx, word [ebp - 4]
pop eax
cmp cx, ax
je 0x4e316d
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x649400]
push 0xa
mov byte [edi + eax + 0x2a], cl
mov eax, dword [ebx*4 + 0x649400]
shr cx, 8
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x649400]
pop ecx
mov byte [edi + eax + 0x2c], cl
jmp 0x4e3170
pop ebx
cmp word [ebp - 4], bx
jne 0x4e3138
cmp esi, dword [ebp + 0xc]
jne 0x4e3138
mov word [esi], bx
jmp 0x4e3170
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004efa9b
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4e3173
push 0xd
jmp 0x4e316c
mov ecx, dword [ebx*4 + 0x649400]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4e316a
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4e3173
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4e5cff
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]
push dword [ebp + 0xc]
push ebx
call fcn.004e5bab
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4e5e77
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4e5e77
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4e5e26
jg 0x4e5d58
test eax, eax
je 0x4e5e1c
push 1
push 0x1000
call fcn.004ee91b
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4e5d7e
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x4e5e13
push 0x8000
push ebx
call fcn.004ea90a
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4e5daa
jg 0x4e5da5
cmp ecx, 0x1000
jb 0x4e5daa
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004e4d57
add esp, 0x10
cmp eax, 0xffffffff
je 0x4e5def
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 0x4e5da5
jl 0x4e5dd6
test ecx, ecx
jne 0x4e5d97
push dword [ebp - 0xc]
push ebx
call fcn.004ea90a
push esi
call fcn.004ecbfc
add esp, 0xc
xor edi, edi
jmp 0x4e5e88
cmp byte [edi + 0x24], 0
je 0x4e5e06
cmp dword [edi + 0x20], 5
jne 0x4e5e06
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4e5e11
mov edi, dword [edi + 0x18]
jmp 0x4e5e13
xor edi, edi
push esi
call fcn.004ecbfc
pop ecx
jmp 0x4e5e88
test ecx, ecx
jg 0x4e5de8
jl 0x4e5e26
test eax, eax
jae 0x4e5de8
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004efa9b
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4e5e49
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4e5de8
jmp 0x4e5e80
push ebx
call fcn.004e26a1
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4e5de8
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x4e5e88
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4e5e85
mov edi, dword [edi + 0x18]
jmp 0x4e5e88
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004efa9b
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4eedec
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5c93fc
push 0x5c93f4
push 0x5c5138
push 0x1e
call fcn.004eec19
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4eee20
push dword [ebp + 8]
mov ecx, esi
call dword [0x5c16c4]
call esi
jmp 0x4eee26
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x4eee6a
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5c940c
push 0x5c9404
push str.FlsGetValue
push 0x20
call fcn.004eec19
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4eeea1
push dword [ebp + 8]
mov ecx, esi
call dword [0x5c16c4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4efdb1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004efc22

Function at 0x4f2c66
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x6441a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x4f2cb1
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.004f2e05
test al, al
jne 0x4f2cab
sub edx, 2
cmp edx, edi
jne 0x4f2c91
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4f2cd3
lea eax, [edi + 2]
cmp edx, eax
je 0x4f2cd3
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004f2bb2
add esp, 0x10
jmp 0x4f2dcd
push esi
lea ecx, [ebp - 0x255]
call fcn.004f2e05
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4f2d16
push dword [ebp - 0x25c]
jmp 0x4f2cc3
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x4f2d53
cmp word [ebp - 0x226], 0
je 0x4f2d74
cmp word [ebp - 0x226], ax
jne 0x4f2d53
cmp word [ebp - 0x224], 0
je 0x4f2d74
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004f2bb2
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4f2dc0
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4f2d2d
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x4f2da8
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4f2dcd
push 0x4f29e2
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004f8ea0
add esp, 0x10
jmp 0x4f2d9d
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004cdf2e
leave
ret
Function at 0x4f36f1
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 0x4f378e
push ebx
push esi
call fcn.004f36ba
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.004ef6d1
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4f373b
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4f378d
push edi
push eax
call fcn.004ecc9f
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4f375b
call fcn.004ecbfc
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4f378c
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004ef6d1
add esp, 0x20
test eax, eax
jne 0x4f377a
push edi
call fcn.004ecbfc
jmp 0x4f3782
push ebx
call fcn.004ecbfc
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 0x4f3791
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4f37a2
pop esi
ret
push ebx
push edi
push esi
call fcn.004f36ba
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004ecc9f
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4f37ca
push ebx
push esi
push edi
call fcn.004d0350
add esp, 0xc
push 0
call fcn.004ecbfc
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x4f3f16
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004f3a3d
Function at 0x5b84a7
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x6441a4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x62163c
push esi
call fcn.004f4c6a
pop ecx
pop ecx
test eax, eax
jne 0x5b84d5
xor al, al
jmp 0x5b8552
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.005b81ea
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x5b850f
push dword [ebp - 0x210]
call fcn.004d2e13
xor al, al
jmp 0x5b8550
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x5b8515
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x5b8535
push edx
call fcn.005b83dd
pop ecx
test al, al
je 0x5b8500
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x5b8543
mov bl, 1
push dword [ebp - 0x210]
call fcn.004d2e13
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004cdf2e
leave
ret
Function at 0x401050
Capabilities:
Get process heap flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov dword [esp], 1
call sym.__configure_narrow_argv
call sym.__initialize_narrow_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___argv
mov edi, dword [eax]
call sym.__get_initial_narrow_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete dl
movzx edx, dl
inc edx
mov dword [esp], edx
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._main
mov dword [esp], eax
call sym._exit
nop
nop
nop
nop
nop

Function at 0x401110
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x54
call sym.___main
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov ebx, eax
movzx eax, byte [eax]
test al, al
je 0x40118d
cmp al, 9
je 0x401180
cmp al, 0x20
je 0x401180
xor edi, edi
xor esi, esi
lea esi, [esi]
cmp al, 0x5c
je 0x4011f8
cmp al, 0x22
je 0x4011e0
xor esi, esi
movzx eax, byte [ebx + 1]
inc ebx
test al, al
je 0x40118d
cmp al, 9
sete cl
cmp al, 0x20
sete dl
or cl, dl
je 0x401140
test edi, 1
jne 0x401140
lea esi, [esi]
lea esi, [esi]
nop
movzx eax, byte [ebx + 1]
inc ebx
cmp al, 9
je 0x401180
cmp al, 0x20
je 0x401180
lea eax, [ebp - 0x50]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
sub esp, 4
test byte [ebp - 0x24], 1
jne 0x4011a8
mov word [ebp - 0x20], 1
mov dword [esp], 0
movzx esi, word [ebp - 0x20]
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
xor edx, edx
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._WinMain_16
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
and esi, 1
jne 0x401150
xor edi, 1
jmp 0x401152
inc esi
jmp 0x401152
Function at 0x100010e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov dword [ebp - 8], esi
mov esi, eax
mov eax, dword [section..bss]
mov dword [ebp - 0xc], ebx
mov ebx, edx
mov dword [ebp - 4], edi
test eax, eax
je 0x100011a0
mov dword [esp], ebx
call eax
mov dword [ebx + 8], eax
sub esp, 4
test eax, eax
jns 0x10001128
mov eax, dword [ebx]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov dword [esp], esi
lea edi, [ebp - 0x214]
mov eax, 0x104
mov dword [esp + 4], edi
mov esi, 0x104
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
mov eax, dword [ebx]
mov ecx, str.MODULE
mov edx, dword [eax]
sub esp, 0xc
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
mov dword [esp + 4], edi
mov dword [esp + 8], esi
mov dword [esp], str.SystemRoot
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov eax, dword [ebx]
mov edx, dword [eax]
sub esp, 0xc
mov dword [esp + 8], edi
mov edi, str.SystemRoot
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
jmp 0x10001112
mov dword [esp], str.atl100.dll
call dword [sym.imp.kernel32.dll_LoadLibraryW]
sub esp, 4
test eax, eax
je 0x100011d6
mov dword [esp], eax
mov edx, str.AtlCreateRegistrar
mov dword [esp + 4], edx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [section..bss], eax
sub esp, 8
test eax, eax
jne 0x10001103
mov dword [ebx + 8], 0x80004002
xor eax, eax
jmp 0x10001114
Function at 0x100011f0
Capabilities:
Access peb ldr_data
Extract resource via kernel32 functions
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindResourceW]
mov dword [ebp - 0x10], eax
sub esp, 0xc
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_LoadResource]
mov edx, dword [ebp - 0x10]
sub esp, 8
mov ebx, eax
mov dword [esp + 4], edx
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SizeofResource]
mov dword [ebp - 0x10], eax
sub esp, 8
test ebx, ebx
je 0x10001380
mov ecx, dword [esi]
test ecx, ecx
je 0x10001360
xor eax, eax
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
xor edi, edi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x14], edi
mov dword [esp + 8], ebx
mov dword [esp], 0xfde9
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], eax
mov dword [ebp - 0x1c], edx
call edx
xor edx, edx
lea ecx, [eax + 1]
sub esp, 0x18
mov dword [ebp - 0x18], ecx
lea eax, [ecx + ecx]
mov dword [esp + 4], edx
mov ecx, eax
mov dword [esp + 8], ecx
mov dword [ebp - 0x14], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
sub esp, 0xc
test eax, eax
mov edi, eax
je 0x1000138c
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp + 0xc], eax
mov dword [esp], 0xfde9
call edx
mov eax, dword [ebp - 0x14]
mov ebx, dword [esi + 4]
mov word [edi + eax - 2], 0
mov eax, dword [esi]
sub esp, 0x18
test ebx, ebx
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
jne 0x10001350
call dword [edx + 0x28]
mov dword [esi + 8], eax
sub esp, 8
mov dword [esp + 8], edi
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [esi + 8]
not eax
shr eax, 0x1f
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
call dword [edx + 0x24]
mov dword [esi + 8], eax
sub esp, 8
jmp 0x10001312
mov edx, esi
mov eax, edi
call sym._create_registrar
test eax, eax
jne 0x10001256
lea esi, [esi]
lea esi, [esi]
nop
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov dword [esi + 8], 0x8007000e
xor eax, eax
jmp 0x10001382
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x406054], 1
mov dword [0x406050], 1
mov dword [0x40604c], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x40600c], eax
mov eax, dword [0x406060]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x406074]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x40605c]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x403018], 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 0x401800
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 0x401860
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x406068]
test esi, esi
jle 0x401980
mov eax, dword [0x40606c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401894
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401917
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401880
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x4019a7
mov eax, dword [0x40606c]
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 [0x40606c]
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 0x401987
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401910
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401920
add dword [0x406068], 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 [0x40606c]
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 0x401910
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 0x40189e
mov eax, dword [0x40606c]
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 0x401ec0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40607c]
sub esp, 4
test ebx, ebx
je 0x401f15
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 0x401f0e
test esi, esi
je 0x401f0e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401ef0
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x430005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
mov eax, section..text
nop
mov ebx, 0x408f6c
nop
mov ecx, 0xc6e79a1
nop
nop
nop
nop
test eax, eax
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x430024
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42e3d0
mov ecx, 0x18492129
nop
nop
nop
test eax, eax
nop
nop
nop
je 0x430084
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x401219