joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4819b7
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4e44b4]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x4819e8
xor eax, eax
jmp 0x481b71
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x5076a0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x481a24
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00485e77
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x481aff
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x481b3d
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x481a88
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x481a79
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x481a59
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x481ac8
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x481ad1
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x481a4a
jmp 0x481ad3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x481b6c
cmp dword [ebp - 0x6c], edi
je 0x481b3d
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x481b32
call fcn.00478282
mov dword [eax], 9
call fcn.0047828b
mov dword [eax], esi
jmp 0x481b67
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x481b27
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x481ad3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x481ad3
push dword [ebp - 0x6c]
call fcn.00478294
pop ecx
jmp 0x481b67
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x481b55
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x481b55
xor eax, eax
jmp 0x481b6f
call fcn.00478282
mov dword [eax], 0x1c
call fcn.0047828b
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x481b6f
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0047fdf9
add ebp, 0x3a0
leave
ret
Function at 0x481cec
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x481ec0
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x5076a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x481ec0
test cl, 0x48
je 0x481d57
cmp byte [eax + 5], 0xa
je 0x481d57
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x481da9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x481d91
call fcn.00478282
mov dword [eax], 9
call fcn.0047828b
mov dword [eax], esi
jmp 0x481da1
cmp eax, 0x6d
je 0x481ec0
push eax
call fcn.00478294
pop ecx
or eax, 0xffffffff
jmp 0x481ec2
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x481ebb
test eax, eax
je 0x481dd0
cmp byte [ebx], 0xa
jne 0x481dd0
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x481dd9
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x481eb5
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x481ea5
cmp al, 0xd
je 0x481e0b
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x481e97
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x481e25
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x481e20
add dword [ebp + 0x10], 2
jmp 0x481e79
mov dword [ebp + 0x10], eax
jmp 0x481e93
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x481e4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x481e93
cmp dword [ebp - 0xc], 0
je 0x481e93
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x481e6e
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x481e79
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x481e96
cmp ebx, dword [ebp + 0xc]
jne 0x481e7e
cmp byte [ebp - 1], 0xa
jne 0x481e7e
mov byte [ebx], 0xa
jmp 0x481e96
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00482e88
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x481e97
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x481def
jmp 0x481eb5
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x481eb5
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x481ec2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x483c02
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x503b40], ebx
push esi
push edi
jne 0x483c82
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x483cbd
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4c6e5c
push edi
call esi
test eax, eax
mov dword [0x503b40], eax
je 0x483cbd
push 0x4c6e4c
push edi
call esi
push 0x4c6e38
push edi
mov dword [0x503b44], eax
call esi
cmp dword [0x503768], 2
mov dword [0x503b48], eax
jne 0x483c82
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x503b50], eax
je 0x483c82
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x503b4c], eax
mov eax, dword [0x503b4c]
test eax, eax
je 0x483cc7
call eax
test eax, eax
je 0x483cae
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x503b50]
test eax, eax
je 0x483cae
test byte [ebp - 8], 1
jne 0x483cc7
cmp dword [0x503774], 4
jb 0x483cc1
or byte [ebp + 0x12], 0x20
jmp 0x483ce6
xor eax, eax
jmp 0x483cf6
or byte [ebp + 0x12], 4
jmp 0x483ce6
mov eax, dword [0x503b44]
test eax, eax
je 0x483ce6
call eax
mov ebx, eax
test ebx, ebx
je 0x483ce6
mov eax, dword [0x503b48]
test eax, eax
je 0x483ce6
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x503b40]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x483dda
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x483e08
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x483e0f
cmp ebx, dword [eax + 4]
jae 0x483e0f
xor eax, eax
jmp 0x483fff
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x483e20
xor eax, eax
inc eax
jmp 0x483ffe
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x483e36
cmp ecx, edx
jae 0x483f7b
cmp dword [eax + 4], 0
je 0x483e3f
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x483e27
cmp dword [ebp + 8], 0
je 0x483e61
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x483f7b
cmp eax, esi
jae 0x483f7b
mov eax, dword [0x503b58]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x483e86
cmp dword [esi*4 + 0x503b60], edi
je 0x483f7f
inc esi
cmp esi, eax
jl 0x483e74
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x483ffb
cmp dword [ebp - 8], 0x1000000
jne 0x483ffb
test byte [ebp - 0xc], 0xcc
je 0x483f04
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x483ffb
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x483ffb
cmp word [eax + 0x18], 0x10b
jne 0x483ffb
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x483ffb
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x483f04
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x483f04
test byte [ecx + 0x27], 0x80
jne 0x483f7b
push 1
push 0x503ba0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x483e18
mov ecx, dword [0x503b58]
test ecx, ecx
mov edx, ecx
jle 0x483f38
lea eax, [ecx*4 + 0x503b5c]
cmp dword [eax], edi
je 0x483f38
dec edx
sub eax, 4
test edx, edx
jg 0x483f2c
test edx, edx
jne 0x483f69
push 0xf
pop ebx
cmp ecx, ebx
jg 0x483f45
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x483f5d
lea eax, [edx*4 + 0x503b60]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x483f4b
cmp ecx, 0x10
jge 0x483f69
inc ecx
mov dword [0x503b58], ecx
push 0
push 0x503ba0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x483e18
xor eax, eax
jmp 0x483ffe
test esi, esi
jle 0x483e18
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x503ba0
call ebx
test eax, eax
jne 0x483e18
cmp dword [esi*4 + 0x503b60], edi
je 0x483fd5
mov eax, dword [0x503b58]
lea esi, [eax - 1]
test esi, esi
jl 0x483fc3
cmp dword [esi*4 + 0x503b60], edi
je 0x483fbf
dec esi
jns 0x483fb3
test esi, esi
jge 0x483fd3
cmp eax, 0x10
jge 0x483fce
inc eax
mov dword [0x503b58], eax
lea esi, [eax - 1]
jmp 0x483fd5
je 0x483fed
xor ecx, ecx
test esi, esi
jl 0x483fed
lea eax, [ecx*4 + 0x503b60]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x483fdb
push 0
push 0x503ba0
call ebx
jmp 0x483e18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x48674f
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00477670
mov eax, dword [0x4e44b4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.00482e88
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1008], eax
je 0x486882
push 2
push esi
push dword [ebp + 8]
call fcn.00482e88
add esp, 0xc
cmp eax, ebx
je 0x486882
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x486822
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00478f20
push 0x8000
push dword [ebp + 8]
call fcn.00486890
add esp, 0x14
mov dword [ebp - 0x100c], eax
cmp edi, ebx
mov eax, ebx
jge 0x4867d8
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call fcn.004819b7
add esp, 0xc
cmp eax, 0xffffffff
je 0x4867f8
sub edi, eax
test edi, edi
jg 0x4867d0
jmp 0x486810
call fcn.0047828b
cmp dword [eax], 5
jne 0x48680d
call fcn.00478282
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0x100c]
push dword [ebp + 8]
call fcn.00486890
pop ecx
pop ecx
jmp 0x48686a
jge 0x48686a
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00482e88
push dword [ebp + 8]
call fcn.004858bc
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x48686a
call fcn.00478282
mov dword [eax], 0xd
call fcn.0047828b
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0x1008]
push dword [ebp + 8]
call fcn.00482e88
add esp, 0xc
mov eax, esi
pop edi
jmp 0x486884
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0047fdf9
leave
ret

