joyce8/EMBER2024-capa huggingface dataset:
Function at 0x471f61
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4bc364]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor ebx, ebx
push str.kernel32.dll
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ebx
xor esi, esi
call edi
push 0x4a4430
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x472003
call eax
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ebx, 0x3ff
mov edi, 0xfc00
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ecx, cx
and eax, edi
or eax, ecx
push eax
mov dword [ebp - 0x1c], ecx
call esi
push dword [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
call esi
push str.GetSystemDefaultUILanguage
push dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ebx, cx
and eax, edi
or eax, ebx
push eax
call esi
push ebx
mov dword [ebp - 0x34], eax
call esi
mov dword [ebp - 0x30], eax
push 4
xor ebx, ebx
jmp 0x472105
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x4720b3
lea eax, [ebp - 0x1c]
push eax
push 0x20019
push ebx
push str.Control_PanelDesktopResourceLocale
push SysReAllocString
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x472106
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push dword [ebp - 0x1c]
mov dword [ebp - 0x20], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4720a8
cmp dword [ebp - 0x24], 1
jne 0x4720a8
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push 0x4a43e8
push eax
call fcn.00452512
add esp, 0xc
cmp eax, 1
jne 0x4720a8
mov eax, dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x3c], eax
call esi
push 2
mov dword [ebp - 0x38], eax
pop esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x472106
push str.ntdll.dll
call edi
cmp eax, ebx
je 0x472106
lea ecx, [ebp - 0x18]
push ecx
push 0x471f4b
push 1
push 0x10
push eax
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_EnumResourceLanguagesA]
cmp word [ebp - 0x18], bx
je 0x472106
movzx eax, word [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x3c], eax
call esi
mov dword [ebp - 0x38], eax
push 2
pop esi
mov dword [ebp + esi*4 - 0x3c], 0x800
inc esi
xor edi, edi
cmp esi, ebx
jle 0x47212c
push dword [ebp + edi*4 - 0x3c]
push dword [ebp + 8]
call fcn.00471ecc
cmp eax, ebx
pop ecx
pop ecx
jne 0x47212e
inc edi
cmp edi, esi
jl 0x472115
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0044ead4
leave
ret 4
Function at 0x47213d
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
xor edi, edi
mov dword [ecx + 0x9c], edi
cmp dword [str.SoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
mov ebx, 0x4bb408
je 0x4721f9
push esi
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [ebx]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4721e1
mov esi, dword [ebx + 4]
jmp 0x4721db
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4721cb
cmp dword [ebp - 0xc], 4
jne 0x4721cb
cmp dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
je 0x4721c3
or dword [eax + 0x9c], ecx
jmp 0x4721cb
not ecx
and dword [eax + 0x9c], ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
add esi, 8
mov eax, dword [esi]
cmp eax, edi
jne 0x47218f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 8
cmp dword [ebx], edi
mov dword [ebp - 4], edi
jne 0x472172
pop esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
inc eax
pop ebx
leave
ret

Function at 0x472c32
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x47d9e4
call fcn.00450648
sub esp, 0x11c
mov eax, dword [0x4bc364]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x124]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
test esi, esi
jne 0x472d2b
push 0x104
lea eax, [ebp - 0x11c]
push eax
push 0
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov esi, eax
test esi, esi
jne 0x472cff
and dword [ebp - 4], eax
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x120]
call fcn.0040d8a0
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.00472c32
mov ecx, dword [ebp - 0x120]
mov esi, eax
test esi, esi
setne bl
add ecx, 0xfffffff0
mov byte [ebp - 4], 0
call fcn.0040b410
test bl, bl
jne 0x472cff
or dword [ebp - 4], 0xffffffff
jmp 0x472c70
cmp esi, 0x103
je 0x472d0f
cmp esi, 0x3f2
jne 0x472d1f
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
mov eax, esi
call fcn.0044ead4
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x475c69
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x475c9e
cmp edi, dword [esi + 0xc]
jge 0x475c9e
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x475c9e
cmp edi, dword [eax + 8]
jge 0x475c9e
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x475ca0
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x475da4
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x475dd8
jmp fcn.00468c44
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
jle 0x475f42
cmp eax, dword [edi + 0xc]
jge 0x475f42
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x475e9a
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x475f2b
cmp dword [ebp + 0xc], ebx
je 0x475f2b
jmp 0x475ec4
push 0x10
call fcn.00475b35
cmp eax, ebx
je 0x475eb0
mov ecx, eax
call fcn.00475d9b
mov esi, eax
jmp 0x475eb2
xor esi, esi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esi + eax], ecx
mov dword [edi + 0x14], esi
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x475edb
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x475eeb
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
jne 0x475efd
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00468c44
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edx, dword [edi + 0xc]
sub edx, ecx
shl edx, 2
push edx
lea eax, [eax + ecx*4]
push ebx
push eax
call fcn.00450560
mov eax, dword [edi + 0xc]
add esp, 0xc
push esi
mov dword [esi + 8], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x475f3d
cmp ecx, dword [esi + 8]
jge 0x475f3d
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x475f43
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x476001
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x47602f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x47604d
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00475f6b
jmp 0x47604d
mov eax, dword [esi + 0x14]
test eax, eax
je 0x47604d
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.00475f6b
test edi, edi
mov eax, edi
jne 0x476037
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x4c1a7c]
test ecx, ecx
je 0x476100
jmp 0x476000
ret 8

