joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10030110
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub eax, 0
je 0x10030148
sub eax, 1
jne 0x1003017c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
push 0
push 0
push dword [ebp + 8]
push 0x100300c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 1
pop ebp
ret 0xc
cmp dword [0x10062778], 0
je 0x1003017c
xor edx, edx
xor ecx, ecx
call fcn.1002e000
push dword [0x10062764]
call fcn.10037c10
add esp, 4
mov dword [0x10062764], 0
mov dword [0x10062778], 0
mov eax, 1
pop ebp
ret 0xc

Function at 0x10043917
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1004378d

Function at 0x100440d9
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1004405b

Function at 0x1004bb10
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1004bb3d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1004bb3d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x1032c
Capabilities:
Complete processing asynchronous io request

Disassembly:
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0x58]
mov ecx, dword [esi + 0x5c]
mov dword [ecx], eax
mov dword [eax + 4], ecx
xor eax, eax
mov al, byte [esi + 0x25]
push eax
call dword [sym.imp.ntoskrnl.exe_IoReleaseCancelSpinLock]
xor dl, dl
mov ecx, esi
mov dword [esi + 0x18], 0xc0000120
call dword [sym.imp.ntoskrnl.exe_IofCompleteRequest]
pop esi
ret 8

Function at 0x106bc
Capabilities:
Create device object

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 0x1069a
lea eax, [ebp - 0xc]
xor edi, edi
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov esi, dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push edi
push edi
push 0x12
lea eax, [ebp - 0xc]
push eax
push edi
push esi
call dword [sym.imp.ntoskrnl.exe_IoCreateDevice]
mov ebx, eax
cmp ebx, edi
jl 0x10730
mov eax, 0x1035e
push edi
mov dword [esi + 0x70], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x80], eax
mov dword [esi + 0x38], eax
mov dword [esi + 0x34], 0x10300
call fcn.00011128
mov ebx, eax
cmp ebx, edi
jl 0x10727
mov dword [0x12808], edi
xor eax, eax
jmp 0x10732
push dword [esi + 4]
call dword [sym.imp.ntoskrnl.exe_IoDeleteDevice]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x10926
Capabilities:
Complete processing asynchronous io request

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_IoAcquireCancelSpinLock]
push edi
lea eax, [ebp - 4]
push eax
call esi
inc word [0x117a4]
jmp 0x109bc
mov eax, dword [ebx + 8]
mov eax, dword [eax + 4]
add ebx, 0xffffffa8
mov dword [ebp - 8], eax
mov eax, dword [ebx + 4]
xor edi, edi
cmp eax, edi
je 0x1098d
test byte [eax + 6], 5
je 0x10963
mov eax, dword [eax + 0xc]
jmp 0x10971
push 0x10
push edi
push edi
push 1
push edi
push eax
call dword [sym.imp.ntoskrnl.exe_MmMapLockedPagesSpecifyCache]
cmp eax, edi
je 0x1098d
mov ecx, dword [ebx + 0x1c]
lea edx, [ecx + eax + 3]
mov ecx, dword [ebp + 0xc]
and edx, 0xfffffffc
sub edx, eax
lea edi, [edx + ecx + 0xc]
cmp edi, dword [ebp - 8]
jb 0x109de
mov eax, dword [ebx + 0x58]
mov ecx, dword [ebx + 0x5c]
mov dword [ecx], eax
mov dword [eax + 4], ecx
xor eax, eax
lea ecx, [ebx + 0x38]
xchg dword [ecx], eax
and dword [ebx + 0x18], 0
push dword [ebp - 4]
call dword [sym.imp.ntoskrnl.exe_IoReleaseCancelSpinLock]
xor dl, dl
mov ecx, ebx
call dword [sym.imp.ntoskrnl.exe_IofCompleteRequest]
lea eax, [ebp - 4]
push eax
call esi
mov ebx, dword [0x117a8]
cmp ebx, 0x117a8
jne 0x10943
push dword [ebp - 4]
call dword [sym.imp.ntoskrnl.exe_IoReleaseCancelSpinLock]
pop edi
pop esi
pop ebx
leave
ret 0x10
mov esi, dword [ebp + 0x10]
add eax, edx
test esi, esi
je 0x109ec
mov esi, dword [esi + 8]
jmp 0x109ef
or esi, 0xffffffff
mov dword [eax], esi
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x109fd
mov esi, dword [esi + 8]
jmp 0x10a00
or esi, 0xffffffff
mov word [eax + 8], cx
mov dword [eax + 4], esi
mov si, word [0x117a4]
mov word [eax + 0xa], si
mov esi, dword [ebp + 8]
lea edi, [eax + 0xc]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [ebx + 0x58], 0x117a8
lea eax, [edx + eax + 0xc]
mov dword [ebx + 0x1c], eax
je 0x109ce
mov eax, dword [ebx + 0x58]
mov ecx, dword [ebx + 0x5c]
mov dword [ecx], eax
mov dword [eax + 4], ecx
xor eax, eax
lea ecx, [ebx + 0x38]
xchg dword [ecx], eax
and dword [ebx + 0x18], 0
push dword [ebp - 4]
call dword [sym.imp.ntoskrnl.exe_IoReleaseCancelSpinLock]
xor dl, dl
mov ecx, ebx
call dword [sym.imp.ntoskrnl.exe_IofCompleteRequest]
jmp 0x109d7
Function at 0x4010c0
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
lea ecx, [ebp - 0x38]
push esi
mov ebx, dword [ebp + 8]
push edi
push 0x32
push ecx
mov dword [ebx], 0
call sub.WSOCK32.dll_gethostname
test eax, eax
je 0x4010ed
call sub.WSOCK32.dll_WSAGetLastError
mov eax, 0x80004005
jmp 0x401116
lea eax, [ebp - 0x38]
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
jne 0x401106
call sub.WSOCK32.dll_WSAGetLastError
mov eax, 0x80004005
jmp 0x401116
mov eax, dword [eax + 0xc]
lea edi, [ebp - 4]
mov esi, dword [eax]
xor eax, eax
movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
mov dword [ebx], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401217
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
push dword [esp + 0x18]
push esi
mov edi, dword [0x407178]
mov eax, dword [esi]
and eax, 0xfffff
mov dword [esi], eax
or eax, 0xcab00000
mov dword [esi], eax
call fcn.00401208
add esp, 8
test edi, edi
je 0x40126c
mov ebx, dword [esp + 0x14]
push 0x10
mov eax, dword [0x406034]
push edi
push 0
push ebx
push esi
push eax
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x401265
call sub.WSOCK32.dll_WSAGetLastError
mov edi, dword [edi + 0x14]
test edi, edi
jne 0x401249
pop edi
pop esi
pop ebx
ret

