joyce8/EMBER2024-capa huggingface dataset:
Function at 0x30016d0e
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push 0x44
push 0
lea eax, [ebp - 0x58]
push eax
call fcn.30019380
add esp, 0xc
mov dword [ebp - 0x58], 0x44
mov dword [ebp - 0x2c], 1
mov cx, word [ebp + 0xc]
mov word [ebp - 0x28], cx
cmp dword [ebp + 0x10], 0
jne 0x30016d65
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x58]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 0x14], eax
jmp 0x30016da7
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x58]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x30016da7
push 0
mov ax, word [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.30016d0e
add esp, 0xc
jmp 0x30016ddf
cmp dword [ebp - 0x14], 0
jne 0x30016dc6
call fcn.30006d2a
push eax
push str.CreateProcess
push 0x1a
call fcn.30006a18
add esp, 0xc
xor eax, eax
jmp 0x30016ddf
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x30016de3
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x30034129
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
cmp dword [0x30041aa0], 0
jne 0x30016e1d
cmp dword [0x30041aa4], 0
je 0x30016e35
xor eax, eax
mov ax, word [0x3004179c]
cmp eax, 5
jl 0x30016e35
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
neg eax
sbb eax, eax
inc eax
jmp 0x30016ed3
lea ecx, [ebp - 0x40]
call fcn.30011ee0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x40]
push edx
call fcn.30012082
add esp, 0xc
test eax, eax
jne 0x30016e77
mov dword [ebp - 0x48], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.30011f5b
mov eax, dword [ebp - 0x48]
jmp 0x30016ed3
lea ecx, [ebp - 0x40]
call fcn.30012acb
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x30016ea3
mov eax, dword [ebp - 0x44]
push eax
lea ecx, [ebp - 0x40]
call fcn.3000e410
push eax
call fcn.30016de3
add esp, 8
test eax, eax
je 0x30016ea3
jmp 0x30016e77
lea ecx, [ebp - 0x40]
call fcn.3001223f
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.30011f5b
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x300176b3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 8], 0xffffffff
mov dword [ebp - 4], 0
push 0
push 0
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x300176ed
xor eax, eax
jmp 0x30017729
push 0
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x3001770b
jmp 0x30017727
mov dword [ebp - 4], 1
cmp dword [ebp - 8], 0xffffffff
je 0x30017722
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
jmp 0x30017729
jmp 0x30017712
mov esp, ebp
pop ebp
ret
Function at 0x30017bae
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
cmp dword [ebp + 0xc], 0
je 0x30017bc3
mov eax, dword [ebp + 0xc]
mov byte [eax], 0
cmp dword [ebp + 0x10], 0
je 0x30017bcf
mov ecx, dword [ebp + 0x10]
mov byte [ecx], 0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp + 8]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x30017bea
jmp 0x30017d9f
mov ecx, dword [ebp - 0xc]
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0
jne 0x30017c11
jmp 0x30017d9f
mov edx, dword [ebp - 0xa0]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp + 8]
push edx
call sub.VERSION.dll_GetFileVersionInfoA
mov dword [ebp - 0x14], 0
push str.VarFileInfoTranslation
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x9c]
push eax
mov ecx, dword [ebp - 0xa0]
push ecx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x30017c66
jmp 0x30017d9d
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
lea ecx, [eax + edx*4]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
shr ecx, 0x10
and ecx, 0xffff
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x1c]
and edx, 0xffff
push edx
push str.StringFileInfo_04x_04x_
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
cmp dword [ebp + 0xc], 0
je 0x30017d0b
push 0x3003d48c
lea ecx, [ebp - 0x9c]
push ecx
push 0x3003d498
lea edx, [ebp - 0x120]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x120]
push edx
mov eax, dword [ebp - 0xa0]
push eax
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x30017d0b
cmp dword [ebp - 8], 0
je 0x30017d0b
push pe_nt_image_headers32
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [ebp + 0x10], 0
je 0x30017d6a
push 0x3003d4a0
lea eax, [ebp - 0x9c]
push eax
push str._s_s
lea ecx, [ebp - 0x120]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x120]
push ecx
mov edx, dword [ebp - 0xa0]
push edx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x30017d6a
cmp dword [ebp - 8], 0
je 0x30017d6a
push pe_nt_image_headers32
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [ebp - 0xa0], 0
je 0x30017d9b
mov edx, dword [ebp - 0xa0]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0xa0]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x30017d9f
jmp 0x30017d6a
mov esp, ebp
pop ebp
ret
Function at 0x3001bab0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x30037098
push 0x30020d48
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x30043a20], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x30043a1c], ecx
shl ecx, 8
add ecx, edx
mov dword [0x30043a18], ecx
shr eax, 0x10
mov dword [0x30043a14], eax
call fcn.300204f0
test eax, eax
jne 0x3001bb1a
push 0x1c
call fcn.3001bc60
add esp, 4
call fcn.3001e600
test eax, eax
jne 0x3001bb2d
push 0x10
call fcn.3001bc60
add esp, 4
mov dword [ebp - 4], 0
call fcn.30021990
call fcn.3001c8c0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x30045018], eax
call fcn.30021830
mov dword [0x30043a04], eax
test eax, eax
je 0x3001bb60
mov eax, dword [0x30045018]
test eax, eax
jne 0x3001bb6a
push 0xffffffffffffffff
call fcn.3001bd80
add esp, 4
call fcn.30021580
call fcn.30021490
call fcn.3001bd50
mov esi, dword [0x30045018]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x3001bc49
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x3001bbb1
test al, al
je 0x3001bbb1
and eax, 0xff
push eax
call fcn.30021430
add esp, 4
test eax, eax
je 0x3001bb8b
inc esi
mov dword [ebp - 0x64], esi
jmp 0x3001bb8b
cmp byte [esi], 0x22
jne 0x3001bbba
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x3001bbca
cmp al, 0x20
ja 0x3001bbca
inc esi
mov dword [ebp - 0x64], esi
jmp 0x3001bbba
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x3001bbeb
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x3001bbf0
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.3001bd80
jmp 0x3001bc2e
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x3001bbba
inc esi
mov dword [ebp - 0x64], esi
jmp 0x3001bc49
Function at 0x3001bdc0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.3001be80
mov eax, dword [0x30043a50]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x3001bde4
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x30043a4c], 1
mov byte [0x30043a48], bl
jne 0x3001be3e
mov ecx, dword [0x30045014]
test ecx, ecx
je 0x3001be2c
mov esi, dword [0x30045010]
sub esi, 4
cmp esi, ecx
jb 0x3001be2c
mov eax, dword [esi]
test eax, eax
je 0x3001be25
call eax
mov ecx, dword [0x30045014]
sub esi, 4
cmp esi, ecx
jae 0x3001be17
push 0x3003b084
push 0x3003b07c
call fcn.3001bea0
add esp, 8
push 0x3003b090
push 0x3003b088
call fcn.3001bea0
add esp, 8
test ebx, ebx
je 0x3001be5d
call fcn.3001be90
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x30043a50], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x3001bec0
Capabilities:
Create thread

Disassembly:
push esi
push edi
push 0x74
push 1
xor edi, edi
call fcn.30021dc0
mov esi, eax
add esp, 8
test esi, esi
je 0x3001bf20
push esi
call fcn.3001e660
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
add esp, 4
mov dword [esi + 0x48], eax
mov eax, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x10]
mov dword [esi + 0x4c], ecx
mov ecx, dword [esp + 0x14]
push eax
push esi
push 0x3001bf40
push ecx
push edx
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x3001bf38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call fcn.3001b1e0
add esp, 4
test edi, edi
je 0x3001bf36
push edi
call fcn.3001c8d0
add esp, 4
xor eax, eax
pop edi
pop esi
ret

Function at 0x3001e600
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.3001d6a0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x3003df80], eax
je 0x3001e658
push 0x74
push 1
call fcn.30021dc0
mov esi, eax
add esp, 8
test esi, esi
je 0x3001e658
mov eax, dword [0x3003df80]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x3001e658
push esi
call fcn.3001e660
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x3001e680
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x3003df80]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x3001e6ee
push 0x74
push 1
call fcn.30021dc0
mov esi, eax
add esp, 8
test esi, esi
je 0x3001e6e4
mov ecx, dword [0x3003df80]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x3001e6e4
push esi
call fcn.3001e660
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.3001bc60
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

Function at 0x3001e700
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov eax, dword [0x3003df80]
cmp eax, 0xffffffff
je 0x3001e79c
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x3001e724
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x3001e78d
mov eax, dword [esi + 0x24]
test eax, eax
je 0x3001e734
push eax
call fcn.3001b1e0
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x3001e744
push eax
call fcn.3001b1e0
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x3001e754
push eax
call fcn.3001b1e0
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x3001e764
push eax
call fcn.3001b1e0
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x3001e774
push eax
call fcn.3001b1e0
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x3001e784
push eax
call fcn.3001b1e0
add esp, 4
push esi
call fcn.3001b1e0
add esp, 4
mov eax, dword [0x3003df80]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x3001e8f0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x3001e965
push ebx
call fcn.3001ea20
add esp, 4
test eax, eax
jne 0x3001e933
call fcn.3001c960
mov dword [eax], 0xf
call fcn.3001c950
mov dword [eax], 0xd
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x3001e975
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x3001ea0f
inc eax
cmp eax, 0x104
ja 0x3001ea0f
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x3001e9c7
cmp eax, ecx
jg 0x3001e9a1
mov eax, ecx
push eax
call fcn.3001b250
mov edx, eax
add esp, 4
test edx, edx
jne 0x3001e9e2
call fcn.3001c950
mov dword [eax], 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x3001e9e2
call fcn.3001c950
mov dword [eax], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret

Function at 0x3001ea20
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x3001ea2e
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x3001ea5d
cmp eax, 1
je 0x3001ea5d
mov eax, 1
ret
xor eax, eax
ret

Function at 0x3001f420
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
push eax
push 0x104
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x3001f459
mov eax, dword [esp + 4]
cmp ah, 0x3a
jne 0x3001f459
and eax, 0xff
push eax
call fcn.3001f500
mov esi, eax
add esp, 4
sub esi, 0x40
mov eax, esi
pop esi
add esp, 0x104
ret
Function at 0x30021830
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x30043d60]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x30021872
call edi
mov esi, eax
test esi, esi
je 0x3002185c
mov eax, 1
jmp 0x3002186d
call ebp
mov ebx, eax
test ebx, ebx
je 0x3002197f
mov eax, 2
mov dword [0x30043d60], eax
cmp eax, 1
jne 0x30021912
test esi, esi
jne 0x3002188b
call edi
mov esi, eax
test esi, esi
je 0x3002197f
cmp word [esi], 0
mov eax, esi
je 0x300218a5
add eax, 2
cmp word [eax], 0
jne 0x30021893
add eax, 2
cmp word [eax], 0
jne 0x30021893
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x30021904
push edi
call fcn.3001b250
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x30021904
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x300218f6
push ebx
call fcn.3001b1e0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x3002197f
test ebx, ebx
jne 0x30021923
call ebp
mov ebx, eax
test ebx, ebx
je 0x3002197f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x3002193b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x3002192b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x3002192b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.3001b250
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x3002195d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x30021be0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x300402e0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x30021c04
add eax, 8
inc ebp
cmp eax, 0x30040370
jb 0x30021bf5
cmp ecx, dword [ebp*8 + 0x300402e0]
jne 0x30021dab
mov eax, dword [0x30043a0c]
cmp eax, 1
je 0x30021d6d
test eax, eax
jne 0x30021c30
cmp dword [0x3003da14], 1
je 0x30021d6d
cmp ecx, 0xfc
je 0x30021dab
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x30021c6b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x30021cb4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x30037698
add ebx, ecx
push ebx
call fcn.30023290
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x30037678
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x300402e4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.300257e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x30044f00]
test eax, eax
je 0x30021d7e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x30021d88
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x300402e4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x30022d30
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x30022d5c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x30044f00]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x30022d97
push 2
push ebp
push ecx
call fcn.30022c30
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x30022ef9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x30022e41
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x30022df2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x30022ddf
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x30022dc2
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x30022eea
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x30022e3d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x30022dbe
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x30022ed9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x30022e95
cmp eax, 5
jne 0x30022e7e
call fcn.3001c950
mov dword [eax], 9
call fcn.3001c960
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.3001c8d0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x30022eb5
cmp byte [ebp], 0x1a
jne 0x30022eb5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.3001c950
mov dword [eax], 0x1c
call fcn.3001c960
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x30022e3d
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x30022f2a
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x30022e41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x30022e41