Function at 0x48de30
Capabilities:
Encode data using xor

Disassembly:
mov ah, 0x37
add eax, 0xe1cb079a
int 0x87
retf 0x29bf
cmp eax, 0xf27e3f8d
add al, 0xcf
add bh, byte [ebx - 0x6e682007]
imul edx, dword [eax - 0x43], 0x359bdc73
mov esi, 0xdc0ba8d5
lea esp, [ebx - 0x4e04c965]
test eax, 0xda387fd2
scasb al, byte es:[edi]
mov ecx, dword ds:[edi + 0x78]
lds edx, [esi - 0xd6639c3]
and al, 0x53
xchg byte [0x2664efbd], dh
add dword [esi + 4], edx
mov dword [0xa10f9ee1], eax
cmp bl, cl
jnp 0x48de81
jbe 0x48decb
xor ecx, dword [esi + edx*8 - 0x54eeeece]
jl 0x48de76
ret
jle 0x48de03
ffreep st(1)
pop ds
invalid
sub al, 0x3a
imul esi, dword [esi + 5], 0x520ebb63
daa
imul esp, dword [ecx - 0x57310f76], 0xd13bbab9
int 0x9b
into
test al, 0xb9
mov edx, 0x9bcdd13b
jno 0x48de8b
leave
and cl, 0x3e
fild word [edx + 0x76b8d3ac]
add dl, byte [ecx - 0x19b3824]
and cl, byte [eax + edi*2 + 0x10edffbf]
cmc
jp 0x48de44
stosd dword es:[edi], eax
mov dword [ebp + 0x6a], ebx
mov edi, dword [edi - 0x332d6c41]
loope 0x48df47
psrld mm7, qword [edx - 0x74a67698]
sar byte [edx - 0x74a67698], cl
loopne 0x48de99
cmp dword [esi], ebp
xchg esp, eax
dec ebx
adc eax, 0xe914d4fd
inc edi
mov ah, 0xbb
ja 0x48def7
sub dword [edx + ebp*2 + 0x1de7a3b5], ebp
and edx, ebp
mov eax, 0x15102663
jge 0x48df05
sar ebp, 0x1d
mov esi, 0x4451319d
push ecx
inc esp
ror edi, cl
das
test dword [ebp + ebx*8 + 0x7e296fc], ecx
sbb esp, 0x50
and dword [ecx - 0x53], esp
fcom qword [eax + 0x21]
popal
lodsd eax, dword [esi]
inc ebp
push ss
mov bl, 0xe
ret
out dx, al
test byte [edx - 0x4ebe8e19], bl
sar edi, 1
invalid
Function at 0x4015b0
Capabilities:
Set current directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push 0x40a7d0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [0x40a8d8], 2
jne 0x4015da
push str.You_must_reboot_your_computer_before_the_driver_can_be_used.
call fcn.00401560
add esp, 4
movzx eax, byte [0x40a8d5]
test eax, eax
jne 0x4015f9
cmp dword [0x40a8d8], 1
jne 0x401643
movzx ecx, byte [0x40a8d4]
test ecx, ecx
jne 0x401643
cmp dword [ebp + 8], 1
jne 0x40160b
mov dword [ebp - 0x20c], str.ERROR
jmp 0x401615
mov dword [ebp - 0x20c], 0x408270
mov edx, dword [ebp - 0x20c]
push edx
mov eax, dword [ebp + 8]
push eax
push str._nExiting_RLinkUSBInstall.exe._nExit_status:__d___s__n
lea ecx, [ebp - 0x208]
push ecx
call fcn.00402054
add esp, 0x10
lea edx, [ebp - 0x208]
push edx
call fcn.00401560
add esp, 4
mov eax, dword [ebp + 8]
push eax
call fcn.00402014
mov esp, ebp
pop ebp
ret

Function at 0x4016d0
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push str.RLinkUSBInstall.exe
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0xc], eax
push 0x104
push 0x40a6c8
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 8], 0x40a6c8
mov ecx, dword [ebp - 8]
mov dword [ebp - 4], ecx
push 0x408334
mov edx, dword [ebp - 8]
push edx
call fcn.004020b0
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40172e
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jne 0x401705
cmp dword [ebp - 4], 0
je 0x40174b
mov edx, dword [ebp - 4]
movsx eax, byte [edx]
cmp eax, 0x5c
jne 0x40174b
mov ecx, dword [ebp - 4]
mov byte [ecx], 0
push 0x40a7d0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x40a6c8
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esp, ebp
pop ebp
ret
Function at 0x401a90
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x330
movzx eax, byte [0x40a8d5]
test eax, eax
je 0x401ab1
push str._nInstalling_MS_WinUSB...
call fcn.00401e88
add esp, 4
push str.MS_WinUSB_XP_Vista
push 0x40a6c8
call fcn.00401da0
add esp, 8
push 0x40a6c8
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x330]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
je 0x401b0e
lea edx, [ebp - 0x108]
push edx
push 0
push str.LogRlinst
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x401b22
push str.RlinstLog.Log
lea ecx, [ebp - 0x108]
push ecx
call fcn.00401d90
add esp, 8
call fcn.00401a20
test eax, eax
je 0x401b41
push str.cmd.exe__c_DPInst_amd64.exe
lea edx, [ebp - 0x220]
push edx
call fcn.00402054
add esp, 8
jmp 0x401b55
push str.cmd.exe__c_DPInst_x86.exe
lea eax, [ebp - 0x220]
push eax
call fcn.00402054
add esp, 8
push 0x40a6c8
push 0
push 0
lea ecx, [ebp - 0x220]
push ecx
call fcn.00401100
add esp, 0x10
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0x100
je 0x401b96
push str.Error_reported_by_DPInst.exe
call fcn.00401560
add esp, 4
push 1
call fcn.004015b0
add esp, 4
mov esp, ebp
pop ebp
ret

Function at 0x401f53
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40a938], esi
push edi
jne 0x401f73
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x40a934], esi
mov byte [0x40a930], al
jne 0x401fd9
mov ecx, dword [0x40beb0]
test ecx, ecx
je 0x401fba
mov eax, dword [0x40beac]
sub eax, 4
cmp eax, ecx
jmp 0x401fb3
mov eax, dword [eax]
test eax, eax
je 0x401fa5
call eax
mov eax, dword [0x40beac]
sub eax, 4
cmp eax, dword [0x40beb0]
mov dword [0x40beac], eax
jae 0x401f9d
mov eax, 0x40a020
mov esi, 0x40a028
cmp eax, esi
mov edi, eax
jae 0x401fd9
mov eax, dword [edi]
test eax, eax
je 0x401fd2
call eax
add edi, 4
cmp edi, esi
jb 0x401fca
mov eax, 0x40a02c
mov esi, 0x40a030
cmp eax, esi
mov edi, eax
jae 0x401ff8
mov eax, dword [edi]
test eax, eax
je 0x401ff1
call eax
add edi, 4
cmp edi, esi
jb 0x401fe9
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x402012
push dword [ebp + 8]
mov dword [0x40a938], 1
call fcn.00401eb9
pop ebp
ret
Function at 0x40223d
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x4088a0
call fcn.00403fac
mov edi, 0x94
mov eax, edi
call fcn.00404110
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x40a8f8], ecx
mov eax, dword [esi + 4]
mov dword [0x40a904], eax
mov edx, dword [esi + 8]
mov dword [0x40a908], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40a8fc], esi
cmp ecx, 2
je 0x40229d
or esi, 0x8000
mov dword [0x40a8fc], esi
shl eax, 8
add eax, edx
mov dword [0x40a900], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x4022d6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4022d6
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4022ee
cmp eax, 0x20b
je 0x4022db
mov dword [ebp - 0x1c], edi
jmp 0x402302
cmp dword [ecx + 0x84], 0xe
jbe 0x4022d6
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x4022fc
cmp dword [ecx + 0x74], 0xe
jbe 0x4022d6
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.00403f59
pop ecx
test eax, eax
jne 0x40232e
cmp dword [0x40a944], 2
je 0x40231b
call fcn.004037f3
push 0x1c
call fcn.0040367c
push 0xff
call fcn.00401eb9
pop ecx
pop ecx
call fcn.00403323
mov dword [ebp - 4], edi
call fcn.00403d94
test eax, eax
jge 0x402347
push 0x1b
call fcn.00402218
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40bea4], eax
call fcn.00403c72
mov dword [0x40a93c], eax
call fcn.00403bd0
test eax, eax
jge 0x40236d
push 8
call fcn.00402218
pop ecx
call fcn.0040399d
test eax, eax
jge 0x40237e
push 9
call fcn.00402218
pop ecx
push 1
call fcn.00401ee9
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x402394
push eax
call fcn.00402218
pop ecx
mov eax, dword [0x40a918]
mov dword [0x40a91c], eax
push eax
push dword [0x40a910]
push dword [0x40a90c]
call fcn.00401bc0
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x4023c3
push esi
call fcn.00402014
call fcn.00402036
jmp 0x4023f5
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.00403fe7
ret
Function at 0x40367c
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40a590]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40a440]
je 0x4036b1
inc eax
cmp eax, 0x13
jb 0x4036a2
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40a440]
jne 0x4037d7
mov eax, dword [0x40a944]
cmp eax, 1
je 0x4037af
cmp eax, edx
jne 0x4036e1
cmp dword [0x40a044], 1
je 0x4037af
cmp ecx, 0xfc
je 0x4037d7
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403717
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00401d90
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00405130
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40374b
mov eax, edi
push eax
call fcn.00405130
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x408d30
push edi
call fcn.00405bf0
add esp, 0x10
push edi
call fcn.00405130
push dword [esi + 0x40a444]
mov ebx, eax
call fcn.00405130
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00404110
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00401d90
push edi
push ebx
call fcn.00401da0
push 0x408d10
push ebx
call fcn.00401da0
push dword [esi + 0x40a444]
push ebx
call fcn.00401da0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00405af0
add esp, 0x2c
jmp 0x4037d7
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40a444]
push dword [esi]
call fcn.00405130
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]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00405252
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x404e3a
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40ad64]
mov eax, dword [0x40a590]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x405000
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40ad80]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x405000
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x404ea4
xor eax, eax
jmp 0x405014
test al, 0x20
je 0x404eb5
push 2
push edi
push edi
push ecx
call fcn.00406a9d
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x404f8a
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x404fd1
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x404f17
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x404f08
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x404eea
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404f57
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x404f63
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x404ede
jmp 0x404f65
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x404ffb
cmp dword [ebp + 0x3a4], edi
je 0x404fd1
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x404fc3
mov dword [0x40a8f0], eax
jmp 0x405007
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404fb5
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x404f65
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x404f65
push dword [ebp + 0x3a4]
call fcn.00402404
pop ecx
jmp 0x405011
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x404fe9
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x404e9d
mov dword [0x40a8ec], 0x1c
mov dword [0x40a8f0], edi
jmp 0x405011
sub eax, dword [ebp - 0x7c]
jmp 0x405014
and dword [0x40a8f0], 0
mov dword [0x40a8ec], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00405252
add ebp, 0x39c
leave
ret