joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a660
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x40a6d1
push ebx
call fcn.0040a790
add esp, 4
test eax, eax
jne 0x40a69f
mov dword [0x413428], 0xf
mov dword [0x413424], 0xd
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x40a6e1
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40a777
inc eax
cmp eax, 0x104
ja 0x40a777
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x40a730
cmp eax, ecx
jg 0x40a70d
mov eax, ecx
push eax
call fcn.0040a810
mov edx, eax
add esp, 4
test edx, edx
jne 0x40a74a
mov dword [0x413424], 0xc
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x40a74a
mov dword [0x413424], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret

Function at 0x40a790
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x40a79e
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x40a7cd
cmp eax, 1
je 0x40a7cd
mov eax, 1
ret
xor eax, eax
ret

Function at 0x40a7d0
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x40a7ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40a7ee
xor eax, eax
test eax, eax
je 0x40a7ff
push eax
call fcn.0040ab10
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x40a910
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e320
push 0x40cfb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x41343c], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x413438], ecx
shl ecx, 8
add ecx, edx
mov dword [0x413434], ecx
shr eax, 0x10
mov dword [0x413430], eax
call fcn.0040bb80
test eax, eax
jne 0x40a97a
push 0x1c
call fcn.0040aae0
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040b3a0
call fcn.0040ceb0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x413dd0], eax
call fcn.0040c870
mov dword [0x4133e8], eax
test eax, eax
je 0x40a9ad
mov eax, dword [0x413dd0]
test eax, eax
jne 0x40a9b7
push 0xffffffffffffffff
call fcn.0040b030
add esp, 4
call fcn.0040c5c0
call fcn.0040c4d0
call fcn.0040b000
mov esi, dword [0x413dd0]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x40aa96
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x40a9fe
test al, al
je 0x40a9fe
and eax, 0xff
push eax
call fcn.0040c470
add esp, 4
test eax, eax
je 0x40a9d8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40a9d8
cmp byte [esi], 0x22
jne 0x40aa07
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x40aa17
cmp al, 0x20
ja 0x40aa17
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40aa07
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40aa38
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40aa3d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.0040b030
jmp 0x40aa7b
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x40aa07
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40aa96

Function at 0x40aae0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x4133f0], 1
jne 0x40aaee
call fcn.0040d090
mov eax, dword [esp + 4]
push eax
call fcn.0040d0d0
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x40b070
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x41346c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40b08f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x413468], 1
mov byte [0x413464], bl
jne 0x40b0e9
mov ecx, dword [0x413dc8]
test ecx, ecx
je 0x40b0d7
mov esi, dword [0x413dc4]
sub esi, 4
cmp esi, ecx
jb 0x40b0d7
mov eax, dword [esi]
test eax, eax
je 0x40b0d0
call eax
mov ecx, dword [0x413dc8]
sub esi, 4
cmp esi, ecx
jae 0x40b0c2
push 0x410014
push 0x410010
call fcn.0040b120
add esp, 8
push 0x41001c
push 0x410018
call fcn.0040b120
add esp, 8
test ebx, ebx
jne 0x40b110
push ebp
mov dword [0x41346c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x40b5a0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x413dc0]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40b74d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x413cc0]
lea edi, [ecx*4 + 0x413cc0]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40b74d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40b60e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x40b61f
push 2
push ebp
push eax
call fcn.0040b840
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40b77e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40b6c9
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40b67a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40b667
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40b64a
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b76f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40b6c5
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40b646
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40b73e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40b712
cmp eax, 5
jne 0x40b6fb
mov dword [0x413428], eax
mov dword [0x413424], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.0040ab10
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x40b732
cmp byte [ebp], 0x1a
jne 0x40b732
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x413424], 0x1c
jmp 0x40b757
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x413424], 9
pop edi
pop esi
pop ebp
mov dword [0x413428], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40b6c5
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b7af
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40b6c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40b6c9
Function at 0x40c870
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x413590]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x40c8b2
call edi
mov esi, eax
test esi, esi
je 0x40c89c
mov eax, 1
jmp 0x40c8ad
call ebp
mov ebx, eax
test ebx, ebx
je 0x40c9bf
mov eax, 2
mov dword [0x413590], eax
cmp eax, 1
jne 0x40c952
test esi, esi
jne 0x40c8cb
call edi
mov esi, eax
test esi, esi
je 0x40c9bf
cmp word [esi], 0
mov eax, esi
je 0x40c8e5
add eax, 2
cmp word [eax], 0
jne 0x40c8d3
add eax, 2
cmp word [eax], 0
jne 0x40c8d3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x40c944
push edi
call fcn.0040a810
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40c944
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40c936
push ebx
call fcn.0040a8c0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40c9bf
test ebx, ebx
jne 0x40c963
call ebp
mov ebx, eax
test ebx, ebx
je 0x40c9bf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40c97b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40c96b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40c96b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.0040a810
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40c99d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40d0d0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x413348
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40d0f4
add eax, 8
inc ebp
cmp eax, 0x4133d8
jb 0x40d0e5
cmp ecx, dword [ebp*8 + 0x413348]
jne 0x40d29b
mov eax, dword [0x4133f0]
cmp eax, 1
je 0x40d25d
test eax, eax
jne 0x40d120
cmp dword [0x411014], 1
je 0x40d25d
cmp ecx, 0xfc
je 0x40d29b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40d15b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40d1a4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x410540
add ebx, ecx
push ebx
call fcn.00409d80
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40e5e4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x41334c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040d690
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x413cc0]
test eax, eax
je 0x40d26e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40d278
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x41334c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor 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 edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x4130e2
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00412d84