Function at 0x401313
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
cmp eax, 1
mov eax, 0
adc eax, 0xffffffff
add esp, 0x190
and eax, 0x80004005
ret

Function at 0x40133f
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
xor edi, edi
push edi
push 2
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov esi, eax
je 0x4013ae
mov ax, word [ebp + 0xc]
push 0x10
mov word [ebp - 0x12], ax
lea ecx, [ebp - 0x14]
push ecx
mov dword [ebp - 0x10], edi
mov word [ebp - 0x14], 2
push esi
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x4013ae
cmp dword [ebp + 0x10], edi
je 0x4013a5
push 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 1
push eax
push 0x20
push 0xffff
push esi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x4013a5
call sub.WSOCK32.dll_WSAGetLastError
mov eax, dword [ebp + 8]
mov dword [eax], esi
xor eax, eax
jmp 0x4013c3
call sub.WSOCK32.dll_WSAGetLastError
cmp esi, 0xffffffff
je 0x4013be
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0x80004005
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4013ed
Capabilities:
Create thread

Disassembly:
sub esp, 4
push esi
push edi
call fcn.00401313
test eax, eax
jge 0x401402
mov eax, 0x80004005
jmp 0x40146c
push 1
xor edi, edi
push 0x8ba
push 0x406030
call fcn.0040133f
add esp, 0xc
mov esi, eax
test esi, esi
jl 0x401450
push edi
push edi
push 0x406034
call fcn.0040133f
add esp, 0xc
mov esi, eax
test esi, esi
jl 0x401450
lea eax, [esp + 8]
push eax
push edi
push edi
push 0x401270
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x401472
mov esi, 0x80004005
push 0x406030
call fcn.004013c9
add esp, 4
push 0x406034
call fcn.004013c9
add esp, 4
mov eax, esi
pop edi
pop esi
add esp, 4
ret
mov dword [0x407174], 1
xor eax, eax
jmp 0x40146c

