joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1feb52f0
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x1feb82bc], ebx
jne 0x1feb533f
call esi
cmp eax, ebx
mov edi, eax
je 0x1feb531d
mov dword [0x1feb82bc], 1
jmp 0x1feb533f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x1feb5335
mov dword [0x1feb82bc], 2
jmp 0x1feb533f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x1feb82bc], 1
jne 0x1feb53ee
test edi, edi
jne 0x1feb5362
call esi
mov edi, eax
test edi, edi
jne 0x1feb5362
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x1feb537c
add esi, 2
cmp word [esi], 0
jne 0x1feb536a
add esi, 2
cmp word [esi], 0
jne 0x1feb536a
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 0x1feb53dd
push ebp
call fcn.1feb5e30
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x1feb53dd
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 0x1feb53cc
push ebx
call fcn.1feb5ee0
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 [0x1feb82bc], 2
jne 0x1feb5472
test ebx, ebx
jne 0x1feb5411
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x1feb5411
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x1feb5426
inc ebp
cmp byte [ebp], 0
jne 0x1feb5418
inc ebp
cmp byte [ebp], 0
jne 0x1feb5418
sub ebp, ebx
inc ebp
push ebp
call fcn.1feb5e30
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x1feb544b
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 0x1feb54d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x1feb82c0
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x1feb54f7
add eax, 8
inc ecx
cmp eax, 0x1feb8350
jb 0x1feb54e8
cmp dword [ecx*8 + 0x1feb82c0], edx
lea ebx, [ecx*8]
jne 0x1feb56bb
cmp dword [0x1feb803c], 1
je 0x1feb5677
cmp dword [0x1feb803c], 0
jne 0x1feb552e
cmp dword [0x1feb8040], 1
je 0x1feb5677
cmp edx, 0xfc
je 0x1feb56bb
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x1feb556b
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 0x1feb55af
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 0x1feb72ec
push ebp
call fcn.1feb5fd0
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, 0x1feb72cc
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 + 0x1feb82c4]
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.1feb5f30
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x1feb8d00], 0
je 0x1feb568d
mov eax, dword [0x1feb8d00]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x1feb5697
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x1feb82c4]
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 0x405300
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x228
mov eax, dword [0x480980]
xor eax, esp
mov dword [esp + 0x224], eax
mov eax, dword [esp + 0x22c]
push ebx
push ebp
push esi
push edi
push 0x2c
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], 0
call fcn.0040f9c5
mov esi, dword [esp + 0x24c]
mov ebx, eax
mov edi, dword [esp + 0x248]
add esp, 4
xor ecx, ecx
mov dword [ebx], ebx
mov dword [ebx + 4], ebx
mov dword [ebx + 8], ebx
mov word [ebx + 0xc], 0x101
mov dword [esp + 0x14], ebx
nop dword [eax]
mov eax, ecx
mov byte [esp + ecx + 0x34], cl
cdq
idiv esi
mov al, byte [edx + edi]
mov byte [esp + ecx + 0x134], al
inc ecx
cmp ecx, 0x100
jl 0x405360
xor esi, esi
xor edi, edi
mov dl, byte [esp + esi + 0x34]
movzx eax, byte [esp + esi + 0x134]
add edi, eax
movzx ecx, dl
add edi, ecx
and edi, 0x800000ff
jns 0x4053a3
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [esp + edi + 0x34]
mov byte [esp + esi + 0x34], al
inc esi
mov byte [esp + edi + 0x34], dl
cmp esi, 0x100
jl 0x405380
mov ebp, dword [esp + 0x240]
xor edx, edx
xor edi, edi
xor esi, esi
test ebp, ebp
jle 0x4054b0
nop dword [eax]
inc edx
and edx, 0x800000ff
jns 0x4053e1
dec edx
or edx, 0xffffff00
inc edx
mov cl, byte [esp + edx + 0x34]
movzx eax, cl
add edi, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
and edi, 0x800000ff
jns 0x405402
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [esp + edi + 0x34]
push 0x431630
mov byte [esp + edx + 0x38], al
push 0x4828c8
mov dword [esp + 0x30], edi
mov byte [esp + edi + 0x3c], cl
call fcn.004018a0
mov ebx, eax
add esp, 8
mov ecx, dword [ebx]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + ebx + 0x30]
mov edi, dword [ecx + 4]
mov ecx, edi
mov dword [esp + 0x30], edi
mov edx, dword [edi]
call dword [edx + 4]
lea eax, [esp + 0x2c]
push eax
call fcn.00402960
add esp, 4
mov ecx, eax
mov edx, dword [eax]
push 0xa
call dword [edx + 0x30]
movzx eax, ax
mov dword [esp + 0x10], eax
test edi, edi
je 0x405475
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
test eax, eax
je 0x405471
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov eax, dword [esp + 0x10]
push eax
mov ecx, ebx
call fcn.0040aef0
mov ecx, ebx
call fcn.00409560
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
movzx eax, byte [esp + edx + 0x34]
add eax, dword [esp + 0x20]
movzx eax, al
mov al, byte [esp + eax + 0x34]
xor byte [esi + ecx], al
inc esi
cmp esi, ebp
jl 0x4053d0
mov ebx, dword [esp + 0x14]
push dword [ebx + 4]
lea eax, [esp + 0x18]
push eax
mov ecx, eax
call fcn.00401e50
push 0x2c
push dword [esp + 0x18]
call fcn.0040f9f5
mov ecx, dword [esp + 0x23c]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040fd0e
add esp, 0x228
ret
Function at 0x40bb00
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
push ebx
mov ebx, ecx
push esi
mov esi, dword [esp + 0x14]
test eax, eax
jg 0x40bb21
jl 0x40bb17
test esi, esi
jne 0x40bb21
pop esi
xor eax, eax
xor edx, edx
pop ebx
pop ecx
ret 0xc
cmp dword [ebx + 0x38], 0
push ebp
push edi
mov edi, esi
je 0x40bbd4
mov ebp, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x18], eax
nop dword [eax]
mov ecx, ebx
call fcn.00406730
mov esi, eax
mov eax, edx
mov dword [esp + 0x10], eax
test eax, eax
jl 0x40bb91
jg 0x40bb59
test esi, esi
je 0x40bb91
cmp ebp, eax
jg 0x40bb69
jl 0x40bb63
cmp edi, esi
jae 0x40bb69
mov esi, edi
mov dword [esp + 0x10], ebp
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push dword [esp + 0x20]
call fcn.00410c70
mov eax, dword [ebx + 0x2c]
add esp, 0xc
sub edi, esi
sbb ebp, dword [esp + 0x10]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov eax, dword [esp + 0x18]
jmp 0x40bbb0
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40bbc0
mov eax, dword [esp + 0x18]
add edi, 0xffffffff
mov esi, 1
adc ebp, 0xffffffff
mov byte [eax], cl
add eax, esi
mov dword [esp + 0x18], eax
test ebp, ebp
jg 0x40bb40
jl 0x40bbc0
test edi, edi
jne 0x40bb40
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
sub eax, edi
pop edi
sbb edx, ebp
pop ebp
pop esi
pop ebx
pop ecx
ret 0xc
mov eax, dword [ebx + 0x1c]
mov ebp, dword [esp + 0x18]
mov edx, dword [eax]
test edx, edx
je 0x40bc19
mov eax, dword [ebx + 0x2c]
lea ecx, [ebx + 0x2c]
mov dword [esp + 0x10], ecx
mov eax, dword [eax]
test eax, eax
je 0x40bc20
mov edi, dword [esp + 0x1c]
cmp eax, edi
cmovb esi, eax
push esi
push edx
push ebp
call fcn.00410c70
mov eax, dword [ebx + 0x2c]
add ebp, esi
sub edi, esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [esp + 0x1c]
jmp 0x40bc20
lea eax, [ebx + 0x2c]
mov dword [esp + 0x10], eax
cmp dword [ebx + 0x4c], 0
je 0x40bc89
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40bc4a
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [eax], edx
cmp edi, 0xfff
jbe 0x40bc74
push dword [ebx + 0x4c]
push 0xfff
push 1
push ebp
call fcn.00418f1f
add esp, 0x10
add ebp, eax
sub edi, eax
cmp eax, 0xfff
jne 0x40bc89
cmp edi, eax
ja 0x40bc52
test edi, edi
je 0x40bc89
push dword [ebx + 0x4c]
push edi
push 1
push ebp
call fcn.00418f1f
add esp, 0x10
sub edi, eax
mov edx, dword [esp + 0x20]
sub esi, edi
pop edi
pop ebp
mov eax, esi
sbb edx, 0
pop esi
pop ebx
pop ecx
ret 0xc

Function at 0x410358
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x410397
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x410397
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x410397
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x410397
cmp dword [ecx + 0x74], 0xe
jbe 0x410397
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x42135d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x435964
push 0x43595c
push str.FlsAlloc
push 0x1e
call fcn.0042118a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x421391
push dword [ebp + 8]
mov ecx, esi
call dword [0x43118c]
call esi
jmp 0x421397
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4213db
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x435974
push 0x43596c
push str.FlsGetValue
push 0x20
call fcn.0042118a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x421412
push dword [ebp + 8]
mov ecx, esi
call dword [0x43118c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x422cf4
Capabilities:
Read file on windows

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

Function at 0x422cff
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00422b25

Function at 0x4230f9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004106d0
mov eax, dword [0x480980]
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.004219f9
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x42313b
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x423297
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00430040
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 + 0x483238]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004242c9
mov ecx, dword [esi*4 + 0x483238]
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 0x423290
cmp eax, dword [edi + ecx + 0x24]
jne 0x423290
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 0x423290
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004242c9
add esp, 0x14
test edx, edx
jl 0x423290
jg 0x423206
test eax, eax
jb 0x423290
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x423290
jl 0x423220
cmp dword [ebp - 0x1008], eax
ja 0x423290
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x42323e
test ebx, ebx
je 0x423277
cmp ecx, edi
jae 0x423277
mov al, byte [ecx]
cmp al, 0xd
jne 0x423258
lea eax, [edi - 1]
cmp ecx, eax
jae 0x423264
cmp byte [ecx + 1], 0xa
jne 0x423264
inc ecx
jmp 0x423264
movzx eax, al
movsx eax, byte [eax + 0x480c50]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x42323e
cmp edx, ebx
jne 0x42323e
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x423295
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040fd0e
leave
ret
Function at 0x423767
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 + 0x483238]
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 0x4237a7
cmp byte [ebx], 0xa
jne 0x4237a7
or byte [eax + edi + 0x28], 4
jmp 0x4237ac
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4238aa
mov al, byte [edx]
cmp al, 0x1a
je 0x42388c
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4237db
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x423800
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x42380a
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 0x4237bd
jmp 0x4238aa
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 0x423887
cmp dword [ebp - 0xc], 0
je 0x423887
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x483238]
test byte [eax + edi + 0x28], 0x48
je 0x423861
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x42384c
mov byte [esi], dl
jmp 0x42385d
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x483238]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4238aa
cmp byte [ebp - 1], 0xa
jne 0x423870
cmp esi, ebx
jne 0x423870
mov byte [esi], 0xa
jmp 0x4238a9
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004242e7
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4238aa
mov byte [esi], 0xd
jmp 0x4238a9
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x483238]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4238a6
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4238aa
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4238b3
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 + 0x483238]
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 0x4238f6
cmp word [esi], dx
jne 0x4238f6
or byte [edi + eax + 0x28], 4
jmp 0x4238fb
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 0x423a4e
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 0x423a2e
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x42393d
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x423973
cmp eax, edx
jae 0x42397f
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 0x423915
jmp 0x423a4e
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 0x423a2a
cmp dword [ebp - 0x14], 0
je 0x423a2a
mov eax, dword [ebx*4 + 0x483238]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x423a02
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4239cb
mov word [esi], cx
jmp 0x4239fe
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x483238]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x483238]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x483238]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x423a4e
pop ebx
cmp word [ebp - 4], bx
jne 0x423a13
cmp esi, dword [ebp + 0xc]
jne 0x423a13
mov word [esi], bx
jmp 0x423a4b
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004242e7
add esp, 0x10
cmp word [ebp - 4], bx
je 0x423a4e
push 0xd
jmp 0x423a47
mov ecx, dword [ebx*4 + 0x483238]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x423a45
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x423a4e
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 0x4279ae
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 0x427a4b
push ebx
push esi
call fcn.00427977
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.004265fc
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4279f8
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x427a4a
push edi
push eax
call fcn.004244c6
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x427a18
call fcn.004209ac
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x427a49
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004265fc
add esp, 0x20
test eax, eax
jne 0x427a37
push edi
call fcn.004209ac
jmp 0x427a3f
push ebx
call fcn.004209ac
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 0x42ea35
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0042e9b1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x42ebad
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x42ebad
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x42eb5c
jg 0x42ea8e
test eax, eax
je 0x42eb52
push 1
push 0x1000
call fcn.0042094f
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x42eab4
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x42eb49
push 0x8000
push ebx
call fcn.0041da67
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x42eae0
jg 0x42eadb
cmp ecx, 0x1000
jb 0x42eae0
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00422796
add esp, 0x10
cmp eax, 0xffffffff
je 0x42eb25
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x42eadb
jl 0x42eb0c
test ecx, ecx
jne 0x42eacd
push dword [ebp - 0xc]
push ebx
call fcn.0041da67
push esi
call fcn.004209ac
add esp, 0xc
xor edi, edi
jmp 0x42ebbe
cmp byte [edi + 0x24], 0
je 0x42eb3c
cmp dword [edi + 0x20], 5
jne 0x42eb3c
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x42eb47
mov edi, dword [edi + 0x18]
jmp 0x42eb49
xor edi, edi
push esi
call fcn.004209ac
pop ecx
jmp 0x42ebbe
test ecx, ecx
jg 0x42eb1e
jl 0x42eb5c
test eax, eax
jae 0x42eb1e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004242e7
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x42eb7f
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x42eb1e
jmp 0x42ebb6
push ebx
call fcn.004281a1
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x42eb1e
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x42ebbe
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x42ebbb
mov edi, dword [edi + 0x18]
jmp 0x42ebbe
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004242e7
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x42ff20
Capabilities:
Parse pe header

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