Function at 0x4130ed
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00412f13

Function at 0x4134e7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00407120
mov eax, dword [0x476500]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00411f79
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x413529
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x413685
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041d920
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x478028]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004146b7
mov ecx, dword [esi*4 + 0x478028]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x41367e
cmp eax, dword [edi + ecx + 0x24]
jne 0x41367e
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41367e
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004146b7
add esp, 0x14
test edx, edx
jl 0x41367e
jg 0x4135f4
test eax, eax
jb 0x41367e
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x41367e
jl 0x41360e
cmp dword [ebp - 0x1008], eax
ja 0x41367e
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41362c
test ebx, ebx
je 0x413665
cmp ecx, edi
jae 0x413665
mov al, byte [ecx]
cmp al, 0xd
jne 0x413646
lea eax, [edi - 1]
cmp ecx, eax
jae 0x413652
cmp byte [ecx + 1], 0xa
jne 0x413652
inc ecx
jmp 0x413652
movzx eax, al
movsx eax, byte [eax + 0x4767b8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41362c
cmp edx, ebx
jne 0x41362c
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x413683
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00406635
leave
ret
Function at 0x413b55
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x478028]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x413b95
cmp byte [ebx], 0xa
jne 0x413b95
or byte [eax + edi + 0x28], 4
jmp 0x413b9a
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x413c98
mov al, byte [edx]
cmp al, 0x1a
je 0x413c7a
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x413bc9
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x413bee
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x413bf8
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x413bab
jmp 0x413c98
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x413c75
cmp dword [ebp - 0xc], 0
je 0x413c75
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x478028]
test byte [eax + edi + 0x28], 0x48
je 0x413c4f
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x413c3a
mov byte [esi], dl
jmp 0x413c4b
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x478028]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x413c98
cmp byte [ebp - 1], 0xa
jne 0x413c5e
cmp esi, ebx
jne 0x413c5e
mov byte [esi], 0xa
jmp 0x413c97
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004146d5
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x413c98
mov byte [esi], 0xd
jmp 0x413c97
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x478028]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x413c94
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x413c98
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x413ca1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x478028]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x413ce4
cmp word [esi], dx
jne 0x413ce4
or byte [edi + eax + 0x28], 4
jmp 0x413ce9
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x413e3c
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x413e1c
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x413d2b
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x413d61
cmp eax, edx
jae 0x413d6d
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x413d03
jmp 0x413e3c
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x413e18
cmp dword [ebp - 0x14], 0
je 0x413e18
mov eax, dword [ebx*4 + 0x478028]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x413df0
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x413db9
mov word [esi], cx
jmp 0x413dec
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x478028]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x478028]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x478028]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x413e3c
pop ebx
cmp word [ebp - 4], bx
jne 0x413e01
cmp esi, dword [ebp + 0xc]
jne 0x413e01
mov word [esi], bx
jmp 0x413e39
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004146d5
add esp, 0x10
cmp word [ebp - 4], bx
je 0x413e3c
push 0xd
jmp 0x413e35
mov ecx, dword [ebx*4 + 0x478028]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x413e33
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x413e3c
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x417c74
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x417d11
push ebx
push esi
call fcn.00417c3d
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.004168c2
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x417cbe
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x417d10
push edi
push eax
call fcn.00414bc2
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x417cde
call fcn.004114d8
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x417d0f
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004168c2
add esp, 0x20
test eax, eax
jne 0x417cfd
push edi
call fcn.004114d8
jmp 0x417d05
push ebx
call fcn.004114d8
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x41d8e0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41d90d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41d90d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x41f254
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x40
push 0x1000
mov ebx, 0x4ac
xor ebp, ebp
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebx
mov edi, 0x476040
mov esi, eax
push edi
call fcn.0041f1ae
push ebx
push edi
push esi
call fcn.00407150
add esp, 0x14
call fcn.0041f194
push ebp
push ebp
push 0x42a040
lea eax, [esi + 0x188]
push eax
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
pop esi
pop ebp
pop ebx
ret