Function at 0x4018fb
Capabilities:
Create thread

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
push 0x407150
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x40716c]
mov esi, dword [esp + 0x18]
cmp edx, ebx
je 0x401971
mov eax, dword [esi + 8]
cmp dword [edx + 4], eax
je 0x40192d
mov edx, dword [edx]
test edx, edx
jne 0x401920
jmp 0x401971
xor ebp, ebp
lea edi, [edx + 8]
mov eax, edi
mov ecx, dword [esi + 0x10]
cmp dword [eax], ecx
je 0x401946
add eax, 8
inc ebp
cmp ebp, 8
jl 0x401937
jmp 0x40194b
mov ebx, 1
test ebx, ebx
jne 0x401971
xor ebp, ebp
cmp dword [edi], 0
je 0x401961
add edi, 8
inc ebp
cmp ebp, 8
jl 0x401951
jmp 0x401971
mov ebx, 1
mov dword [edx + ebp*8 + 8], ecx
mov eax, dword [esi + 4]
mov dword [edx + ebp*8 + 0xc], eax
xor edi, edi
test ebx, ebx
jne 0x4019c3
push 0x48
call fcn.0040211a
add esp, 4
test eax, eax
je 0x4019c3
mov ecx, dword [0x40716c]
mov dword [eax], ecx
mov dword [0x40716c], eax
mov edx, dword [esi + 8]
mov dword [eax + 4], edx
lea edx, [esp + 0x10]
mov ebx, dword [esi + 0x10]
push edx
push edi
mov dword [eax + 8], ebx
mov ecx, dword [esi + 4]
push eax
push 0x401619
mov dword [eax + 0xc], ecx
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4019c3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x407150
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x402189
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov eax, dword [esp + 8]
mov ebp, esp
push esi
push edi
mov esi, dword [eax*4 + 0x403202]
xor edi, edi
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi]
movsx edx, byte [ecx]
test edx, edx
jle 0x4021b7
mov ecx, dword [esi]
inc edi
mov cl, byte [ecx + edi]
xor cl, 0x42
mov byte [eax], cl
inc eax
cmp edi, edx
jl 0x4021a7
pop edi
mov byte [eax], 0
mov eax, dword [ebp + 0x10]
pop esi
pop ebp
mov dword [eax], edx
ret