Function at 0x48b0d9
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x48b111
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004891a7
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0048917f
jmp 0x48b11d
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x48c7c7
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x48c809
call fcn.00492149
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x48c809
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x48c800
xor eax, eax
jmp 0x48c811
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0048c817
pop edi
pop esi
pop ebx
ret 4
Function at 0x492679
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4926a7
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4926c5
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004925df
jmp 0x4926c5
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4926c5
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004925df
test edi, edi
mov eax, edi
jne 0x4926af
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
cmp eax, 0
nop
nop
je 0x432072
nop
nop
nop
nop
mov ebx, 0x40c7d0
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
push eax
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x3dfe0f85
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
loop 0x432060
nop
nop
nop
nop
mov eax, str.g__
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x4320d2
nop
nop
mov ebx, 0x42f314
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x25e01067
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
loop 0x4320c0
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x417f2e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
pushal
call 0x417f3d
pop dword [ebp - 0x1c]
mov eax, 0xbbd68938
sub eax, 0xbb9509fb
sub dword [ebp - 0x1c], eax
push 0x40
push 0x1000
push 0x37288
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x1c]
call dword [eax]
mov ecx, 0x6048a12d
sub ecx, 0x604860bd
mov edx, eax
mov ebx, 0xa849c5dc
add ebx, 0x57f9a824
add ebx, dword [ebp - 0x1c]
mov esi, 0xb9375aad
add esi, 0x4aa96f02
mov dword [ebp - 8], 0xd7688d40
mov edi, dword [ebx]
add dword [ebp - 0x10], esi
sub edi, esi
xor dword [ebp - 0x14], ebx
mov dword [edx], edi
sub dword [ebp - 0xc], esi
add edx, 0xd0fe9c8
add edx, 0xf2f0163c
add ebx, 0x3e886fc8
add ebx, 0xc177903c
loop 0x417f97
add eax, 0xf493
mov ebx, eax
add eax, 0x5d48e966
sub eax, 0x5d48e961
mov ecx, 0x400000
add ecx, dword [ebp - 0x1c]
call ebx
leave
ret

