joyce8/EMBER2024-capa huggingface dataset:
Function at 0x102987b6
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp edx, 0x33ff
jg 0x102987e1
add edx, edx
movzx eax, dx
movzx edx, word [ecx]
cmp eax, edx
jbe 0x1029882d
and edx, 1
lea ecx, [ecx + edx*2]
add ecx, 4
jmp 0x102987cf
mov esi, edx
shr esi, 9
add esi, 0x3400
shl edx, 6
and esi, 0xfffe
xor eax, eax
dec eax
movzx ebx, word [ecx]
cmp esi, ebx
jbe 0x10298809
and ebx, 1
or ebx, 2
mov edi, ebx
jmp 0x10298828
mov edi, ebx
and edi, 0x7ffe
cmp esi, edi
jne 0x10298864
movzx edi, word [ecx + 2]
cmp di, dx
jae 0x1029884e
mov edi, 3
test bx, bx
js 0x10298864
lea ecx, [ecx + edi*2]
jmp 0x102987f8
mov ebx, edx
and ebx, 0x7ffe
cmp eax, ebx
jne 0x10298849
movzx eax, word [ecx + 2]
test dl, 1
je 0x10298864
shl eax, 0x10
mov edi, eax
jmp 0x1029885e
xor eax, eax
dec eax
jmp 0x10298864
xor edx, edi
test edx, 0xffc0
jne 0x10298864
and edi, 0x3f
shl edi, 0x10
movzx eax, word [ecx + 4]
or eax, edi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x1029c030
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x218
mov eax, dword [0x103c2010]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
dec eax
lea edi, [ebp - 0x220]
mov dword [edi + 4], eax
mov dword [edi], eax
push edi
call sub.ntdll.dll_RtlFormatCurrentUserKeyPath
test eax, eax
js 0x1029c181
mov dword [ebp - 0x224], eax
mov esi, 0xff
mov ebx, 0x103da58a
push esi
push dword [ebp - 0x21c]
push ebx
call fcn.10310675
add esp, 0xc
push ebx
call fcn.1030fc76
add esp, 4
sub esi, eax
push esi
push 0x103565aa
push ebx
call fcn.10310675
add esp, 0xc
push edi
call sub.ntdll.dll_RtlFreeUnicodeString
lea esi, [ebp - 0x218]
push 0x208
push 0
push esi
call fcn.102f7d80
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, eax
push 0x104
push esi
push str.PROGRAMFILES
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [eax - 1]
cmp ecx, 0x102
ja 0x1029c0eb
push eax
push esi
push edi
call fcn.103106ba
add esp, 0xc
test eax, eax
je 0x1029c11a
push 0x104
push esi
push str.PROGRAMFILES_X86_
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [eax - 1]
cmp ecx, 0x102
ja 0x1029c116
push eax
push esi
push edi
call fcn.103106ba
add esp, 0xc
test eax, eax
je 0x1029c11a
xor eax, eax
jmp 0x1029c11c
mov al, 1
mov byte [0x103da189], al
mov dword [ebp - 0x218], 0
push 0x10358472
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x10399872
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1029c16c
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ebx, eax
mov ecx, edi
call dword [section..00cfg]
push esi
push ebx
call edi
test eax, eax
je 0x1029c16c
cmp dword [ebp - 0x218], 0
setne cl
jmp 0x1029c16e
xor ecx, ecx
mov eax, dword [ebp - 0x224]
mov byte [0x103da78a], cl
mov byte [0x103da188], 1
test eax, eax
setns bl
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102f4c53
mov eax, ebx
add esp, 0x218
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x1029c2c1
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x44
mov ebx, edx
mov edi, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [0x103c2010]
xor eax, ebp
mov dword [ebp - 0x10], eax
movzx eax, byte [ecx + 0xb]
test al, al
jns 0x1029c2e6
mov eax, dword [ecx + 4]
test eax, eax
je 0x1029c30f
bt ebx, 8
jae 0x1029c2f9
mov eax, ebx
and eax, 0x200
jne 0x1029c30f
cmp edi, 2
mov eax, 0x103da18a
mov ecx, 0x103da38a
cmove ecx, eax
cmp word [ecx], 0
je 0x1029c321
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102f4c53
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret
xorps xmm0, xmm0
lea esi, [ebp - 0x34]
movups xmmword [esi + 0x10], xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x20], 0
push esi
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp word [esi], 0
je 0x1029c30f
cmp byte [0x103da78a], 0
setne al
bt ebx, 8
jb 0x1029c30f
shr ebx, 9
and ebx, 1
or bl, al
je 0x1029c30f
cmp edi, 2
mov eax, 0x103aa7e0
mov edx, 0x103aa7f4
cmove edx, eax
mov eax, dword [ebp + 8]
movzx ebx, byte [eax + 0xb]
test bl, bl
js 0x1029c37f
mov ecx, ebx
mov esi, eax
mov eax, ebx
jmp 0x1029c384
mov esi, dword [eax]
mov eax, dword [eax + 4]
xor ecx, ecx
inc ecx
mov dword [ebp - 0x44], ecx
xor ecx, ecx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x50], ecx
mov ebx, dword [edx + 4]
mov edi, eax
sub edi, ebx
jb 0x1029c3c9
push ebx
push dword [edx]
push esi
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], eax
call fcn.1030ba80
mov edx, dword [ebp - 0x4c]
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x48]
je 0x1029c3d7
add edx, 0x14
mov ecx, dword [ebp - 0x50]
inc ecx
cmp ecx, dword [ebp - 0x44]
jb 0x1029c3a1
jmp 0x1029c437
movzx ecx, word [esi + ebx*2]
cmp ecx, 0x5c
je 0x1029c3e4
test ecx, ecx
jne 0x1029c3c9
lea eax, [esi + ebx*2]
mov ebx, dword [edx + 8]
cmp ebx, 1
je 0x1029c402
cmp ebx, 2
mov esi, ebx
jne 0x1029c40e
mov dword [ebp - 0x3c], str.WOW6432Node
mov dword [ebp - 0x38], eax
jmp 0x1029c40e
mov dword [ebp - 0x3c], str.WOW6432Node_
mov dword [ebp - 0x38], esi
mov esi, ebx
mov dword [ebp - 0x40], esi
cmp cx, 0x5c
jne 0x1029c426
lea esi, [eax + 2]
dec edi
cmp word [eax + 2], 0x5c
mov eax, esi
je 0x1029c417
jmp 0x1029c428
mov esi, eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x44], eax
mov edx, dword [edx + 0xc]
xor ecx, ecx
mov eax, edi
jmp 0x1029c3d0
cmp dword [ebp - 0x40], 0
je 0x1029c30f
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0xb], 0
mov eax, ecx
jns 0x1029c44e
mov eax, dword [ecx]
mov edx, dword [ebp - 0x38]
sub edx, eax
sar edx, 1
push dword [ebp - 0x3c]
push edx
call fcn.101e140c
jmp 0x1029c30f
Function at 0x1029c650
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [0x103c2010]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp byte [0x103da188], 0
jne 0x1029c679
call fcn.1029c030
test al, al
je 0x1029c70a
mov eax, dword [ebp + 0xc]
xor ecx, ecx
lea edx, [ebp - 0x1c]
mov dword [edx + 4], ecx
mov dword [edx], ecx
push eax
push edx
call sub.ntdll.dll_RtlInitUnicodeString
mov eax, 0x18
lea esi, [ebp - 0x20]
mov dword [esi], eax
xor edx, edx
dec edx
lea ecx, [ebp - 0x2c]
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
push eax
call fcn.100ac1c0
mov edi, 5
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x20]
call fcn.10091750
mov ebx, dword [ebp - 0x2c]
push esi
push dword [ebp - 0x20]
push ebx
push 1
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 8]
call sub.ntdll.dll_NtQueryValueKey
cmp eax, 0xc0000023
je 0x1029c6df
cmp eax, 0x80000005
jne 0x1029c6e6
dec edi
jne 0x1029c6b0
xor ebx, ebx
jmp 0x1029c718
test eax, eax
js 0x1029c6e2
mov eax, dword [ebx + 4]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x1029c70e
add ebx, dword [ebx + 8]
add eax, ebx
mov ecx, dword [ebp + 0x14]
push eax
push ebx
call fcn.1009477c
jmp 0x1029c716
xor ebx, ebx
jmp 0x1029c725
mov ecx, dword [ebp + 0x14]
call fcn.1009064e
mov bl, 1
lea ecx, [ebp - 0x14]
lea eax, [ebp - 0x2c]
mov dword [ecx], eax
call fcn.1009062c
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102f4c53
mov eax, ebx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x102b7e50
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x103c2010]
xor ecx, ebp
mov dword [ebp - 0x10], ecx
cmp eax, 3
jne 0x102b7f6d
mov dword [ebp - 0x14], 0x102b8010
lea eax, [ebp - 0x14]
push 0
push eax
push 0x102b7e10
push 0x103da8b0
call dword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x102b7f81
cmp dword [0x103da8b4], 0
jne 0x102b7f6d
push dword [0x103da8b8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x102b7f6d
mov esi, eax
push 0x103da8bc
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov edi, dword [0x103da8c0]
mov ebx, dword [0x103da8c4]
mov eax, dword [0x103da8c8]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x103da8cc]
mov dword [ebp - 0x20], eax
mov eax, dword [0x103da8d0]
mov dword [ebp - 0x24], eax
push 0x103da8bc
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test edi, edi
je 0x102b7f0b
mov eax, dword [esi]
mov dword [ebp - 0x18], eax
mov ecx, edi
call dword [section..00cfg]
push dword [ebp - 0x18]
call edi
add esp, 4
test ebx, ebx
je 0x102b7f20
mov edi, dword [esi + 4]
mov ecx, ebx
call dword [section..00cfg]
push edi
call ebx
add esp, 4
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x102b7f36
mov edi, dword [esi + 8]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
mov ecx, dword [ebp - 0x20]
test ecx, ecx
mov ebx, dword [ebp - 0x24]
je 0x102b7f4f
mov edi, dword [esi + 0xc]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
test ebx, ebx
je 0x102b7f64
mov edi, dword [esi + 0x10]
mov ecx, ebx
call dword [section..00cfg]
push edi
call ebx
add esp, 4
push esi
call fcn.10200c50
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102f4c53
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
call fcn.10308bbb
int3