Function at 0x403680
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x401020
push 0x4034f0
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x406228], eax
xor eax, eax
mov al, byte [0x406229]
mov dword [0x406234], eax
mov eax, dword [0x406228]
shr dword [0x406228], 0x10
and eax, 0xff
mov dword [0x406230], eax
shl eax, 8
add eax, dword [0x406234]
mov dword [0x40622c], eax
call fcn.004048f0
call fcn.00404800
test eax, eax
jne 0x4036f9
push 0x10
call fcn.00403820
add esp, 4
mov dword [ebp - 4], 0
call fcn.00404620
call fcn.00404610
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4082ac], eax
call fcn.00404160
mov dword [0x406130], eax
test eax, eax
je 0x40372c
cmp dword [0x4082ac], 0
jne 0x403736
push 0xffffffffffffffff
call fcn.00403b10
add esp, 4
call fcn.00403ee0
call fcn.00403e00
call fcn.00403ae0
mov esi, dword [0x4082ac]
mov al, byte [esi]
cmp al, 0x22
je 0x40375d
cmp al, 0x20
jbe 0x40378a
inc esi
cmp byte [esi], 0x20
ja 0x403755
jmp 0x40378a
inc esi
cmp byte [esi], 0x22
je 0x403789
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x403784
xor eax, eax
mov al, bl
push eax
call fcn.00403da0
add esp, 4
test eax, eax
je 0x40377e
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x403766
cmp byte [esi], 0x22
jne 0x40378a
inc esi
cmp byte [esi], 0
je 0x40379a
cmp byte [esi], 0x20
ja 0x40379a
inc esi
cmp byte [esi], 0
jne 0x40378f
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x4037be
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.00403b10
jmp 0x4037ff
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403b50
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
call fcn.00403be0
mov dword [0x406260], 1
cmp dword [esp + 0x10], 0
mov ebx, dword [esp + 0x14]
mov byte [0x40625c], bl
jne 0x403bb1
cmp dword [0x4082a8], 0
je 0x403b9f
mov esi, dword [0x4082a0]
sub esi, 4
cmp esi, dword [0x4082a8]
jb 0x403b9f
mov eax, dword [esi]
test eax, eax
je 0x403b94
call eax
sub esi, 4
cmp esi, dword [0x4082a8]
jae 0x403b8c
push 0x40601c
push 0x406014
call fcn.00403c00
add esp, 8
push 0x406024
push 0x406020
call fcn.00403c00
add esp, 8
test ebx, ebx
je 0x403bcf
call fcn.00403bf0
pop esi
pop ebx
ret
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x404160
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
cmp dword [0x4062f4], 0
push ebx
push esi
push edi
push ebp
jne 0x4041b0
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
call esi
mov edi, eax
test edi, edi
je 0x40418e
mov dword [0x4062f4], 1
mov ebx, dword [esp + 0x10]
jmp 0x4041be
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x4041a6
mov dword [0x4062f4], 2
jmp 0x4041be
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x4062f4], 1
jne 0x40426d
test edi, edi
jne 0x4041e1
call esi
mov edi, eax
test edi, edi
jne 0x4041e1
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x4041fb
add esi, 2
cmp word [esi], 0
jne 0x4041e9
add esi, 2
cmp word [esi], 0
jne 0x4041e9
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x40425c
push ebp
call fcn.00404b60
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x40425c
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40424b
push ebx
call fcn.00404b40
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x4062f4], 2
jne 0x4042f1
test ebx, ebx
jne 0x404290
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x404290
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x4042a5
inc ebp
cmp byte [ebp], 0
jne 0x404297
inc ebp
cmp byte [ebp], 0
jne 0x404297
sub ebp, ebx
inc ebp
push ebp
call fcn.00404b60
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x4042ca
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x404800
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.00403850
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x406534], eax
cmp eax, 0xffffffff
jne 0x40481a
xor eax, eax
pop esi
ret
push 0x74
push 1
call fcn.00404fd0
add esp, 8
mov esi, eax
test esi, esi
je 0x40485c
push esi
mov eax, dword [0x406534]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40485c
push esi
call fcn.00404860
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov eax, 1
mov dword [esi + 4], 0xffffffff
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x404880
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x406534]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x4048e3
push 0x74
push 1
call fcn.00404fd0
add esp, 8
mov edi, eax
test edi, edi
je 0x4048d9
push edi
mov eax, dword [0x406534]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4048d9
push edi
call fcn.00404860
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi], eax
mov dword [edi + 4], 0xffffffff
jmp 0x4048e3
push 0x10
call fcn.00403820
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
ret
Function at 0x404950
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor eax, eax
mov ecx, 0x4067a0
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [ecx], edx
je 0x404978
add ecx, 8
inc eax
cmp ecx, 0x406828
jb 0x404968
cmp dword [eax*8 + 0x4067a0], edx
lea ebx, [eax*8]
jne 0x404b33
cmp dword [0x40613c], 1
je 0x404af8
cmp dword [0x40613c], 0
jne 0x4049af
cmp dword [0x406140], 1
je 0x404af8
cmp edx, 0xfc
je 0x404b33
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x4049ec
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x404a30
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x406874
push ebp
call fcn.004050d0
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406854
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x4067a4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00405030
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x4081a0]
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x404b0f
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x4067a4]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x405660
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x418
push ebx
push esi
push edi
push ebp
xor edi, edi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], edi
cmp ebp, edi
jne 0x405688
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov edx, dword [esp + 0x42c]
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x4081a0
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ebx, dword [esp + 0x18]
shl eax, 2
lea ecx, [eax + eax*8]
mov eax, dword [ebx]
mov dword [esp + 0x1c], ecx
test byte [eax + ecx + 4], 0x20
je 0x4056c9
push 2
push 0
push edx
call fcn.00405d60
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x405765
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40579e
lea esi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40572c
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x40571a
mov byte [esi], 0xd
inc edi
inc esi
mov byte [esi], al
inc esi
mov eax, esi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x405701
lea eax, [esp + 0x24]
push 0
sub esi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push esi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405794
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, esi
jge 0x4056ec
jmp 0x40579e
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405794
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x40579e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x40584a
cmp dword [esp + 0x10], 0
je 0x4057fa
cmp dword [esp + 0x10], 5
jne 0x4057dd
call fcn.00405bb0
mov dword [eax], 9
call fcn.00405bc0
mov ecx, dword [esp + 0x10]
pop ebp
pop edi
mov dword [eax], ecx
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00405b30
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x405824
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x405824
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
call fcn.00405bb0
mov dword [eax], 0x1c
call fcn.00405bc0
pop ebp
mov dword [eax], 0
mov eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, edi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x401afb
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x50
push ebp
lea eax, [esp + 0x28]
push edi
push eax
call fcn.00401cab
mov ecx, dword [esp + 0x5c]
xor edx, edx
xor ebp, ebp
mov dword [esp + 0xc], 1
mov edi, dword [ecx]
mov dword [esp + 0x10], 8
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], 4
mov dx, word [edi + 0x14]
cmp word [edi + 6], bp
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x20], 0x80
mov dword [esp + 0x24], 0x20
mov dword [esp + 0x28], 0x40
lea eax, [edx + edi + 0x18]
jbe 0x401bf9
push ebx
push esi
lea ebx, [eax + 0x24]
mov eax, dword [ebx]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x401b9c
mov eax, dword [ebx - 0x14]
mov ecx, dword [ebx - 0x1c]
push 0x4000
push eax
push ecx
call dword [esp + 0x4c]
jmp 0x401bdf
lea edx, [edx + ecx*2]
test eax, 0x4000000
lea ecx, [esi + edx*2]
mov esi, dword [esp + ecx*4 + 0x14]
je 0x401bb3
or esi, 0x200
mov edx, dword [ebx - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x401bce
test al, 0x40
je 0x401bc5
mov ecx, dword [edi + 0x20]
jmp 0x401bcc
test al, 0x80
je 0x401bdf
mov ecx, dword [edi + 0x24]
test ecx, ecx
jbe 0x401bdf
mov ecx, dword [ebx - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [esp + 0x44]
mov edx, dword [esp + 0x64]
xor eax, eax
inc ebp
add ebx, 0x28
mov edi, dword [edx]
mov ax, word [edi + 6]
cmp ebp, eax
jl 0x401b6b
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x50
ret