Function at 0x41e7e0
Capabilities:
Check os version
Get common file path

Disassembly:
sub esp, 0x2d4
push esi
call dword [sym.imp.kernel32.dll_GetVersion]
cmp ax, 6
je 0x41e81d
push str.SetDefaultDllDirectories
push 0x429a14
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
test eax, eax
je 0x41e81d
push 0xc00
call eax
test eax, eax
jne 0x41e8b6
lea eax, [esp + 8]
push 0x106
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
test eax, eax
je 0x41e8b6
cmp eax, 0x104
ja 0x41e8b6
cmp word [esp + eax*2 + 6], 0x5c
je 0x41e84c
mov word [esp + eax*2 + 8], 0x5c
inc eax
mov esi, dword [str.userenv]
cmp byte [esi], 0
je 0x41e8b6
push ebp
lea ecx, [esp + eax*2 + 0xc]
push edi
mov edi, dword [sym.imp.kernel32.dll_LoadLibraryExW]
mov dword [esp + 0xc], ecx
mov ebp, 0x6c
mov cl, byte [esi]
mov eax, dword [esp + 0xc]
inc esi
test cl, cl
je 0x41e88b
xor dx, dx
add eax, 2
mov dl, cl
inc esi
mov word [eax - 2], dx
mov cl, byte [esi - 1]
test cl, cl
jne 0x41e877
mov word [eax], 0x2e
mov word [eax + 2], 0x64
mov word [eax + 4], bp
mov word [eax + 6], bp
mov word [eax + 8], 0
push 8
lea eax, [esp + 0x14]
push 0
push eax
call edi
cmp byte [esi], 0
jne 0x41e86c
pop edi
pop ebp
pop esi
add esp, 0x2d4
ret
Function at 0x402b60
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x409080
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [0x409078]
sub esp, 4
test ebx, ebx
je 0x402bab
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
sub esp, 4
mov esi, eax
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x402ba4
test esi, esi
je 0x402ba4
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402b80
mov dword [esp], 0x409080
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x402d90
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
lea esi, [esp + 0x24]
lea ebx, [eax + 0x40]
mov dword [esp + 4], 1
mov dword [esp + 0xc], ebx
mov dword [esp], str.Mingw_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x402de0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, edx
push esi
mov esi, ecx
push ebx
mov ebx, eax
sub esp, 0x3c
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x402eb4
mov eax, dword [esp + 0x28]
cmp eax, 0x40
je 0x402e1e
cmp eax, 4
jne 0x402e40
test esi, esi
je 0x402e32
xor eax, eax
movzx ecx, byte [edi + eax]
mov byte [ebx + eax], cl
add eax, 1
cmp eax, esi
jb 0x402e24
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x20]
lea ebp, [esp + 0x10]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
mov ecx, dword [esp + 0x28]
test esi, esi
je 0x402e7f
xor edx, edx
movzx eax, byte [edi + edx]
mov byte [ebx + edx], al
add edx, 1
cmp edx, esi
jb 0x402e71
cmp ecx, 0x40
je 0x402e32
cmp ecx, 4
je 0x402e32
mov eax, dword [esp + 0x10]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00402d90
lea esi, [esi]
Function at 0x10015637
Capabilities:
Get file system object information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x1001565c
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [eax], 0
jmp 0x10015681
mov byte [ebp - 1], 0
movzx eax, byte [ebp - 1]
test eax, eax
je 0x10015681
push 0x18e1
push 0xe25
push 0
push 0xfb4
push 0
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
mov esp, ebp
pop ebp
ret

Function at 0x1001addd
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008ccab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
movzx eax, byte [ebp + 0x14]
test eax, eax
je 0x1001ae6f
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
push dword [eax]
mov eax, dword [ebp - 0x28]
push dword [eax]
lea eax, [ebp - 0x40]
push eax
call fcn.10017f59
add esp, 0x10
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
and dword [ebp - 4], 0
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.1001b391
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.1001b3c6
jmp 0x1001ae79
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret