joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4426fc
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov ebx, ecx
mov esi, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x442846
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00441c6c
xor eax, eax
push ebp
push 0x442829
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
cmp ebx, 0xffffffff
jne 0x442761
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
je 0x442761
lea eax, [ebp - 8]
push eax
push 0x4004667f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.wsock32.dll_ioctlsocket
jmp 0x442813
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
jne 0x442774
call fcn.00403584
jmp 0x442830
push 0
push ebx
push esi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.wsock32.dll_recv
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x442813
call sub.wsock32.dll_WSAGetLastError
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0x2733
je 0x442813
lea eax, [ebp - 0xc]
push eax
mov cl, 2
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov bx, 0xfffe
call fcn.00402f80
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 8]
cmp dword [ebp - 0xc], 0
je 0x442813
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0xc]
call fcn.0040a5c8
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0xb
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0
mov eax, 0x442860
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0xb
lea eax, [ebp - 0x24]
push eax
push 2
mov ecx, dword [0x44e578]
mov dl, 1
mov eax, dword [0x440c50]
call fcn.0040af00
call fcn.004034e4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x442830
mov eax, dword [ebp - 4]
call fcn.00441c78
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x44284d
lea eax, [ebp - 0x28]
call fcn.00403b0c
ret

Function at 0x4472da
Capabilities:
Check os version

Disassembly:
add esp, 0xffffff6c
mov dword [esp], 0x94
push esp
call sub.kernel32.dll_GetVersionExA
test eax, eax
jne 0x4472f5
xor eax, eax
jmp 0x44733d
mov edx, dword [esp + 0x10]
sub edx, 1
jb 0x447305
je 0x44730c
dec edx
je 0x447326
jmp 0x44733b
mov eax, 3
jmp 0x44733d
mov eax, dword [esp + 8]
test eax, eax
jne 0x44731b
mov eax, 4
jmp 0x44733d
test eax, eax
jbe 0x447326
mov eax, 5
jmp 0x44733d
cmp dword [esp + 4], 5
jae 0x447334
mov eax, 6
jmp 0x44733d
mov eax, 7
jmp 0x44733d
xor eax, eax
add esp, 0x94
ret

Function at 0x448b20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push es
mov ax, 0x101f
mov es, eax
xor eax, eax
mov esi, eax
mov ecx, 0x8000
xor al, byte es:[esi]
inc esi
loop 0x448b35
pop es
mov byte [ebp - 1], al
cmp byte [ebp - 1], 0
jne 0x448b49
mov byte [ebp - 1], 0x55
mov al, byte [ebp - 1]
mov edx, dword [ebp + 8]
mov byte [edx], al
xor eax, eax
pop esi
pop ecx
pop ebp
ret
Function at 0x449ff0
Capabilities:
Encode data using xor
Encrypt data using des
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff9c
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov esi, 0x30
mov ecx, 0x44df7c
mov edx, dword [ebp - 8]
lea eax, [ebp - 0x44]
xor ebx, ebx
mov bl, byte [ecx]
mov edi, dword [ebp - 4]
mov bl, byte [edi + ebx - 1]
xor bl, byte [edx]
mov byte [eax], bl
inc eax
inc edx
inc ecx
dec esi
jne 0x44a012
mov esi, 1
mov edx, 0x44e00c
mov ecx, esi
dec ecx
mov eax, ecx
add eax, eax
lea eax, [eax + eax*2]
shl ecx, 2
xor ebx, ebx
mov bl, byte [ebp + eax - 0x44]
add ebx, ebx
movzx edi, byte [ebp + eax - 0x3f]
add ebx, edi
mov dword [ebp - 0x10], ebx
xor ebx, ebx
mov bl, byte [ebp + eax - 0x43]
shl ebx, 3
movzx edi, byte [ebp + eax - 0x42]
shl edi, 2
add ebx, edi
movzx edi, byte [ebp + eax - 0x41]
add edi, edi
add ebx, edi
movzx eax, byte [ebp + eax - 0x40]
add ebx, eax
mov dword [ebp - 0x14], ebx
mov eax, 1
mov ebx, eax
dec ebx
je 0x44a08e
dec ebx
je 0x44a0b2
dec ebx
je 0x44a0d6
dec ebx
je 0x44a0f9
jmp 0x44a112
mov ebx, dword [ebp - 0x10]
add ebx, ebx
lea ebx, [edx + ebx*8]
mov edi, dword [ebp - 0x14]
mov bl, byte [ebx + edi - 0x40]
and bl, 8
and ebx, 0xff
shr ebx, 3
lea edi, [eax + ecx]
mov byte [ebp + edi - 0x65], bl
jmp 0x44a112
mov ebx, dword [ebp - 0x10]
add ebx, ebx
lea ebx, [edx + ebx*8]
mov edi, dword [ebp - 0x14]
mov bl, byte [ebx + edi - 0x40]
and bl, 4
and ebx, 0xff
shr ebx, 2
lea edi, [eax + ecx]
mov byte [ebp + edi - 0x65], bl
jmp 0x44a112
mov ebx, dword [ebp - 0x10]
add ebx, ebx
lea ebx, [edx + ebx*8]
mov edi, dword [ebp - 0x14]
mov bl, byte [ebx + edi - 0x40]
and bl, 2
and ebx, 0xff
shr ebx, 1
lea edi, [eax + ecx]
mov byte [ebp + edi - 0x65], bl
jmp 0x44a112
mov ebx, dword [ebp - 0x10]
add ebx, ebx
lea ebx, [edx + ebx*8]
mov edi, dword [ebp - 0x14]
mov bl, byte [ebx + edi - 0x40]
and bl, 1
lea edi, [eax + ecx]
mov byte [ebp + edi - 0x65], bl
inc eax
cmp eax, 5
jne 0x44a07b
inc esi
add edx, 0x40
cmp esi, 9
jne 0x44a031
mov esi, 0x20
mov eax, 0x44dfac
mov edx, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax]
mov cl, byte [ebp + ecx - 0x65]
mov byte [edx], cl
inc edx
inc eax
dec esi
jne 0x44a136
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x44a170
Capabilities:
Encrypt data using des

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov dword [ebp - 4], edx
and eax, 0xff
mov bl, byte [eax + 0x44e233]
test bl, bl
jbe 0x44a1a2
mov eax, dword [ebp + 8]
add eax, 0xffffffe4
call fcn.0044a14c
mov eax, dword [ebp + 8]
add eax, 0xffffffc8
call fcn.0044a14c
dec bl
jne 0x44a188
mov cl, 0x30
mov esi, 0x44e204
mov eax, dword [ebp - 4]
mov dl, byte [esi]
cmp dl, 0x1c
ja 0x44a1c4
and edx, 0xff
mov ebx, dword [ebp + 8]
mov dl, byte [ebx + edx - 0x1d]
mov byte [eax], dl
jmp 0x44a1d3
and edx, 0xff
mov ebx, dword [ebp + 8]
mov dl, byte [ebx + edx - 0x55]
mov byte [eax], dl
inc eax
inc esi
dec cl
jne 0x44a1ac
pop esi
pop ebx
pop ecx
pop ebp
ret
Function at 0x44a1e0
Capabilities:
Encode data using xor
Encrypt data using des
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbd4
push ebx
push esi
push edi
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], edx
mov edi, eax
mov bl, 1
lea esi, [ebp - 0x8c]
mov eax, edi
mov edx, ebx
call fcn.00449f80
mov byte [esi], al
inc ebx
inc esi
cmp bl, 0x41
jne 0x44a1fc
mov bl, 0x1c
mov esi, 0x44e1cc
lea edi, [ebp - 0x1c]
lea eax, [ebp - 0x38]
mov dword [ebp - 0x48], eax
mov dl, byte [esi]
mov eax, dword [ebp - 0x40]
call fcn.00449f80
mov byte [edi], al
mov dl, byte [esi + 0x1c]
mov eax, dword [ebp - 0x40]
call fcn.00449f80
mov edx, dword [ebp - 0x48]
mov byte [edx], al
inc dword [ebp - 0x48]
inc edi
inc esi
dec bl
jne 0x44a21e
mov bl, 1
lea esi, [ebp - 0x3cc]
push ebp
mov edx, esi
mov eax, ebx
call fcn.0044a170
pop ecx
inc ebx
add esi, 0x30
cmp bl, 0x11
jne 0x44a24b
mov bl, 1
mov eax, 0x44defc
lea edx, [ebp - 0x3ec]
lea esi, [ebp - 0x42c]
cmp bl, 0x20
ja 0x44a286
xor ecx, ecx
mov cl, byte [eax]
mov cl, byte [ebp + ecx - 0x8d]
mov byte [edx], cl
jmp 0x44a293
xor ecx, ecx
mov cl, byte [eax]
mov cl, byte [ebp + ecx - 0x8d]
mov byte [esi], cl
inc ebx
inc esi
inc edx
inc eax
cmp bl, 0x41
jne 0x44a272
mov byte [ebp - 0x41], 1
lea eax, [ebp - 0x3cc]
mov dword [ebp - 0x4c], eax
cmp byte [ebp + 8], 0
je 0x44a2c7
lea ecx, [ebp - 0x42c]
mov eax, dword [ebp - 0x4c]
mov edx, eax
lea eax, [ebp - 0x40c]
call fcn.00449ff0
jmp 0x44a2f2
xor eax, eax
mov al, byte [ebp - 0x41]
mov edx, 0x11
sub edx, eax
mov eax, edx
add eax, eax
lea eax, [eax + eax*2]
lea edx, [ebp + eax*8 - 0x3fc]
lea ecx, [ebp - 0x42c]
lea eax, [ebp - 0x40c]
call fcn.00449ff0
mov bl, 0x20
lea eax, [ebp - 0x3ec]
lea edx, [ebp - 0x42c]
mov cl, byte [eax]
xor byte [edx], cl
inc edx
inc eax
dec bl
jne 0x44a300
lea esi, [ebp - 0x40c]
lea edi, [ebp - 0x3ec]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x42c]
lea edi, [ebp - 0x40c]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
inc byte [ebp - 0x41]
add dword [ebp - 0x4c], 0x30
cmp byte [ebp - 0x41], 0x11
jne 0x44a2a9
mov bl, 0x40
mov eax, 0x44df3c
mov dword [ebp - 0x4c], eax
lea esi, [ebp - 0xcc]
mov eax, dword [ebp - 0x4c]
mov al, byte [eax]
cmp al, 0x20
ja 0x44a36a
and eax, 0xff
mov al, byte [ebp + eax - 0x40d]
mov byte [esi], al
jmp 0x44a378
and eax, 0xff
mov al, byte [ebp + eax - 0x40d]
mov byte [esi], al
inc esi
inc dword [ebp - 0x4c]
dec bl
jne 0x44a351
mov bl, 1
lea esi, [ebp - 0xcc]
mov cl, byte [esi]
mov eax, dword [ebp - 0x3c]
mov edx, ebx
call fcn.00449fa8
inc ebx
inc esi
cmp bl, 0x41
jne 0x44a388
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x44a43c
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
mov esi, dword [eax]
mov edi, dword [ecx]
mov eax, ebx
mov ecx, 3
xor edx, edx
div ecx
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
lea ecx, [0x44e244]
xor eax, eax
xor ebx, ebx
xor edx, edx
cmp dword [ebp - 4], 0
je 0x44a4a4
lodsw ax, word [esi]
mov bl, al
shr bl, 2
mov dl, byte [ecx + ebx]
mov bh, ah
and bh, 0xf
rol ax, 4
and ax, 0x3f
mov dh, byte [ecx + eax]
mov ax, dx
stosw word es:[edi], ax
lodsb al, byte [esi]
mov bl, al
shr bx, 6
mov dl, byte [ecx + ebx]
and al, 0x3f
xor ah, ah
mov dh, byte [ecx + eax]
mov ax, dx
stosw word es:[edi], ax
dec dword [ebp - 4]
jne 0x44a469
cmp dword [ebp - 8], 0
je 0x44a4f4
xor eax, eax
xor ebx, ebx
xor edx, edx
lodsb al, byte [esi]
shl ax, 6
mov bl, ah
mov dl, byte [ecx + ebx]
dec dword [ebp - 8]
je 0x44a4df
shl ax, 2
and ah, 3
lodsb al, byte [esi]
shl ax, 4
mov bl, ah
mov dh, byte [ecx + ebx]
shl edx, 0x10
shr al, 2
mov bl, al
mov dl, byte [ecx + ebx]
mov dh, 0x3d
jmp 0x44a4ee
shr al, 2
mov bl, al
mov dh, byte [ecx + ebx]
shl edx, 0x10
mov dh, 0x3d
mov dl, 0x3d
mov eax, edx
ror eax, 0x10
stosd dword es:[edi], eax
pop ecx
pop ecx
pop ebp
ret
Function at 0x401a40
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 8]
mov ecx, dword [ecx]
lea eax, [esp + 8]
push 0
push eax
mov eax, dword [esp + 0xc]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8

Function at 0x41e7b0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x11000]
push edi
or ebp, 0xffffffff
jmp 0x41e7d2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x41e7d9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x41e7c8
mov eax, 1
add ebx, ebx
jne 0x41e7eb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x41e7e0
jne 0x41e7fc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x41e7e0
xor ecx, ecx
sub eax, 3
jb 0x41e810
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x41e882
mov ebp, eax
add ebx, ebx
jne 0x41e81b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x41e828
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x41e84c
inc ecx
add ebx, ebx
jne 0x41e838
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x41e82d
jne 0x41e849
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x41e82d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x41e86c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x41e85d
jmp 0x41e7ce
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x41e86c
add edi, ecx
jmp 0x41e7ce
pop esi
mov edi, esi
mov ecx, 0x10a
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x41e88a
cmp byte [edi], 2
jne 0x41e88a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov eax, ebx
loop 0x41e88f
lea edi, [esi + 0x1c000]
mov eax, dword [edi]
or eax, eax
je 0x41e8fe
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x1ec1c]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x1eca8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x41e8bc
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x1ecac]
or eax, eax
je 0x41e8f8
mov dword [ebx], eax
add ebx, 4
jmp 0x41e8d9
call dword [esi + 0x1ecb0]
popal
jmp 0x402f2d
Function at 0x40533f
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40537e
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40537e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40537e
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40537e
cmp dword [ecx + 0x74], 0xe
jbe 0x40537e
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x4116ab
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4225c8
push 0x4225c0
push str.FlsAlloc
push 0x1f
call fcn.0041156a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4116df
push dword [ebp + 8]
mov ecx, esi
call dword [0x420184]
call esi
jmp 0x4116e5
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x411729
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4225d8
push 0x4225d0
push str.FlsGetValue
push 0x21
call fcn.0041156a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x411760
push dword [ebp + 8]
mov ecx, esi
call dword [0x420184]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x411768
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4225e0
push 0x4225d8
push str.FlsSetValue
push 0x22
call fcn.0041156a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4117a2
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x420184]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x41518b
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 0x415228
push ebx
push esi
call fcn.00415154
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.004150e8
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4151d5
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x415227
push edi
push eax
call fcn.00412814
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4151f5
call fcn.004113fd
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x415226
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004150e8
add esp, 0x20
test eax, eax
jne 0x415214
push edi
call fcn.004113fd
jmp 0x41521c
push ebx
call fcn.004113fd
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 0x41ba85
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]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.0041ba01
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x41bbf4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x41bbf4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x41bba9
jg 0x41bae1
test eax, eax
je 0x41bb9f
push 1
push 0x1000
call fcn.004113a0
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x41bb04
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x41bb96
push 0x8000
push ebx
call fcn.0040fa6c
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x41bb2d
jg 0x41bb28
cmp ecx, 0x1000
jb 0x41bb2d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00418473
add esp, 0x10
cmp eax, 0xffffffff
je 0x41bb72
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 0x41bb28
jl 0x41bb59
test ecx, ecx
jne 0x41bb1a
push dword [ebp - 0xc]
push ebx
call fcn.0040fa6c
push esi
call fcn.004113fd
add esp, 0xc
xor ebx, ebx
jmp 0x41bc02
cmp byte [edi + 0x24], 0
je 0x41bb89
cmp dword [edi + 0x20], 5
jne 0x41bb89
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x41bb94
mov ebx, dword [edi + 0x18]
jmp 0x41bb96
xor ebx, ebx
push esi
call fcn.004113fd
pop ecx
jmp 0x41bc02
test ecx, ecx
jg 0x41bb6b
jl 0x41bba9
test eax, eax
jae 0x41bb6b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041c784
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x41bbc9
cmp byte [edi + 0x1c], 0
je 0x41bb6b
jmp 0x41bbfa
push ebx
call fcn.004159cb
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x41bb6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x41bc02
cmp byte [edi + 0x1c], 0
je 0x41bbff
mov ebx, dword [edi + 0x18]
jmp 0x41bc02
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0041c784
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41bc1c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x42c0b0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41bc5c
cmp byte [ebx], 0xa
jne 0x41bc5c
or byte [edi + eax + 0x28], 4
jmp 0x41bc61
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x41bd60
mov dl, byte [eax]
cmp dl, 0x1a
je 0x41bd43
inc eax
cmp dl, 0xd
je 0x41bc8d
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x41bcb3
cmp eax, ecx
jae 0x41bcc1
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x41bc75
jmp 0x41bd60
push 0
lea eax, [ebp - 0x10]
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 0x41bd3e
cmp dword [ebp - 0x10], 0
je 0x41bd3e
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x42c0b0]
test byte [eax + edi + 0x28], 0x48
je 0x41bd18
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41bd03
mov byte [esi], dl
jmp 0x41bd14
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x42c0b0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41bd60
cmp byte [ebp - 1], 0xa
jne 0x41bd27
cmp esi, ebx
jne 0x41bd27
mov byte [esi], 0xa
jmp 0x41bd5f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041c784
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41bd60
mov byte [esi], 0xd
jmp 0x41bd5f
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x42c0b0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41bd5d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41bd60
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41bd69
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x42c0b0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41bdaf
cmp word [ebx], dx
jne 0x41bdaf
or byte [eax + edi + 0x28], 4
jmp 0x41bdb4
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x41bf17
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x41bef7
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x41bdf5
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41be2b
cmp eax, edx
jae 0x41be39
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x41bdd0
jmp 0x41bf17
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41bef2
cmp dword [ebp - 0x18], 0
je 0x41bef2
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x42c0b0]
test byte [eax + edi + 0x28], 0x48
je 0x41bec8
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x41be8c
mov word [esi], cx
jmp 0x41bec3
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x42c0b0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x42c0b0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x42c0b0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x41bf17
pop eax
cmp word [ebp - 4], ax
jne 0x41bed8
cmp esi, ebx
jne 0x41bed8
mov word [esi], ax
jmp 0x41bf14
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041c784
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x41bf17
push 0xd
pop eax
jmp 0x41bed3
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x42c0b0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x41bf11
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x41bf17
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41e6a0
Capabilities:
Parse pe header

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