joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002284d
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 + 0x10041b50]
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 0x10022890
cmp word [esi], dx
jne 0x10022890
or byte [edi + eax + 0x28], 4
jmp 0x10022895
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 0x100229ce
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 0x100229ae
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x100228d7
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1002290d
cmp eax, edx
jae 0x10022919
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 0x100228af
jmp 0x100229ce
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 0x100229aa
cmp dword [ebp - 0x14], 0
je 0x100229aa
mov eax, dword [ebx*4 + 0x10041b50]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x10022982
mov cx, word [ebp - 4]
pop eax
cmp cx, ax
je 0x100229c8
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x10041b50]
push 0xa
mov byte [edi + eax + 0x2a], cl
mov eax, dword [ebx*4 + 0x10041b50]
shr cx, 8
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x10041b50]
pop ecx
mov byte [edi + eax + 0x2c], cl
jmp 0x100229cb
pop ebx
cmp word [ebp - 4], bx
jne 0x10022993
cmp esi, dword [ebp + 0xc]
jne 0x10022993
mov word [esi], bx
jmp 0x100229cb
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10023267
add esp, 0x10
cmp word [ebp - 4], bx
je 0x100229ce
push 0xd
jmp 0x100229c7
mov ecx, dword [ebx*4 + 0x10041b50]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x100229c5
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x100229ce
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 0x10026ebd
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 0x10026f5a
push ebx
push esi
call fcn.10026e86
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.10025c91
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10026f07
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10026f59
push edi
push eax
call fcn.1001fb95
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10026f27
call fcn.1001f7b1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10026f58
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10025c91
add esp, 0x20
test eax, eax
jne 0x10026f46
push edi
call fcn.1001f7b1
jmp 0x10026f4e
push ebx
call fcn.1001f7b1
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 0x1002db11
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.1002da8d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x1002dc89
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x1002dc89
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x1002dc38
jg 0x1002db6a
test eax, eax
je 0x1002dc2e
push 1
push 0x1000
call fcn.1001eb48
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1002db90
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x1002dc25
push 0x8000
push ebx
call fcn.1002d9be
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 0x1002dbbc
jg 0x1002dbb7
cmp ecx, 0x1000
jb 0x1002dbbc
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.1001f5b1
add esp, 0x10
cmp eax, 0xffffffff
je 0x1002dc01
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 0x1002dbb7
jl 0x1002dbe8
test ecx, ecx
jne 0x1002dba9
push dword [ebp - 0xc]
push ebx
call fcn.1002d9be
push esi
call fcn.1001f7b1
add esp, 0xc
xor edi, edi
jmp 0x1002dc9a
cmp byte [edi + 0x24], 0
je 0x1002dc18
cmp dword [edi + 0x20], 5
jne 0x1002dc18
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x1002dc23
mov edi, dword [edi + 0x18]
jmp 0x1002dc25
xor edi, edi
push esi
call fcn.1001f7b1
pop ecx
jmp 0x1002dc9a
test ecx, ecx
jg 0x1002dbfa
jl 0x1002dc38
test eax, eax
jae 0x1002dbfa
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10023267
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1002dc5b
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x1002dbfa
jmp 0x1002dc92
push ebx
call fcn.100298b9
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1002dbfa
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 0x1002dc9a
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x1002dc97
mov edi, dword [edi + 0x18]
jmp 0x1002dc9a
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10023267
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402c9f
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4083e8
call fcn.00403d64
mov edi, 0x94
mov eax, edi
call fcn.00403ec0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [0x4080ac]
mov ecx, dword [esi + 0x10]
mov dword [0x40ad7c], ecx
mov eax, dword [esi + 4]
mov dword [0x40ad88], eax
mov edx, dword [esi + 8]
mov dword [0x40ad8c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40ad80], esi
cmp ecx, 2
je 0x402cff
or esi, 0x8000
mov dword [0x40ad80], esi
shl eax, 8
add eax, edx
mov dword [0x40ad84], eax
xor esi, esi
push esi
mov edi, dword [0x4080f8]
call edi
cmp word [eax], 0x5a4d
jne 0x402d3a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402d3a
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x402d52
cmp eax, 0x20b
je 0x402d3f
mov dword [ebp - 0x1c], esi
jmp 0x402d66
cmp dword [ecx + 0x84], 0xe
jbe 0x402d3a
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x402d60
cmp dword [ecx + 0x74], 0xe
jbe 0x402d3a
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00403d11
pop ecx
test eax, eax
jne 0x402d7a
push 0x1c
call fcn.00402c7b
pop ecx
call fcn.00403c08
test eax, eax
jne 0x402d8b
push 0x10
call fcn.00402c7b
pop ecx
call fcn.004039a2
mov dword [ebp - 4], esi
call fcn.004037a4
test eax, eax
jge 0x402da4
push 0x1b
call fcn.00402c56
pop ecx
call dword [0x408100]
mov dword [0x40b594], eax
call fcn.00403682
mov dword [0x40ad6c], eax
call fcn.004035e0
test eax, eax
jge 0x402dca
push 8
call fcn.00402c56
pop ecx
call fcn.004033ad
test eax, eax
jge 0x402ddb
push 9
call fcn.00402c56
pop ecx
push 1
call fcn.00402ece
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x402df1
push eax
call fcn.00402c56
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [0x4080fc]
call fcn.00403350
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x402e12
movzx eax, word [ebp - 0x40]
jmp 0x402e15
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00402ac0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x402e33
push edi
call fcn.00402ffb
call fcn.0040301d
jmp 0x402e65
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00403d9f
ret
Function at 0x405e5e
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 0x405e8c
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 0x405e93
cmp ebx, dword [eax + 4]
jae 0x405e93
xor eax, eax
jmp 0x406083
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x405ea4
xor eax, eax
inc eax
jmp 0x406082
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x405eba
cmp ecx, edx
jae 0x405fff
cmp dword [eax + 4], 0
je 0x405ec3
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x405eab
cmp dword [ebp + 8], 0
je 0x405ee5
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x405fff
cmp eax, esi
jae 0x405fff
mov eax, dword [0x40b060]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x405f0a
cmp dword [esi*4 + 0x40b068], edi
je 0x406003
inc esi
cmp esi, eax
jl 0x405ef8
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [0x408090]
test eax, eax
je 0x40607f
cmp dword [ebp - 8], 0x1000000
jne 0x40607f
test byte [ebp - 0xc], 0xcc
je 0x405f88
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40607f
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40607f
cmp word [eax + 0x18], 0x10b
jne 0x40607f
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40607f
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x405f88
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x405f88
test byte [ecx + 0x27], 0x80
jne 0x405fff
push 1
push 0x40b0a8
call dword [0x40802c]
test eax, eax
jne 0x405e9c
mov ecx, dword [0x40b060]
test ecx, ecx
mov edx, ecx
jle 0x405fbc
lea eax, [ecx*4 + 0x40b064]
cmp dword [eax], edi
je 0x405fbc
dec edx
sub eax, 4
test edx, edx
jg 0x405fb0
test edx, edx
jne 0x405fed
push 0xf
pop ebx
cmp ecx, ebx
jg 0x405fc9
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x405fe1
lea eax, [edx*4 + 0x40b068]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x405fcf
cmp ecx, 0x10
jge 0x405fed
inc ecx
mov dword [0x40b060], ecx
push 0
push 0x40b0a8
call dword [0x40802c]
jmp 0x405e9c
xor eax, eax
jmp 0x406082
test esi, esi
jle 0x405e9c
mov ebx, dword [0x40802c]
push 1
push 0x40b0a8
call ebx
test eax, eax
jne 0x405e9c
cmp dword [esi*4 + 0x40b068], edi
je 0x406059
mov eax, dword [0x40b060]
lea esi, [eax - 1]
test esi, esi
jl 0x406047
cmp dword [esi*4 + 0x40b068], edi
je 0x406043
dec esi
jns 0x406037
test esi, esi
jge 0x406057
cmp eax, 0x10
jge 0x406052
inc eax
mov dword [0x40b060], eax
lea esi, [eax - 1]
jmp 0x406059
je 0x406071
xor ecx, ecx
test esi, esi
jl 0x406071
lea eax, [ecx*4 + 0x40b068]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40605f
push 0
push 0x40b0a8
call ebx
jmp 0x405e9c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402e7a
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2c
mov eax, dword [0x432180]
xor eax, esp
mov dword [esp + 0x24], eax
push ebx
push ebp
push esi
mov esi, dword [0x494e8c]
xor ebx, ebx
push edi
mov dword [esp + 0x14], edx
mov eax, dword [esi + 0x3c]
mov ebp, dword [eax + esi + 0x78]
add ebp, esi
mov edi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x18]
add edi, esi
mov dword [esp + 0x18], eax
test eax, eax
je 0x402ee1
mov eax, dword [edi]
lea ecx, [esp + 0x1c]
add eax, esi
push eax
call fcn.004035de
lea ecx, [esp + 0x1c]
call fcn.00402a0f
cmp eax, dword [esp + 0x14]
je 0x402ef9
lea ecx, [esp + 0x1c]
add edi, 4
call fcn.00404017
inc ebx
cmp ebx, dword [esp + 0x18]
jb 0x402eb1
xor edi, edi
mov ecx, dword [esp + 0x34]
lea eax, [esi + edi]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00409367
add esp, 0x2c
ret
mov eax, dword [ebp + 0x24]
lea eax, [eax + ebx*2]
movzx ecx, word [eax + esi]
mov eax, dword [ebp + 0x1c]
lea eax, [eax + ecx*4]
mov edi, dword [eax + esi]
lea ecx, [esp + 0x1c]
call fcn.00404017
jmp 0x402ee3

Function at 0x402f7c
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10
push esi
push edi
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0x494e8c], eax
push 0x27
mov esi, 0x492a60
mov edx, 0x547
push 0x432c30
mov ecx, esi
call fcn.00402805
pop ecx
pop ecx
mov edx, 0x8aafdc01
call fcn.00402e7a
lea ecx, [esp + 0xc]
push ecx
push 0x40
push 0x4e4
push esi
call eax
test eax, eax
je 0x403007
lea ecx, [esp + 0x10]
call fcn.004049da
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x10], ecx
mov byte [esp + 0x14], 1
test ecx, ecx
je 0x403011
cmp byte [ecx + 0x6c], 0
jne 0x403011
mov eax, dword [ecx]
push 1
call dword [eax + 8]
lea ecx, [esp + 0x10]
call fcn.0040315a
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
push 4
pop ecx
call fcn.0040277a
int3
Function at 0x41a9f5
Capabilities:
Read file on windows

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

Function at 0x41adef
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0040a430
mov eax, dword [0x432180]
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.00418914
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x41ae31
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x41af8d
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00424d30
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 + 0x494b50]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0041bde6
mov ecx, dword [esi*4 + 0x494b50]
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 0x41af86
cmp eax, dword [edi + ecx + 0x24]
jne 0x41af86
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 0x41af86
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041bde6
add esp, 0x14
test edx, edx
jl 0x41af86
jg 0x41aefc
test eax, eax
jb 0x41af86
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x41af86
jl 0x41af16
cmp dword [ebp - 0x1008], eax
ja 0x41af86
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41af34
test ebx, ebx
je 0x41af6d
cmp ecx, edi
jae 0x41af6d
mov al, byte [ecx]
cmp al, 0xd
jne 0x41af4e
lea eax, [edi - 1]
cmp ecx, eax
jae 0x41af5a
cmp byte [ecx + 1], 0xa
jne 0x41af5a
inc ecx
jmp 0x41af5a
movzx eax, al
movsx eax, byte [eax + 0x432460]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41af34
cmp edx, ebx
jne 0x41af34
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x41af8b
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00409367
leave
ret
Function at 0x41b284
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 + 0x494b50]
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 0x41b2c4
cmp byte [ebx], 0xa
jne 0x41b2c4
or byte [eax + edi + 0x28], 4
jmp 0x41b2c9
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x41b3c7
mov al, byte [edx]
cmp al, 0x1a
je 0x41b3a9
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x41b2f8
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x41b31d
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x41b327
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 0x41b2da
jmp 0x41b3c7
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 0x41b3a4
cmp dword [ebp - 0xc], 0
je 0x41b3a4
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x494b50]
test byte [eax + edi + 0x28], 0x48
je 0x41b37e
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41b369
mov byte [esi], dl
jmp 0x41b37a
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x494b50]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41b3c7
cmp byte [ebp - 1], 0xa
jne 0x41b38d
cmp esi, ebx
jne 0x41b38d
mov byte [esi], 0xa
jmp 0x41b3c6
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041be04
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41b3c7
mov byte [esi], 0xd
jmp 0x41b3c6
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x494b50]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41b3c3
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41b3c7
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41b3d0
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 + 0x494b50]
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 0x41b413
cmp word [esi], dx
jne 0x41b413
or byte [edi + eax + 0x28], 4
jmp 0x41b418
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 0x41b56b
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 0x41b54b
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x41b45a
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41b490
cmp eax, edx
jae 0x41b49c
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 0x41b432
jmp 0x41b56b
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 0x41b547
cmp dword [ebp - 0x14], 0
je 0x41b547
mov eax, dword [ebx*4 + 0x494b50]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x41b51f
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x41b4e8
mov word [esi], cx
jmp 0x41b51b
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x494b50]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x494b50]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x494b50]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x41b56b
pop ebx
cmp word [ebp - 4], bx
jne 0x41b530
cmp esi, dword [ebp + 0xc]
jne 0x41b530
mov word [esi], bx
jmp 0x41b568
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041be04
add esp, 0x10
cmp word [ebp - 4], bx
je 0x41b56b
push 0xd
jmp 0x41b564
mov ecx, dword [ebx*4 + 0x494b50]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41b562
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41b56b
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 0x40461d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push ebx
push esi
push edi
mov ebx, 0x7d0
mov esi, 0x418254
jmp 0x404642
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
sub ebx, 0xfa
push esi
push dword [ebp + 8]
call fcn.00408f69
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x404635
push 0x418250
push dword [ebp + 0xc]
call fcn.00408f69
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
jne 0x404672
push edi
call fcn.00408ebc
xor eax, eax
jmp 0x4046c5
push edi
push 0x400
lea eax, [ebp - 0x400]
push 1
push eax
call fcn.00408e24
mov esi, eax
add esp, 0x10
xor eax, eax
test esi, esi
jbe 0x40469e
xor byte [ebp + eax - 0x400], 0xec
inc eax
cmp eax, esi
jb 0x404691
push ebx
push esi
lea eax, [ebp - 0x400]
push 1
push eax
call fcn.00408cef
add esp, 0x10
test esi, esi
jne 0x404672
push edi
call fcn.00408ebc
push ebx
call fcn.00408ebc
xor eax, eax
pop ecx
inc eax
pop ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40473a
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
push ebx
push esi
push 8
pop esi
xor ebx, ebx
cmp dword [ebp + 0x20], 0x10
mov eax, dword [ebp + 0xc]
jae 0x404756
lea eax, [ebp + 0xc]
push ebx
push 0xc000000
push 3
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x4047a5
mov ecx, esi
dec esi
test ecx, ecx
je 0x4047a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x40474a
cmp eax, 2
je 0x4047f6
cmp eax, 0x20
je 0x404794
cmp eax, 0x21
jne 0x4047a1
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40474a
xor esi, esi
jmp 0x4047f9
cmp esi, ebx
je 0x4047a1
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, 0x400
push edi
mov esi, eax
lea eax, [ebp - 0x408]
push ebx
push eax
mov dword [ebp - 8], ebx
call fcn.004082e0
add esp, 0xc
jmp 0x4047e8
push ebx
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0x408]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esi, dword [ebp - 8]
cmp esi, ebx
jg 0x4047cf
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor esi, esi
inc esi
push ebx
push 1
lea ecx, [ebp + 8]
call fcn.004046e7
mov eax, esi
pop esi
pop ebx
leave
ret