joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1049b1c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x1082e88
call fcn.01068a88
sub esp, 0x10
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x10], ebx
push 2
push ebx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ebx
call fcn.0104899e
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x14], esi
jne 0x1049b78
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1049b63
call esi
mov esi, eax
jmp 0x1049c8f
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x1049c8f
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, ebx
je 0x1049b99
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
cmp esi, ebx
jne 0x1049bc1
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1049bac
call esi
jmp 0x1049c84
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x1049c86
push edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
cmp byte [ebx + esi], 0
mov edi, esi
je 0x1049c2f
lea edi, [ebx + 1]
cmp edi, 0x400
ja 0x1049bfc
push edi
call fcn.010269cd
test al, al
je 0x1049bfc
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.01069670
mov dword [ebp + 8], esp
jmp 0x1049c08
push edi
lea ecx, [ebp - 0x10]
call fcn.010272dd
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
test eax, eax
jne 0x1049c16
mov esi, 0x8007000e
jmp 0x1049c86
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
mov byte [eax + ebx], 0
test edi, edi
jne 0x1049c37
xor eax, eax
jmp 0x1049c78
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea ebx, [esi + esi]
cmp ebx, 0x400
ja 0x1049c67
push ebx
call fcn.010269cd
test al, al
je 0x1049c67
mov eax, ebx
add eax, 3
and eax, 0xfffffffc
call fcn.01069670
mov eax, esp
jmp 0x1049c70
push ebx
lea ecx, [ebp - 0x10]
call fcn.010272dd
push esi
push edi
push eax
call fcn.01026a6b
push dword [ebp + 0x14]
lea ecx, [ebp - 0x1c]
push eax
call fcn.01049857
mov esi, eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [ebp - 0x10]
call fcn.01026aa8
mov eax, esi
lea esp, [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x1051ed8
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
mov eax, 0x1083e9f
call fcn.01068a88
sub esp, 0x2c
push ebx
push esi
lea eax, [ebp - 0xd]
mov esi, ecx
push eax
mov dword [ebp - 0x14], esi
call fcn.01059f69
lea eax, [ebp - 0xd]
xor ebx, ebx
push eax
lea ecx, [esi + 0xc]
mov dword [ebp - 4], ebx
call fcn.01059f69
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x18]
mov byte [ebp - 4], 1
call fcn.01059f69
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x24]
mov byte [ebp - 4], 2
call fcn.01059f69
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x30]
mov byte [ebp - 4], 3
call fcn.01059f69
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x40]
mov byte [ebp - 4], 4
mov dword [esi + 0x3c], ebx
call fcn.01059f69
lea ecx, [esi + 0x50]
mov byte [ebp - 4], 5
mov byte [esi + 0x4c], bl
call fcn.01025594
lea ecx, [esi + 0x98]
mov byte [ebp - 4], 6
mov byte [esi + 0x94], bl
mov byte [esi + 0x95], 1
call fcn.0104f22a
push 0x100937c
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 7
mov byte [esi + 0xc8], bl
mov byte [esi + 0xc9], bl
call fcn.01012a13
lea eax, [ebp - 0x24]
push eax
push 1
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 8
call fcn.010732b1
push 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 7
call fcn.0101260e
lea ecx, [ebp - 0x38]
call fcn.010733db
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x1051fce
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
mov eax, 0x108401a
call fcn.01068a88
sub esp, 0x24
push ebx
push esi
mov esi, ecx
push 0x1009148
lea ecx, [ebp - 0x1c]
call fcn.01012a13
lea eax, [ebp - 0x1c]
push eax
xor ebx, ebx
push 4
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], ebx
call fcn.010732b1
push 1
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.0101260e
push esi
call fcn.0104f1f1
lea eax, [esi + 0xc]
push eax
call fcn.0104f1f1
lea eax, [esi + 0x18]
push eax
call fcn.0104f1f1
lea eax, [esi + 0x24]
push eax
call fcn.0104f1f1
lea eax, [esi + 0x30]
push eax
call fcn.0104f1f1
lea eax, [esi + 0x40]
push eax
call fcn.0104f1f1
lea ecx, [esi + 0x50]
mov dword [esi + 0x3c], ebx
call fcn.01025e49
lea ecx, [esi + 0x98]
mov byte [esi + 0x4c], bl
mov byte [esi + 0xc8], bl
mov byte [esi + 0x94], bl
mov byte [esi + 0x95], 1
mov byte [esi + 0xc9], bl
call fcn.01050f0d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.010733db
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x1053416
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
mov eax, 0x1084195
call fcn.01068a88
sub esp, 0x2c
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], esi
and dword [ebp - 4], 0
push 0x10094e4
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 8
call fcn.01012a13
lea eax, [ebp - 0x24]
push eax
push 1
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 9
call fcn.010732b1
push 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 8
call fcn.0101260e
lea ecx, [ebp - 0x38]
call fcn.010733db
jmp 0x1053476
mov ecx, esi
mov dword [ebp - 4], 7
call fcn.01051fce
lea ecx, [esi + 0x98]
mov byte [ebp - 4], 6
call fcn.01051e8a
lea ecx, [esi + 0x50]
mov byte [ebp - 4], 5
call fcn.01025ed0
lea ecx, [esi + 0x40]
call fcn.0105aacd
lea ecx, [esi + 0x30]
call fcn.0105aacd
lea ecx, [esi + 0x24]
call fcn.0105aacd
lea ecx, [esi + 0x18]
call fcn.0105aacd
lea ecx, [esi + 0xc]
call fcn.0105aacd
mov ecx, esi
call fcn.0105aacd
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret

Function at 0x1056300
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x1097470]
push ebx
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], ebx
jne 0x1056326
push 0x57
pop eax
jmp 0x1056405
push esi
lea eax, [ebp - 0x10]
push eax
push 1
push 0xa
mov byte [edi], bl
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x105636f
call esi
cmp eax, 0x3f0
je 0x1056358
call esi
jmp 0x1056404
lea eax, [ebp - 0x10]
push eax
push 0xa
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1056351
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], 5
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ntdll.dll_RtlAllocateAndInitializeSid]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
cmp dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], eax
jl 0x10563f8
lea eax, [ebp - 0x14]
push eax
push 2
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x10563ea
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x10563df
mov byte [edi], bl
call esi
mov dword [ebp - 0x18], eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10563ef
call esi
mov dword [ebp - 0x18], eax
push dword [ebp - 0x1c]
call dword [sym.imp.ntdll.dll_RtlFreeSid]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.01067393
leave
ret 4
Function at 0x105bade
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
mov eax, 0x1085045
call fcn.01068a88
sub esp, 0x1d8
mov eax, dword [0x1097470]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
push 0x100d3d8
lea ecx, [ebp - 0x1d0]
mov dword [ebp - 0x1b0], eax
call fcn.01012a13
lea eax, [ebp - 0x1d0]
push eax
xor ebx, ebx
push 4
lea ecx, [ebp - 0x1e4]
mov dword [ebp - 4], ebx
call fcn.010732b1
push 1
lea ecx, [ebp - 0x1d0]
call fcn.0101260e
mov dword [ebp - 0x1bc], ebx
mov dword [ebp - 0x1b8], ebx
mov dword [ebp - 0x1b4], ebx
push ebx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, esi
mov byte [ebp - 4], 3
call fcn.01071c47
lea eax, [ebp - 0x1a0]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, ebx
jne 0x105bc0b
push 1
push 0x7f02
lea ecx, [ebp - 0x1a8]
call fcn.01074fcc
mov eax, dword [ebp - 0x1bc]
cmp eax, ebx
mov byte [ebp - 4], 4
jne 0x105bb9b
mov eax, 0x10048f8
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x1a4], ebx
je 0x105bbea
mov eax, dword [esi + 0xc]
mov eax, dword [eax]
cmp eax, ebx
je 0x105bbf6
push edi
xor edi, edi
push dword [eax]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [ebp - 0x1b0]
mov dword [ebp - 0x1ac], eax
lea eax, [ebp - 0x1ac]
push eax
call fcn.0105a91e
mov eax, dword [esi + 0xc]
add edi, 4
mov eax, dword [edi + eax]
cmp eax, ebx
jne 0x105bbba
pop edi
jmp 0x105bbf6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1a4], eax
lea ecx, [ebp - 0x1a8]
mov byte [ebp - 4], 3
call fcn.01074b0a
mov ebx, dword [ebp - 0x1a4]
push 1
lea ecx, [ebp - 0x1c0]
call fcn.010270d3
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1e4]
call fcn.010733db
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
mov eax, ebx
pop ebx
call fcn.01067393
leave
ret 8

Function at 0x1067393
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1097470]
jne 0x10673a4
test ecx, 0xffff0000
jne 0x10673a4
ret
jmp fcn.010673ae
Function at 0x1069fe4
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov ecx, dword [ebp + 8]
push esi
xor esi, esi
mov dword [ebp - 4], esi
cmp ecx, dword [esi*8 + 0x1097588]
je 0x106a006
inc esi
cmp esi, 0x13
mov dword [ebp - 4], esi
jb 0x1069ff4
cmp esi, 0x13
je 0x106a142
mov eax, dword [0x1098b80]
cmp eax, 1
push ebx
je 0x106a111
test eax, eax
jne 0x106a02f
cmp dword [0x109750c], 1
je 0x106a111
cmp ecx, 0xfc
je 0x106a141
push edi
push 6
pop ecx
mov esi, 0x100e7a0
mov edi, 0x1098bd0
rep movsd dword es:[edi], dword [esi]
push 0x104
mov ebx, 0x1098bea
push ebx
movsw word es:[edi], word [esi]
push 0
mov byte [0x1098cee], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x106a07d
push 5
pop ecx
mov esi, 0x100e788
mov edi, 0x1098bea
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x106a082
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x106a0b5
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x106a096
sub eax, edx
push 3
lea eax, [eax + 0x1098baf]
push 0x100e784
push eax
call fcn.0106dec0
add esp, 0xc
mov edx, 0x1098bd0
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x106a0bd
mov eax, dword [ebp - 4]
mov eax, dword [eax*8 + 0x109758c]
mov esi, 0x100e780
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x106a0d9
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x106a0e5
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x100e758
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.0106ddba
add esp, 0xc
pop edi
jmp 0x106a141
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x106a141
mov edx, dword [esi*8 + 0x109758c]
mov ecx, edx
lea esi, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x106a129
push 0
sub ecx, esi
lea esi, [ebp - 8]
push esi
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebx
pop esi
leave
ret
Function at 0x106a62e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x10990f4]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
cmp eax, ebx
push 2
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
pop edi
jne 0x106a681
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x106a668
mov dword [0x10990f4], 1
jmp 0x106a686
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x106a67c
mov eax, edi
mov dword [0x10990f4], eax
jmp 0x106a681
mov eax, dword [0x10990f4]
cmp eax, 1
jne 0x106a6ed
cmp dword [ebp - 4], ebx
jne 0x106a69b
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x106a69b
xor eax, eax
jmp 0x106a7aa
mov ecx, dword [ebp - 4]
cmp word [ecx], bx
mov eax, ecx
je 0x106a6b3
add eax, edi
cmp word [eax], bx
jne 0x106a6a5
add eax, edi
cmp word [eax], bx
jne 0x106a6a5
sub eax, ecx
add eax, edi
mov esi, eax
mov ecx, esi
call fcn.0106aec4
cmp eax, ebx
jne 0x106a6d4
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
jmp 0x106a7aa
mov ecx, esi
mov esi, dword [ebp - 4]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, eax
jmp 0x106a6c4
cmp eax, edi
je 0x106a6f5
cmp eax, ebx
jne 0x106a694
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x106a694
cmp byte [esi], bl
je 0x106a73a
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x106a694
add dword [ebp - 8], eax
mov eax, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x106a726
sub eax, edi
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x106a708
mov esi, dword [ebp - 4]
inc dword [ebp - 8]
mov ecx, dword [ebp - 8]
add ecx, ecx
call fcn.0106aec4
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x106a751
push esi
jmp 0x106a7bb
mov edi, esi
mov esi, eax
mov eax, dword [ebp - 4]
cmp byte [eax], bl
je 0x106a79b
mov ecx, dword [ebp - 8]
mov eax, esi
sub eax, dword [ebp - 0xc]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x106a7af
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x106a77f
sub eax, edx
push esi
lea edi, [edi + eax + 1]
call fcn.01068512
cmp byte [edi], bl
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x106a75c
push dword [ebp - 4]
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp - 0xc]
call fcn.01068bbd
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x106a694
Function at 0x106a7cb
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x10990f8]
test eax, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x106a80f
call esi
test eax, eax
je 0x106a7f4
mov dword [0x10990f8], 1
jmp 0x106a814
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x106a80b
mov dword [0x10990f8], 2
jmp 0x106a81d
xor eax, eax
jmp 0x106a871
cmp eax, 1
jne 0x106a818
call esi
jmp 0x106a871
cmp eax, 2
jne 0x106a80b
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push eax
push 1
push 0
mov dword [ebp - 8], eax
call esi
mov edi, eax
test edi, edi
je 0x106a86e
lea ecx, [edi + edi]
call fcn.0106aec4
test eax, eax
mov dword [ebp - 4], eax
je 0x106a86e
push edi
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push 1
push 0
call esi
test eax, eax
je 0x106a865
mov eax, dword [ebp - 4]
jmp 0x106a870
push dword [ebp - 4]
call fcn.01068bbd
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x106db07
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
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 0x106db38
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x106db3f
cmp ebx, dword [ebp + 8]
jae 0x106db3f
xor eax, eax
jmp 0x106dd2f
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x106db50
xor eax, eax
inc eax
jmp 0x106dd2e
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x106db66
cmp ecx, edx
jae 0x106dcab
cmp dword [eax + 4], 0
je 0x106db6f
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x106db57
cmp dword [ebp + 8], 0
je 0x106db91
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x106dcab
cmp eax, esi
jae 0x106dcab
mov eax, dword [0x1099278]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x106dbb6
cmp dword [esi*4 + 0x1099280], edi
je 0x106dcaf
inc esi
cmp esi, eax
jl 0x106dba4
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x106dd2b
cmp dword [ebp - 8], 0x1000000
jne 0x106dd2b
test byte [ebp - 0xc], 0xcc
je 0x106dc34
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x106dd2b
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x106dd2b
cmp word [eax + 0x18], 0x10b
jne 0x106dd2b
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x106dd2b
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x106dc34
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x106dc34
test byte [ecx + 0x27], 0x80
jne 0x106dcab
push 1
push 0x10992c0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x106db48
mov ecx, dword [0x1099278]
test ecx, ecx
mov edx, ecx
jle 0x106dc68
lea eax, [ecx*4 + 0x109927c]
cmp dword [eax], edi
je 0x106dc68
dec edx
sub eax, 4
test edx, edx
jg 0x106dc5c
test edx, edx
jne 0x106dc99
push 0xf
pop ebx
cmp ecx, ebx
jg 0x106dc75
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x106dc8d
lea eax, [edx*4 + 0x1099280]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x106dc7b
cmp ecx, 0x10
jge 0x106dc99
inc ecx
mov dword [0x1099278], ecx
push 0
push 0x10992c0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x106db48
xor eax, eax
jmp 0x106dd2e
test esi, esi
jle 0x106db48
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x10992c0
call ebx
test eax, eax
jne 0x106db48
cmp dword [esi*4 + 0x1099280], edi
je 0x106dd05
mov eax, dword [0x1099278]
lea esi, [eax - 1]
test esi, esi
jl 0x106dcf3
cmp dword [esi*4 + 0x1099280], edi
je 0x106dcef
dec esi
jns 0x106dce3
test esi, esi
jge 0x106dd03
cmp eax, 0x10
jge 0x106dcfe
inc eax
mov dword [0x1099278], eax
lea esi, [eax - 1]
jmp 0x106dd05
je 0x106dd1d
xor ecx, ecx
test esi, esi
jl 0x106dd1d
lea eax, [ecx*4 + 0x1099280]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x106dd0b
push 0
push 0x10992c0
call ebx
jmp 0x106db48
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x106ddba
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x10992c8], ebx
push esi
push edi
jne 0x106de3c
push 0x100eac0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x106de77
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x100eab4
push edi
call esi
test eax, eax
mov dword [0x10992c8], eax
je 0x106de77
push 0x100eaa4
push edi
call esi
push 0x100ea90
push edi
mov dword [0x10992cc], eax
call esi
cmp dword [0x1098b8c], 2
mov dword [0x10992d0], eax
jne 0x106de3c
push 0x100ea74
push edi
call esi
test eax, eax
mov dword [0x10992d8], eax
je 0x106de3c
push 0x100ea5c
push edi
call esi
mov dword [0x10992d4], eax
mov eax, dword [0x10992d4]
test eax, eax
je 0x106de81
call eax
test eax, eax
je 0x106de68
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x10992d8]
test eax, eax
je 0x106de68
test byte [ebp - 8], 1
jne 0x106de81
cmp dword [0x1098b98], 4
jb 0x106de7b
or byte [ebp + 0x12], 0x20
jmp 0x106dea0
xor eax, eax
jmp 0x106deb0
or byte [ebp + 0x12], 4
jmp 0x106dea0
mov eax, dword [0x10992cc]
test eax, eax
je 0x106dea0
call eax
mov ebx, eax
test ebx, ebx
je 0x106dea0
mov eax, dword [0x10992d0]
test eax, eax
je 0x106dea0
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x10992c8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x106f0ec
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x1097470]
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 0x420], edi
mov dword [ebp - 0x418], ecx
mov dword [ebp - 0x41c], ecx
jne 0x106f123
xor eax, eax
jmp 0x106f2d6
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x109bfc0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x106f158
push 2
push ecx
push ecx
push dword [ebp + 8]
call fcn.010705c6
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x106f226
cmp dword [ebp + 0x10], ecx
mov dword [ebp - 0x414], edi
mov dword [ebp - 0x40c], ecx
jbe 0x106f2a4
jmp 0x106f17f
xor ecx, ecx
mov dword [ebp - 0x410], ecx
mov ecx, dword [ebp - 0x414]
sub ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x408]
cmp ecx, dword [ebp + 0x10]
jae 0x106f1d5
mov edx, dword [ebp - 0x414]
inc dword [ebp - 0x414]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x106f1c0
inc dword [ebp - 0x41c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x410]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x410]
cmp dword [ebp - 0x410], 0x400
jl 0x106f197
mov edi, eax
lea eax, [ebp - 0x408]
sub edi, eax
push 0
lea eax, [ebp - 0x424]
push eax
push edi
lea eax, [ebp - 0x408]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x106f253
mov eax, dword [ebp - 0x424]
add dword [ebp - 0x418], eax
cmp eax, edi
jl 0x106f25f
mov eax, dword [ebp - 0x414]
sub eax, dword [ebp - 0x420]
cmp eax, dword [ebp + 0x10]
jb 0x106f17d
jmp 0x106f25f
push ecx
lea ecx, [ebp - 0x424]
push ecx
push dword [ebp + 0x10]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x106f253
mov eax, dword [ebp - 0x424]
and dword [ebp - 0x40c], 0
mov dword [ebp - 0x418], eax
jmp 0x106f25f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40c], eax
mov eax, dword [ebp - 0x418]
test eax, eax
jne 0x106f2ce
cmp dword [ebp - 0x40c], eax
je 0x106f29e
push 5
pop esi
cmp dword [ebp - 0x40c], esi
jne 0x106f290
call fcn.0106e717
mov dword [eax], 9
call fcn.0106e72f
mov dword [eax], esi
jmp 0x106f2c9
push dword [ebp - 0x40c]
call fcn.0106e747
pop ecx
jmp 0x106f2c9
mov edi, dword [ebp - 0x420]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x106f2b6
cmp byte [edi], 0x1a
jne 0x106f2b6
xor eax, eax
jmp 0x106f2d4
call fcn.0106e717
mov dword [eax], 0x1c
call fcn.0106e72f
and dword [eax], 0
or eax, 0xffffffff
jmp 0x106f2d4
sub eax, dword [ebp - 0x41c]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
call fcn.01067393
leave
ret