Function at 0x102b7f90
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov eax, dword [0x103c2010]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 0x102b8010
lea eax, [ebp - 0x14]
push 0
push eax
push 0x102b7e10
push 0x103da8b0
call dword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x102b800a
xor esi, esi
cmp dword [0x103da8b4], 0
jne 0x102b7ff6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [0x103da8b8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x102b7ff6
mov eax, dword [ebp + 8]
mov esi, dword [edi + eax*4]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102f4c53
mov eax, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.10308bbb
int3
Function at 0x102b8030
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov eax, dword [0x103c2010]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 0x102b8010
lea eax, [ebp - 0x14]
push 0
push eax
push 0x102b7e10
push 0x103da8b0
call dword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x102b811d
mov esi, dword [ebp + 0x10]
cmp dword [0x103da8b4], 0
je 0x102b8088
mov ecx, esi
call dword [section..00cfg]
push dword [ebp + 0xc]
call esi
add esp, 4
xor esi, esi
jmp 0x102b80d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [0x103da8b8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x102b80e8
mov ebx, dword [ebp + 8]
push 0x103da8bc
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov dword [ebx*4 + 0x103da8c0], esi
push 0x103da8bc
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, dword [ebp + 0xc]
mov dword [edi + ebx*4], eax
mov esi, 1
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102f4c53
mov eax, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x14
push 1
call fcn.10200cd0
add esp, 8
test eax, eax
je 0x102b8074
mov edi, eax
push eax
push dword [0x103da8b8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x102b80a9
push edi
call fcn.10200c50
add esp, 4
jmp 0x102b8074
call fcn.10308bbb
int3
Function at 0x102c97e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x103da950]
mov ecx, dword [0x103c75a0]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x102c980b
mov ecx, 0x103da948
pop ebp
jmp fcn.10207c20
push 0x103da950
call fcn.102f3cd7
add esp, 4
cmp dword [0x103da950], 0xffffffff
jne 0x102c9800
mov dword [0x103da94c], 0
mov dword [0x103da948], 0
mov ecx, 0x103da948
push 0
call fcn.10207c90
push 0x103da950
call fcn.102f3d4d
add esp, 4
jmp 0x102c9800

Function at 0x102ced0e
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x60
mov eax, dword [0x103c2010]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x68], 0
mov esi, dword [0x103da988]
test esi, esi
jne 0x102cee00
push 0x55
push 0x103da98c
push 0x5c
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jle 0x102cede7
xor eax, eax
mov dword [ebp - 0x13], eax
mov dword [ebp - 0x17], eax
xorps xmm0, xmm0
movups xmmword [ebp - 0x24], xmm0
movups xmmword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
movups xmmword [ebp - 0x54], xmm0
movups xmmword [ebp - 0x64], xmm0
movzx ecx, word [eax + eax + 0x103da98c]
cmp cx, 0x5f
jne 0x102ced82
mov byte [ebp + eax - 0x64], 0x2d
jmp 0x102ced8a
mov byte [ebp + eax - 0x64], cl
test cl, cl
je 0x102ced94
inc eax
cmp eax, 0x55
jne 0x102ced6d
mov byte [ebp - 0x10], 0
push 0x41
call fcn.102ce8d0
add esp, 4
test eax, eax
je 0x102cede7
mov esi, eax
lea edi, [ebp - 0x68]
lea eax, [ebp - 0x64]
push edi
push 0x40
push esi
push eax
call fcn.102abbfa
add esp, 0x10
cmp dword [edi], 0
jle 0x102cedc7
push esi
call fcn.102ce9b0
add esp, 4
jmp 0x102cede7
mov byte [esi + eax], 0
mov dword [0x103da988], esi
mov byte [0x103daa36], 1
push 0x102ceaa0
push 0x18
call fcn.1029ba38
add esp, 8
mov esi, dword [0x103da988]
test esi, esi
jne 0x102cee00
mov dword [0x103da988], str.en_US
mov esi, str.en_US
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.102f4c53
mov eax, esi
add esp, 0x60
pop esi
pop edi
pop ebp
ret
Function at 0x102eec50
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, dword [0x103dab60]
mov ecx, dword [0x103c75a0]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x102eecc3
mov ecx, 0x103dab58
call fcn.10207c20
test eax, eax
jne 0x102eecb6
push 4
call fcn.102f3c36
add esp, 4
mov edi, eax
mov dword [eax], 0
mov ecx, 0x103dab58
call fcn.10207c20
mov esi, eax
mov ecx, 0x103dab58
push edi
call fcn.10207c50
test esi, esi
je 0x102eecb6
push esi
call fcn.102f3c66
add esp, 4
mov ecx, 0x103dab58
pop esi
pop edi
pop ebp
jmp fcn.10207c20
push 0x103dab60
call fcn.102f3cd7
add esp, 4
cmp dword [0x103dab60], 0xffffffff
jne 0x102eec72
mov dword [0x103dab5c], 0
mov dword [0x103dab58], 0
mov ecx, 0x103dab58
push 0x100bfb30
call fcn.10207c90
push 0x103dab60
call fcn.102f3d4d
add esp, 4
jmp 0x102eec72

Function at 0x10302daf
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10302dee
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10302dee
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10302dee
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10302dee
cmp dword [ecx + 0x74], 0xe
jbe 0x10302dee
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x103030c0
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.10303257
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x1030322f
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x1030322f
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x103031e4
jg 0x1030311c
test eax, eax
je 0x103031da
push 1
push 0x1000
call fcn.10200cd0
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1030313f
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x103031d1
push 0x8000
push ebx
call fcn.10308c2c
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10303168
jg 0x10303163
cmp ecx, 0x1000
jb 0x10303168
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.1030bd9c
add esp, 0x10
cmp eax, 0xffffffff
je 0x103031ad
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 0x10303163
jl 0x10303194
test ecx, ecx
jne 0x10303155
push dword [ebp - 0xc]
push ebx
call fcn.10308c2c
push esi
call fcn.10200c50
add esp, 0xc
xor ebx, ebx
jmp 0x1030323d
cmp byte [edi + 0x24], 0
je 0x103031c4
cmp dword [edi + 0x20], 5
jne 0x103031c4
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x103031cf
mov ebx, dword [edi + 0x18]
jmp 0x103031d1
xor ebx, ebx
push esi
call fcn.10200c50
pop ecx
jmp 0x1030323d
test ecx, ecx
jg 0x103031a6
jl 0x103031e4
test eax, eax
jae 0x103031a6
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10307d46
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10303204
cmp byte [edi + 0x1c], 0
je 0x103031a6
jmp 0x10303235
push ebx
call fcn.103068aa
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x103031a6
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 0x1030323d
cmp byte [edi + 0x1c], 0
je 0x1030323a
mov ebx, dword [edi + 0x18]
jmp 0x1030323d
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10307d46
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10306362
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.102f5080
mov eax, dword [0x103c2010]
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.10305fbc
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x103063a4
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x10306500
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.10318730
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 + 0x103c7f60]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.10307da4
mov ecx, dword [esi*4 + 0x103c7f60]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x103064f9
cmp eax, dword [ecx + edi + 0x24]
jne 0x103064f9
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x103064f9
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10307da4
add esp, 0x14
test edx, edx
jl 0x103064f9
jg 0x1030646f
test eax, eax
jb 0x103064f9
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x103064f9
jl 0x10306489
cmp dword [ebp - 0x1008], eax
ja 0x103064f9
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x103064a7
test ebx, ebx
je 0x103064e0
cmp ecx, edi
jae 0x103064e0
mov al, byte [ecx]
cmp al, 0xd
jne 0x103064c1
lea eax, [edi - 1]
cmp ecx, eax
jae 0x103064cd
cmp byte [ecx + 1], 0xa
jne 0x103064cd
inc ecx
jmp 0x103064cd
movzx eax, al
movsx eax, byte [eax + 0x103c2270]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x103064a7
cmp edx, ebx
jne 0x103064a7
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x103064fe
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.102f4c53
leave
ret

Function at 0x10306d36
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x103c2010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x10306d79
call fcn.10305ba0
mov dword [eax], 0xf
call fcn.10305b8d
mov dword [eax], 0xd
call fcn.10307701
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102f4c53
leave
ret
test eax, eax
jne 0x10306d80
inc eax
jmp 0x10306d6d
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x10306d6b
xor eax, eax
cmp ecx, 1
setne al
jmp 0x10306d6d
Function at 0x1030874e
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 + 0x103c7f60]
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 0x1030878e
cmp byte [ebx], 0xa
jne 0x1030878e
or byte [edi + eax + 0x28], 4
jmp 0x10308793
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 0x10308892
mov dl, byte [eax]
cmp dl, 0x1a
je 0x10308875
inc eax
cmp dl, 0xd
je 0x103087bf
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x103087e5
cmp eax, ecx
jae 0x103087f3
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 0x103087a7
jmp 0x10308892
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 0x10308870
cmp dword [ebp - 0x10], 0
je 0x10308870
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x103c7f60]
test byte [eax + edi + 0x28], 0x48
je 0x1030884a
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10308835
mov byte [esi], dl
jmp 0x10308846
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x103c7f60]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10308892
cmp byte [ebp - 1], 0xa
jne 0x10308859
cmp esi, ebx
jne 0x10308859
mov byte [esi], 0xa
jmp 0x10308891
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10307d46
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10308892
mov byte [esi], 0xd
jmp 0x10308891
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x103c7f60]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1030888f
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10308892
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret