joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4059f0
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x416d06
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x228
mov al, byte [esp + 3]
push ebx
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x34], ebx
mov byte [esp + 0x14], al
call fcn.00401d10
push str.SetupBD.ini
lea ecx, [esp + 0x24]
push 0x41eb30
push ecx
mov dword [esp + 0x248], ebx
call fcn.0040e650
add esp, 0xc
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
mov byte [esp + 0x23c], 1
cmp eax, ebx
jne 0x405a6d
mov eax, 0x41821c
push ebp
push eax
lea edx, [esp + 0x3c]
push 0x200
push edx
push 0x41e9d0
push str.InfName
push str.WinNT4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
call fcn.00402510
test al, al
je 0x405ad1
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov eax, ecx
lea esi, [esp + 0x38]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [ecx + ebp], bl
mov esi, dword [esp + 0x248]
mov dl, byte [esp + 0x14]
lea ecx, [esp + 0x14]
mov byte [esi], dl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov eax, dword [0x418218]
push eax
push ebx
push ecx
mov ecx, esi
call fcn.00401b10
mov ecx, dword [esp + 0x28]
pop ebp
cmp ecx, ebx
je 0x405b1f
mov al, byte [ecx - 1]
cmp al, bl
je 0x405b15
cmp al, 0xff
je 0x405b15
dec al
mov byte [ecx - 1], al
jmp 0x405b1f
dec ecx
push ecx
call fcn.0040e98e
add esp, 4
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
cmp ecx, ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
je 0x405b4f
mov al, byte [ecx - 1]
cmp al, bl
je 0x405b45
cmp al, 0xff
je 0x405b45
dec al
mov byte [ecx - 1], al
jmp 0x405b4f
dec ecx
push ecx
call fcn.0040e98e
add esp, 4
mov ecx, dword [esp + 0x234]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x234
ret
Function at 0x405b70
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x416d26
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x228
mov al, byte [esp + 3]
push ebx
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x34], ebx
mov byte [esp + 0x14], al
call fcn.00401d10
push str.SetupBD.ini
lea ecx, [esp + 0x24]
push 0x41eb30
push ecx
mov dword [esp + 0x248], ebx
call fcn.0040e650
add esp, 0xc
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
mov byte [esp + 0x23c], 1
cmp eax, ebx
jne 0x405bed
mov eax, 0x41821c
push ebp
push eax
lea edx, [esp + 0x3c]
push 0x200
push edx
push 0x41e9d0
push str.NMSDir
push str.WinNT4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
call fcn.00402510
test al, al
je 0x405c51
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov eax, ecx
lea esi, [esp + 0x38]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [ecx + ebp], bl
mov esi, dword [esp + 0x248]
mov dl, byte [esp + 0x14]
lea ecx, [esp + 0x14]
mov byte [esi], dl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov eax, dword [0x418218]
push eax
push ebx
push ecx
mov ecx, esi
call fcn.00401b10
mov ecx, dword [esp + 0x28]
pop ebp
cmp ecx, ebx
je 0x405c9f
mov al, byte [ecx - 1]
cmp al, bl
je 0x405c95
cmp al, 0xff
je 0x405c95
dec al
mov byte [ecx - 1], al
jmp 0x405c9f
dec ecx
push ecx
call fcn.0040e98e
add esp, 4
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
cmp ecx, ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
je 0x405ccf
mov al, byte [ecx - 1]
cmp al, bl
je 0x405cc5
cmp al, 0xff
je 0x405cc5
dec al
mov byte [ecx - 1], al
jmp 0x405ccf
dec ecx
push ecx
call fcn.0040e98e
add esp, 4
mov ecx, dword [esp + 0x234]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x234
ret
Function at 0x406390
Capabilities:
Check mutex on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x29c
push ebx
push ebp
push esi
push edi
xor esi, esi
push eax
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4063c7
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret
lea ecx, [esp + 0x218]
call fcn.00403b10
cmp eax, 5
jne 0x406515
call fcn.0040dd10
test eax, eax
je 0x406515
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
mov edx, dword [0x41eaf8]
lea ecx, [esp + 0x18]
stosw word es:[edi], ax
push 0x200
push ecx
push 0xd
push edx
stosb byte es:[edi], al
call fcn.0040db70
add esp, 0x10
lea eax, [esp + 0x18]
push 0x10
push str.SetupBD
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov cl, byte [esp + 0x13]
sub esp, 0x10
mov ebp, esp
lea edi, [esp + 0x28]
xor eax, eax
mov dword [esp + 0x24], esp
mov byte [ebp], cl
or ecx, 0xffffffff
mov dword [ebp + 4], esi
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
cmp ebx, 0xfffffffd
jbe 0x40645f
call fcn.0040e999
mov ecx, dword [ebp + 4]
cmp ecx, esi
je 0x40649a
mov al, byte [ecx - 1]
test al, al
je 0x40649a
cmp al, 0xff
je 0x40649a
cmp ebx, esi
jne 0x4064d4
dec al
push esi
mov byte [ecx - 1], al
mov ecx, ebp
call fcn.00401d10
call fcn.00405060
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret
cmp ebx, esi
jne 0x4064bf
push 1
mov ecx, ebp
call fcn.00401d10
call fcn.00405060
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x4064cb
cmp eax, ebx
jae 0x4064dc
push 1
mov ecx, ebp
call fcn.00401d10
push ebx
mov ecx, ebp
call fcn.00402bb0
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
call fcn.00405060
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x29c
ret

Function at 0x406530
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea ecx, [esp + 8]
push ecx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp]
push 0
push 0
lea edx, [esp + 0xc]
push 0
push edx
push 0
push eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
add esp, 0x14
ret
Function at 0x406bd0
Capabilities:
Get file version info

Disassembly:
sub esp, 0x14c
push ebx
mov ebx, dword [esp + 0x154]
push ebp
push esi
lea eax, [esp + 0x18]
push edi
xor ebp, ebp
push eax
push ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x406c09
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14c
ret
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x14]
push ecx
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
cmp esi, ebp
ja 0x406c2e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14c
ret
push esi
call fcn.0040f495
mov edi, eax
add esp, 4
cmp edi, ebp
jne 0x406c4a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14c
ret
push edi
push esi
push ebp
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x406ca1
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
push edx
push eax
push 0x41b1cc
push edi
mov dword [esp + 0x28], ebp
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x406ca1
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov edx, dword [eax + 8]
mov cx, word [eax + 8]
mov eax, dword [esp + 0x164]
push ecx
shr edx, 0x10
push edx
push str._d._d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebp, 1
push edi
call fcn.0040e98e
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
Function at 0x409260
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
push 0
push 8
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0
mov byte [ebp - 0x15], 0
mov byte [ebp - 0x14], 0
mov byte [ebp - 0x13], 5
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4092de
call esi
cmp eax, 0x3f0
jne 0x4092ca
lea ecx, [ebp - 4]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4092de
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edx, edx
cmp eax, 0x78
sete dl
mov eax, edx
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 8]
push eax
push 0
push 0
push 2
push ecx
call ebx
test eax, eax
je 0x409304
xor eax, eax
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call esi
cmp eax, 0x7a
je 0x409317
xor eax, eax
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 8]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0040f7f0
mov esi, esp
test esi, esi
jne 0x409338
xor eax, eax
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push edi
push esi
push 2
push eax
call ebx
test eax, eax
jne 0x409354
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0xc]
xor edi, edi
push ecx
push edi
push edi
push edi
push edi
push edi
push edi
push 0x220
push 0x20
lea edx, [ebp - 0x18]
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x409381
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
mov dword [ebp - 0x10], edi
cmp eax, edi
jbe 0x4093b1
lea ebx, [esi + 4]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebx]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4093aa
mov eax, dword [esi]
inc edi
add ebx, 8
cmp edi, eax
jb 0x40938d
jmp 0x4093b1
mov dword [ebp - 0x10], 1
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x10]
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40bb70
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x210
push edi
push str.SetupBD.ini
lea eax, [esp + 8]
push 0x41eb30
push eax
call fcn.0040e650
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x14]
add esp, 0xc
test eax, eax
pop edi
jne 0x40bbb1
mov eax, 0x41821c
push esi
push eax
lea ecx, [esp + 0x18]
push 0x200
push ecx
push 0x41e9d0
push str.LevelsToRoot
push str.Config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [esp + 0x14]
push edx
call fcn.0040f9f1
mov ecx, dword [esp + 0xc]
add esp, 4
test ecx, ecx
mov esi, eax
je 0x40bc0d
mov al, byte [ecx - 1]
test al, al
je 0x40bc03
cmp al, 0xff
je 0x40bc03
dec al
mov byte [ecx - 1], al
mov eax, esi
pop esi
add esp, 0x210
ret
dec ecx
push ecx
call fcn.0040e98e
add esp, 4
mov eax, esi
pop esi
add esp, 0x210
ret
Function at 0x40dc00
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
push esi
push edi
mov esi, dword [esp + 0xc]
mov edi, eax
shr eax, 4
and edi, 0xf
inc eax
and eax, 0xffff
push ecx
push eax
push 6
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
test eax, eax
je 0x40dc5f
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40dc5f
mov ecx, eax
xor edx, edx
mov ax, word [ecx]
test ax, ax
je 0x40dc56
and eax, 0xffff
add ecx, 2
cmp edx, edi
mov esi, eax
je 0x40dc64
lea ecx, [ecx + esi*2]
jmp 0x40dc59
add ecx, 2
inc edx
cmp edx, 0x10
jl 0x40dc3b
pop edi
xor eax, eax
pop esi
ret
mov edx, dword [esp + 0x1c]
lea eax, [edx - 1]
cmp esi, eax
jle 0x40dc71
mov esi, eax
mov edi, dword [esp + 0x18]
push esi
push ecx
push edi
call fcn.0040fa73
add esp, 0xc
mov word [edi + esi*2], 0
mov eax, edi
pop edi
pop esi
ret

Function at 0x40dcd0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov ecx, dword [esp + 8]
mov eax, dword [esp + 0xc]
push esi
mov esi, dword [esp + 8]
push edi
and ecx, 0xffff
push eax
push ecx
push 5
push esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
test eax, eax
je 0x40dd0b
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40dd0b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
pop edi
pop esi
ret
mov eax, edi
pop edi
pop esi
ret

Function at 0x40dd10
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x10c
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov ecx, dword [0x41bf00]
mov edx, dword [0x41bf04]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [str.PROSetMutex]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
call fcn.0040ddc0
test eax, eax
pop edi
jne 0x40dd5f
lea eax, [esp]
lea ecx, [esp + 0xc]
push eax
push 0x41bef8
push ecx
jmp 0x40dd6e
lea edx, [esp]
lea eax, [esp + 0xc]
push edx
push str.Global_s
push eax
call fcn.0040fab0
add esp, 0xc
lea ecx, [esp + 0xc]
push esi
push ecx
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40dda2
mov eax, 1
pop esi
add esp, 0x10c
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
add esp, 0x10c
ret
Function at 0x40ddc0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xb0
lea ecx, [esp + 0x1c]
push ebx
push ebp
push esi
push edi
call fcn.00403b10
cmp eax, 5
jne 0x40decd
mov ecx, dword [0x41bf4c]
mov eax, dword [str.Terminal_Server]
mov edx, dword [0x41bf50]
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [0x41bf54]
push ecx
xor ebx, ebx
push str.SystemCurrentControlSetControlProductOptions
push 0x80000002
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40decd
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push ebx
push eax
push ebx
push str.ProductSuite
push ecx
call esi
test eax, eax
jne 0x40decd
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40decd
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, ebx
je 0x40decd
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push edi
push eax
push ebx
push str.ProductSuite
push ecx
call esi
test eax, eax
jne 0x40decd
cmp dword [esp + 0x14], 7
jne 0x40decd
mov al, byte [edi]
mov esi, edi
test al, al
je 0x40deb7
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpA]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push edx
push esi
call ebx
test eax, eax
je 0x40deda
push esi
call ebp
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x40de9d
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40decd
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb0
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xb0
ret
Function at 0x412a45
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x41c3e0
cmp edx, dword [eax]
je 0x412a67
add eax, 8
inc ecx
cmp eax, 0x41c470
jl 0x412a58
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x41c3e0]
jne 0x412b95
mov eax, dword [0x41ebac]
cmp eax, 1
je 0x412b6f
test eax, eax
jne 0x412a98
cmp dword [0x41c004], 1
je 0x412b6f
cmp edx, 0xfc
je 0x412b95
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x412acf
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00413db0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0040fd70
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x412b12
lea eax, [ebp - 0x1a4]
push eax
call fcn.0040fd70
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4186c0
push edi
call fcn.004143e0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00413db0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00413dc0
lea eax, [ebp - 0xa0]
push 0x4186a0
push eax
call fcn.00413dc0
push dword [esi + 0x41c3e4]
lea eax, [ebp - 0xa0]
push eax
call fcn.00413dc0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00414c38
add esp, 0x2c
pop edi
jmp 0x412b95
lea eax, [ebp + 8]
lea esi, [esi + 0x41c3e4]
push 0
push eax
push dword [esi]
call fcn.0040fd70
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x8b3ac0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x3e0000]
push edi
or ebp, 0xffffffff
jmp 0x8b3ae2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x8b3ae9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8b3ad8
mov eax, 1
add ebx, ebx
jne 0x8b3afb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x8b3b0c
jne 0x8b3b1c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8b3b1c
dec eax
add ebx, ebx
jne 0x8b3b18
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x8b3af0
xor ecx, ecx
sub eax, 3
jb 0x8b3b34
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x8b3ba6
sar eax, 1
mov ebp, eax
jmp 0x8b3b3f
add ebx, ebx
jne 0x8b3b3f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x8b3b4c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x8b3b70
inc ecx
add ebx, ebx
jne 0x8b3b5c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x8b3b51
jne 0x8b3b6d
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x8b3b51
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x8b3b90
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x8b3b81
jmp 0x8b3ade
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x8b3b90
add edi, ecx
jmp 0x8b3ade
pop esi
mov edi, esi
mov ecx, 0x1ef1c
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x8b3bae
mov eax, dword [edi]
mov bl, byte [edi + 4]
xchg ah, al
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov eax, ebx
loop 0x8b3bb3
lea edi, [esi + 0x474000]
mov eax, dword [edi]
or eax, eax
je 0x8b3c24
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x4b36a0]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x4b3844]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x8b3bd9
mov ecx, edi
jns 0x8b3c08
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x4b3848]
or eax, eax
je 0x8b3c1e
mov dword [ebx], eax
add ebx, 4
jmp 0x8b3bf6
call dword [esi + 0x4b384c]
popal
jmp 0x713c64
Function at 0x10037b56
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
pushal
call 0x10037b65
pop dword [ebp - 4]
mov eax, 0x10037b65
sub dword [ebp - 4], eax
mov dword [ebp - 0x14], 0x2e06442d
sub dword [ebp - 0x14], 0xdfb3fee2
mov dword [ebp - 0x10], 0x4abc658
sub dword [ebp - 0x10], 0xd2787a13
mov dword [ebp - 0xc], 0x1a2b760b
add dword [ebp - 0xc], 0x3220ce23
mov dword [ebp - 8], 0x219fdb1b
add dword [ebp - 8], 0xde6024e5
lea eax, [ebp - 0x14]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 4]
call dword [eax]
mov dword [ebp - 0x14], 0xb992b98a
add dword [ebp - 0x14], 0xbadfafcc
mov dword [ebp - 0x10], 0x5d75b47
add dword [ebp - 0x10], 0x3b95062e
mov dword [ebp - 0xc], 0xd6227d83
add dword [ebp - 0xc], 0x8d4ceee9
mov dword [ebp - 8], 0x442aeae4
sub dword [ebp - 8], 0x442aeae4
lea ebx, [ebp - 0x14]
push ebx
push eax
mov eax, 0x20be1470
add eax, 0xef45fc08
add eax, dword [ebp - 4]
call dword [eax]
push 0x40
push 0x1000
push 0x4d7e4
push 0
call eax
mov ecx, 0x47da
xor edi, edi
add edi, eax
mov ebx, 0x5be42d51
add ebx, 0xb420bcaf
add ebx, dword [ebp - 4]
mov esi, 0x90e924d5
add esi, 0x6acadfd3
mov edx, dword [ebx]
xor edx, esi
mov dword [edi], edx
add edi, 0xa823fcac
sub edi, 0xa823fca8
add ebx, 0x6d2e449d
add ebx, 0x92d1bb67
loop 0x10037c79
add eax, 0x9b607966
add eax, 0x64a098d5
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0x164a8fe9
add ecx, 0xf9b57017
add ecx, dword [ebp - 4]
call ebx
leave
ret

Function at 0x1003f584
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1004acd0]
jne 0x1003f58e
repz ret
jmp fcn.1003fc70