joyce8/EMBER2024-capa huggingface dataset:
Function at 0x499000
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push esi
push edi
mov edi, eax
mov eax, 0x12345678
mov edx, 0x23456789
mov esi, 0x34567890
mov dword [0x500790], eax
mov dword [0x500794], edx
mov dword [0x500798], esi
mov cl, byte [edi]
test cl, cl
je 0x499080
lea ebx, [ebx]
movsx ecx, cl
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x4c6a28]
inc edi
movzx ecx, al
add ecx, edx
imul ecx, ecx, 0x8088405
inc ecx
mov edx, ecx
shr ecx, 0x18
xor ecx, esi
and ecx, 0xff
shr esi, 8
xor esi, dword [ecx*4 + 0x4c6a28]
mov dword [0x500790], eax
mov dword [0x500794], edx
mov dword [0x500798], esi
mov cl, byte [edi]
test cl, cl
jne 0x499030
pop edi
pop esi
ret

Function at 0x499090
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
sub esp, 0x10
mov eax, dword [0x4c0390]
xor eax, esp
mov dword [esp + 0xc], eax
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
mov eax, esi
call fcn.00499000
push 0xa
lea eax, [esp + 0x14]
push eax
call fcn.0041ffa0
mov eax, esi
call fcn.00499000
xor edi, edi
jmp 0x4990d0
movzx ebp, byte [esp + edi + 0x10]
mov esi, dword [0x500790]
mov ecx, dword [0x500798]
mov eax, ebp
xor eax, esi
and eax, 0xff
shr esi, 8
xor esi, dword [eax*4 + 0x4c6a28]
mov edx, ecx
mov eax, esi
mov dword [0x500790], eax
movzx eax, al
add eax, dword [0x500794]
and edx, 0xfffd
imul eax, eax, 0x8088405
inc eax
mov dword [0x500794], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x4c6a28]
or edx, 2
mov dword [0x500798], ecx
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
and ecx, 0xff
xor ecx, ebp
push ebx
push ecx
call fcn.004a1cd5
inc edi
add esp, 8
cmp edi, 0xa
jl 0x4990d0
mov esi, dword [esp + 0x28]
mov edi, dword [0x500790]
mov ebp, esi
mov ecx, dword [0x500798]
shr ebp, 0x10
mov eax, ebp
xor eax, edi
and eax, 0xff
shr edi, 8
xor edi, dword [eax*4 + 0x4c6a28]
mov edx, ecx
mov eax, edi
mov dword [0x500790], eax
movzx eax, al
add eax, dword [0x500794]
and edx, 0xfffd
imul eax, eax, 0x8088405
inc eax
mov dword [0x500794], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x4c6a28]
or edx, 2
mov dword [0x500798], ecx
mov ecx, edx
xor ecx, 1
imul ecx, edx
mov edx, esi
shr edx, 8
xor ecx, edx
shr ecx, 8
and ecx, 0xff
push ebx
push ecx
call fcn.004a1cd5
mov edi, dword [0x500790]
mov ecx, dword [0x500798]
shr esi, 0x18
xor esi, edi
and esi, 0xff
shr edi, 8
xor edi, dword [esi*4 + 0x4c6a28]
mov edx, ecx
mov eax, edi
mov dword [0x500790], eax
movzx eax, al
add eax, dword [0x500794]
and edx, 0xfffd
imul eax, eax, 0x8088405
inc eax
mov dword [0x500794], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
or edx, 2
shr ecx, 8
xor ecx, dword [eax*4 + 0x4c6a28]
mov eax, edx
xor eax, 1
imul eax, edx
and eax, 0xff00
xor eax, ebp
shr eax, 8
push ebx
push eax
mov dword [0x500798], ecx
call fcn.004a1cd5
mov ecx, dword [esp + 0x2c]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0049dea6
add esp, 0x10
ret 0xc
Function at 0x499280
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Write file on windows

Disassembly:
cmp byte [0x4e52b8], 0
push ebp
mov ebp, dword [esp + 0x10]
je 0x49931b
push ebx
mov ebx, dword [esp + 0x10]
imul ebx, ebp
push edi
mov edi, dword [esp + 0x10]
test ebx, ebx
je 0x499319
push esi
movsx eax, byte [edi]
mov esi, dword [0x500790]
xor eax, esi
and eax, 0xff
mov ecx, dword [0x500798]
shr esi, 8
xor esi, dword [eax*4 + 0x4c6a28]
mov edx, ecx
mov eax, esi
mov dword [0x500790], eax
movzx eax, al
add eax, dword [0x500794]
and edx, 0xfffd
imul eax, eax, 0x8088405
inc eax
mov dword [0x500794], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x4c6a28]
or edx, 2
mov dword [0x500798], ecx
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
xor byte [edi], cl
inc edi
sub ebx, 1
jne 0x4992a4
pop esi
pop edi
pop ebx
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
push edx
push ebp
push eax
push ecx
call fcn.0049f602
add esp, 0x10
pop ebp
ret 0x10
Function at 0x49ba10
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x404
mov eax, dword [0x4c0390]
xor eax, esp
mov dword [esp + 0x400], eax
push esi
mov esi, dword [esp + 0x40c]
push edi
mov edi, dword [esp + 0x414]
push edi
push 0x50
call fcn.004a1cd5
push edi
push 0x4b
call fcn.004a1cd5
push edi
push 3
call fcn.004a1cd5
push edi
push 4
call fcn.004a1cd5
movsx eax, byte [esi + 2]
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 3]
push edi
push ecx
call fcn.004a1cd5
movsx edx, byte [esi + 0x2c]
push edi
push edx
call fcn.004a1cd5
movsx eax, byte [esi + 0x2d]
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 6]
add esp, 0x40
push edi
push ecx
call fcn.004a1cd5
movsx edx, byte [esi + 7]
push edi
push edx
call fcn.004a1cd5
movsx eax, byte [esi + 8]
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 9]
push edi
push ecx
call fcn.004a1cd5
movsx edx, byte [esi + 0xa]
push edi
push edx
call fcn.004a1cd5
movsx eax, byte [esi + 0xb]
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 0xc]
push edi
push ecx
call fcn.004a1cd5
movsx edx, byte [esi + 0xd]
push edi
push edx
call fcn.004a1cd5
movsx eax, byte [esi + 0xe]
add esp, 0x40
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 0xf]
push edi
push ecx
call fcn.004a1cd5
movsx edx, byte [esi + 0x10]
push edi
push edx
call fcn.004a1cd5
movsx eax, byte [esi + 0x11]
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 0x12]
push edi
push ecx
call fcn.004a1cd5
movsx edx, byte [esi + 0x13]
push edi
push edx
call fcn.004a1cd5
movsx eax, byte [esi + 0x14]
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 0x15]
push edi
push ecx
call fcn.004a1cd5
movsx edx, byte [esi + 0x16]
add esp, 0x40
push edi
push edx
call fcn.004a1cd5
movsx eax, byte [esi + 0x17]
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 0x18]
push edi
push ecx
call fcn.004a1cd5
mov edx, dword [esi + 0x18]
shr edx, 8
movsx eax, dl
push edi
push eax
call fcn.004a1cd5
movsx ecx, byte [esi + 0x1c]
push edi
push ecx
call fcn.004a1cd5
mov edx, dword [esi + 0x1c]
shr edx, 8
movsx eax, dl
push edi
push eax
call fcn.004a1cd5
mov edx, dword [esi + 0x48]
add esp, 0x30
push 0x400
lea ecx, [esp + 0xc]
push ecx
push edx
call fcn.0044e7e0
mov eax, dword [esi + 0x18]
push edi
push eax
lea ecx, [esp + 0x10]
push 1
push ecx
call fcn.0049f602
add esp, 0x10
cmp eax, dword [esi + 0x18]
jne 0x49bbd4
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x49bbd0
mov edx, dword [esi + 0x3c]
push edi
push eax
push 1
push edx
call fcn.0049f602
add esp, 0x10
cmp eax, dword [esi + 0x1c]
jne 0x49bbd4
xor eax, eax
jmp 0x49bbd9
mov eax, 0xa
mov ecx, dword [esp + 0x408]
pop edi
pop esi
xor ecx, esp
call fcn.0049dea6
add esp, 0x404
ret 8
Function at 0x49bf80
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0x20]
push edi
push esi
push 0x50
call fcn.004a1cd5
push esi
push 0x4b
call fcn.004a1cd5
push esi
push 5
call fcn.004a1cd5
push esi
push 6
call fcn.004a1cd5
push esi
push 0
call fcn.004a1cd5
push esi
push 0
call fcn.004a1cd5
push esi
push 0
call fcn.004a1cd5
push esi
push 0
call fcn.004a1cd5
mov ebx, dword [esp + 0x50]
add esp, 0x40
movsx edi, bl
push esi
push edi
call fcn.004a1cd5
sar ebx, 8
movsx ebx, bl
push esi
push ebx
call fcn.004a1cd5
push esi
push edi
call fcn.004a1cd5
push esi
push ebx
call fcn.004a1cd5
mov ebx, dword [esp + 0x34]
movsx eax, bl
push esi
push eax
call fcn.004a1cd5
mov ecx, ebx
shr ecx, 8
movsx edx, cl
push esi
push edx
call fcn.004a1cd5
mov eax, ebx
shr eax, 0x10
movsx ecx, al
push esi
push ecx
call fcn.004a1cd5
shr ebx, 0x18
movsx edx, bl
push esi
push edx
call fcn.004a1cd5
mov ebx, dword [esp + 0x58]
add esp, 0x40
movsx eax, bl
push esi
push eax
call fcn.004a1cd5
mov ecx, ebx
shr ecx, 8
movsx edx, cl
push esi
push edx
call fcn.004a1cd5
push esi
mov eax, ebx
shr eax, 0x10
movsx ecx, al
push ecx
call fcn.004a1cd5
shr ebx, 0x18
movsx edx, bl
push esi
push edx
call fcn.004a1cd5
mov ebx, dword [esp + 0x3c]
movsx eax, bl
push esi
push eax
call fcn.004a1cd5
mov ecx, ebx
shr ecx, 8
movsx edx, cl
push esi
push edx
call fcn.004a1cd5
add esp, 0x30
test ebx, ebx
je 0x49c0ac
mov eax, dword [esp + 0x20]
push esi
push ebx
push 1
push eax
call fcn.0049f602
add esp, 0x10
cmp eax, ebx
je 0x49c0ac
pop edi
pop esi
mov eax, 0xa
pop ebx
ret 0x18
pop edi
pop esi
xor eax, eax
pop ebx
ret 0x18
Function at 0x49dea6
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4c0390]
jne 0x49deb0
repz ret
jmp fcn.004a2dcd

Function at 0x49ef88
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp edi, ebx
jne 0x49efba
call fcn.004a207a
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
call fcn.004a3b25
add esp, 0x14
or eax, 0xffffffff
jmp 0x49f03b
push esi
call fcn.004a4e3e
push 0x214
push 1
call fcn.004a6a7a
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x49f01e
call fcn.004a5024
push dword [eax + 0x6c]
push esi
call fcn.004a4ec6
mov eax, dword [ebp + 0x10]
pop ecx
pop ecx
push esi
push 4
push esi
push 0x49ef14
push dword [ebp + 0xc]
mov dword [esi + 0x54], edi
push ebx
mov dword [esi + 0x58], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
mov dword [esi + 4], edi
cmp edi, ebx
je 0x49f015
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x49f038
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
push esi
call fcn.0049dbfd
pop ecx
cmp dword [ebp - 4], ebx
je 0x49f033
push dword [ebp - 4]
call fcn.004a20a0
pop ecx
or eax, 0xffffffff
jmp 0x49f03a
mov eax, edi
pop esi
pop edi
pop ebx
leave
ret
Function at 0x49f75b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0x10], edi
je 0x49f798
cmp dword [ebp + 0x14], edi
je 0x49f798
cmp ecx, edi
jne 0x49f79f
call fcn.004a207a
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.004a3b25
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x49f7b3
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x49f7d4
cmp ebx, 0xffffffff
je 0x49f7c3
push ebx
push edi
push ecx
call fcn.0049e460
add esp, 0xc
cmp esi, edi
je 0x49f780
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x49f780
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test dword [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x49f7f1
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x49f7f8
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x49f8ea
test dword [esi + 0xc], 0x10c
je 0x49f84d
mov eax, dword [esi + 4]
test eax, eax
je 0x49f84d
jl 0x49f94b
mov edi, ebx
cmp ebx, eax
jb 0x49f81e
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x49f8f2
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.004a8157
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x49f8e2
cmp ebx, dword [ebp - 0xc]
jb 0x49f8ba
cmp dword [ebp - 0xc], 0
je 0x49f877
mov ecx, 0x7fffffff
xor edx, edx
cmp ebx, ecx
jbe 0x49f86c
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x49f873
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x49f882
mov eax, 0x7fffffff
cmp ebx, eax
ja 0x49f882
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x49f91e
push eax
push dword [ebp - 8]
push esi
call fcn.004a6e17
pop ecx
push eax
call fcn.004a805a
add esp, 0xc
test eax, eax
je 0x49f95d
cmp eax, 0xffffffff
je 0x49f94b
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x49f8e2
push esi
call fcn.004a7974
pop ecx
cmp eax, 0xffffffff
je 0x49f94f
cmp dword [ebp - 4], 0
je 0x49f91e
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x49f800
mov eax, dword [ebp + 0x14]
jmp 0x49f79a
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x49f909
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.0049e460
add esp, 0xc
call fcn.004a207a
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x49f790
cmp dword [ebp + 0xc], 0xffffffff
je 0x49f934
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.0049e460
add esp, 0xc
call fcn.004a207a
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x49f790
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x49f79a
or dword [esi + 0xc], 0x10
jmp 0x49f94f
Function at 0x4a3a1e
Capabilities:
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x2a8]
sub esp, 0x328
mov eax, dword [0x4c0390]
xor eax, ebp
mov dword [ebp + 0x2a4], eax
and dword [ebp - 0x80], 0
push ebx
push 0x4c
lea eax, [ebp - 0x7c]
push 0
push eax
call fcn.0049e460
lea eax, [ebp - 0x80]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28]
add esp, 0xc
mov dword [ebp - 0x2c], eax
mov dword [ebp + 0x88], eax
mov dword [ebp + 0x84], ecx
mov dword [ebp + 0x80], edx
mov dword [ebp + 0x7c], ebx
mov dword [ebp + 0x78], esi
mov dword [ebp + 0x74], edi
mov word [ebp + 0xa0], ss
mov word [ebp + 0x94], cs
mov word [ebp + 0x70], ds
mov word [ebp + 0x6c], es
mov word [ebp + 0x68], fs
mov word [ebp + 0x64], gs
pushfd
pop dword [ebp + 0x98]
mov eax, dword [ebp + 0x2ac]
lea ecx, [ebp + 0x2ac]
mov dword [ebp - 0x28], 0x10001
mov dword [ebp + 0x90], eax
mov dword [ebp + 0x9c], ecx
mov ecx, dword [ecx - 4]
mov dword [ebp + 0x8c], ecx
mov dword [ebp - 0x80], 0xc0000417
mov dword [ebp - 0x7c], 1
mov dword [ebp - 0x74], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
test eax, eax
jne 0x4a3afd
test ebx, ebx
jne 0x4a3afd
push 2
call fcn.004a942d
pop ecx
push 0xc0000417
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp + 0x2a4]
xor ecx, ebp
pop ebx
call fcn.0049dea6
add ebp, 0x2a8
leave
ret

Function at 0x4a3b25
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push dword [0x5010a4]
call fcn.004a4dab
pop ecx
test eax, eax
je 0x4a3b3b
pop ebp
jmp eax
push 2
call fcn.004a942d
pop ecx
pop ebp
jmp fcn.004a3a1e
Function at 0x4a3ea1
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4c0930]
je 0x4a3ebc
inc edi
cmp edi, 0x17
jb 0x4a3ead
cmp edi, 0x17
jae 0x4a403c
push ebp
push 3
call fcn.004a9d6e
pop ecx
cmp eax, 1
je 0x4a4008
push 3
call fcn.004a9d6e
pop ecx
test eax, eax
jne 0x4a3ef0
cmp dword [0x4c0680], 1
je 0x4a4008
cmp ebx, 0xfc
je 0x4a403b
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x5010e0
push ebp
call fcn.004a88a0
add esp, 0xc
test eax, eax
je 0x4a3f26
push esi
push esi
push esi
push esi
push esi
call fcn.004a3a1e
add esp, 0x14
push 0x104
mov esi, 0x5010f9
push esi
push 0
mov byte [0x5011fd], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4a3f6a
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004a88a0
add esp, 0xc
test eax, eax
je 0x4a3f6a
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004a3a1e
add esp, 0x14
push esi
call fcn.004a8780
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4a3faf
push esi
call fcn.004a8780
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x5013f4
push 0x4b3788
sub ecx, eax
push ecx
push eax
call fcn.004a9cbb
add esp, 0x14
test eax, eax
je 0x4a3faf
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.004a3a1e
add esp, 0x14
jmp 0x4a3fb1
xor esi, esi
push 0x4b63a8
push ebx
push ebp
call fcn.004a9c4a
add esp, 0xc
test eax, eax
je 0x4a3fd1
push esi
push esi
push esi
push esi
push esi
call fcn.004a3a1e
add esp, 0x14
push dword [edi*8 + 0x4c0934]
push ebx
push ebp
call fcn.004a9c4a
add esp, 0xc
test eax, eax
je 0x4a3ff3
push esi
push esi
push esi
push esi
push esi
call fcn.004a3a1e
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004a9ae3
add esp, 0xc
jmp 0x4a403b
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4a403b
cmp ebp, 0xffffffff
je 0x4a403b
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4c0934]
push dword [esi]
call fcn.004a8780
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4a51d4
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
push edi
mov esi, str.KERNEL32.DLL
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x4a51ed
push esi
call fcn.004a3b49
pop ecx
mov edi, eax
test edi, edi
je 0x4a5355
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.FlsAlloc
push edi
call esi
push str.FlsGetValue
push edi
mov dword [0x5013f4], eax
call esi
push str.FlsSetValue
push edi
mov dword [0x5013f8], eax
call esi
push str.FlsFree
push edi
mov dword [0x5013fc], eax
call esi
cmp dword [0x5013f4], 0
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x501400], eax
je 0x4a5256
cmp dword [0x5013f8], 0
je 0x4a5256
cmp dword [0x5013fc], 0
je 0x4a5256
test eax, eax
jne 0x4a527a
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [0x5013f8], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [0x5013f4], 0x4a4e1a
mov dword [0x5013fc], esi
mov dword [0x501400], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x4c0a10], eax
cmp eax, 0xffffffff
je 0x4a535a
push dword [0x5013f8]
push eax
call esi
test eax, eax
je 0x4a535a
call fcn.004a3e55
push dword [0x5013f4]
call fcn.004a4d33
push dword [0x5013f8]
mov dword [0x5013f4], eax
call fcn.004a4d33
push dword [0x5013fc]
mov dword [0x5013f8], eax
call fcn.004a4d33
push dword [0x501400]
mov dword [0x5013fc], eax
call fcn.004a4d33
add esp, 0x10
mov dword [0x501400], eax
call fcn.004a20e8
test eax, eax
je 0x4a5355
push fcn.004a503c
push dword [0x5013f4]
call fcn.004a4dab
pop ecx
call eax
mov dword [0x4c0a0c], eax
cmp eax, 0xffffffff
je 0x4a5355
push 0x214
push 1
call fcn.004a6a7a
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4a5355
push esi
push dword [0x4c0a0c]
push dword [0x5013fc]
call fcn.004a4dab
pop ecx
call eax
test eax, eax
je 0x4a5355
push 0
push esi
call fcn.004a4ec6
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
xor eax, eax
inc eax
jmp 0x4a535c
call fcn.004a4e89
xor eax, eax
pop edi
pop esi
ret

Function at 0x4a67b0
Capabilities:
Parse pe header

Disassembly:
mov ecx, dword [esp + 4]
mov eax, 0x5a4d
cmp word [ecx], ax
je 0x4a67c1
xor eax, eax
ret
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4a67be
xor edx, edx
mov ecx, 0x10b
cmp word [eax + 0x18], cx
sete dl
mov eax, edx
ret

Function at 0x4a67e0
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
push ebx
push esi
movzx esi, word [ecx + 6]
xor edx, edx
push edi
lea eax, [eax + ecx + 0x18]
test esi, esi
jbe 0x4a681a
mov edi, dword [esp + 0x14]
mov ecx, dword [eax + 0xc]
cmp edi, ecx
jb 0x4a6812
mov ebx, dword [eax + 8]
add ebx, ecx
cmp edi, ebx
jb 0x4a681c
inc edx
add eax, 0x28
cmp edx, esi
jb 0x4a6802
xor eax, eax
pop edi
pop esi
pop ebx
ret
Function at 0x4a7974
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
xor edi, edi
cmp esi, edi
jne 0x4a799d
call fcn.004a207a
push edi
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
call fcn.004a3b25
add esp, 0x14
jmp 0x4a7a94
mov eax, dword [esi + 0xc]
test al, 0x83
je 0x4a7a94
test al, 0x40
jne 0x4a7a94
test al, 2
je 0x4a79bf
or eax, 0x20
mov dword [esi + 0xc], eax
jmp 0x4a7a94
or eax, 1
mov dword [esi + 0xc], eax
test eax, 0x10c
jne 0x4a79d5
push esi
call fcn.004a95d1
pop ecx
jmp 0x4a79da
mov eax, dword [esi + 8]
mov dword [esi], eax
push dword [esi + 0x18]
push dword [esi + 8]
push esi
call fcn.004a6e17
pop ecx
push eax
call fcn.004a805a
add esp, 0xc
mov dword [esi + 4], eax
cmp eax, edi
je 0x4a7a84
cmp eax, 0xffffffff
je 0x4a7a84
test byte [esi + 0xc], 0x82
jne 0x4a7a59
push esi
call fcn.004a6e17
pop ecx
cmp eax, 0xffffffff
je 0x4a7a44
push esi
call fcn.004a6e17
pop ecx
cmp eax, 0xfffffffe
je 0x4a7a44
push esi
call fcn.004a6e17
sar eax, 5
push esi
lea edi, [eax*4 + 0x5016e0]
call fcn.004a6e17
and eax, 0x1f
pop ecx
shl eax, 6
add eax, dword [edi]
pop ecx
jmp 0x4a7a49
mov eax, 0x4c1150
mov al, byte [eax + 4]
and al, 0x82
cmp al, 0x82
jne 0x4a7a59
or dword [esi + 0xc], 0x2000
cmp dword [esi + 0x18], 0x200
jne 0x4a7a77
mov eax, dword [esi + 0xc]
test al, 8
je 0x4a7a77
test eax, 0x400
jne 0x4a7a77
mov dword [esi + 0x18], 0x1000
mov ecx, dword [esi]
dec dword [esi + 4]
movzx eax, byte [ecx]
inc ecx
mov dword [esi], ecx
jmp 0x4a7a97
neg eax
sbb eax, eax
and eax, 0x10
add eax, 0x10
or dword [esi + 0xc], eax
mov dword [esi + 4], edi
or eax, 0xffffffff
pop edi
pop esi
ret
Function at 0x4a9218
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x501570]
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebx, ebx
xor esi, esi
push 2
pop ebp
cmp eax, ebx
jne 0x4a9261
call edi
mov esi, eax
cmp esi, ebx
je 0x4a9248
mov dword [0x501570], 1
jmp 0x4a926a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4a925c
mov eax, ebp
mov dword [0x501570], eax
jmp 0x4a9261
mov eax, dword [0x501570]
cmp eax, 1
jne 0x4a92ee
cmp esi, ebx
jne 0x4a927d
call edi
mov esi, eax
cmp esi, ebx
jne 0x4a927d
xor eax, eax
jmp 0x4a9346
mov eax, esi
cmp word [esi], bx
je 0x4a9292
add eax, ebp
cmp word [eax], bx
jne 0x4a9284
add eax, ebp
cmp word [eax], bx
jne 0x4a9284
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
sub eax, esi
push ebx
sar eax, 1
inc eax
push eax
push esi
push ebx
push ebx
mov dword [esp + 0x34], eax
call edi
mov ebp, eax
cmp ebp, ebx
je 0x4a92e3
push ebp
call fcn.004a6a3a
pop ecx
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x4a92e3
push ebx
push ebx
push ebp
push eax
push dword [esp + 0x24]
push esi
push ebx
push ebx
call edi
test eax, eax
jne 0x4a92df
push dword [esp + 0x10]
call fcn.0049dbfd
pop ecx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
jmp 0x4a9346
cmp eax, ebp
je 0x4a92f6
cmp eax, ebx
jne 0x4a9276
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
je 0x4a9276
cmp byte [esi], bl
je 0x4a9314
inc eax
cmp byte [eax], bl
jne 0x4a930a
inc eax
cmp byte [eax], bl
jne 0x4a930a
sub eax, esi
inc eax
mov ebp, eax
push ebp
call fcn.004a6a3a
mov edi, eax
pop ecx
cmp edi, ebx
jne 0x4a9332
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x4a9276
push ebp
push esi
push edi
call fcn.0049e4e0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret