joyce8/EMBER2024-capa huggingface dataset:
Function at 0x444a30
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x444a63
push esi
call fcn.00447b20
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x444a5c
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x444ae9
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x444ad2
mov eax, dword [esi + 8]
test eax, eax
je 0x444a87
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x444ace
cmp eax, 2
je 0x444ad2
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x444a7a
cmp eax, 3
je 0x444aad
cmp eax, 1
jne 0x444a7a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x444a7a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x444a7a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00444b10
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x444af8
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00444b10
add esp, 4
pop esi
ret

Function at 0x452070
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x452113
test eax, eax
jbe 0x452113
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x452113
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x4520be
xor esi, esi
jmp 0x4520c4
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x4520ef
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.00454060
add esi, eax
push esi
mov ebx, esi
call fcn.00454060
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x4520d0
pop ebp
test edi, edi
pop edi
jne 0x452113
test ebx, ebx
je 0x452113
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.0045dd90
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x452255
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x45236d
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x45236d
mov eax, dword [esi + 0x3c]
push eax
call fcn.0046ed31
mov esi, eax
test esi, esi
je 0x45236d
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x45236d
mov ecx, esi
call fcn.004521c0
cmp edi, eax
jge 0x45236d
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x4522f3
mov dword [esp + 0x34], 1
jmp 0x45234e
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x45236d
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.004517b0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc

Function at 0x46f6d5
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x46f70d
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0046d78c
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0046d764
jmp 0x46f719
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x470dc7
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x470e09
call fcn.00476ab1
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x470e09
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x470e00
xor eax, eax
jmp 0x470e11
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00470e17
pop edi
pop esi
pop ebx
ret 4
Function at 0x476fe1
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 0x47700f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x47702d
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00476f47
jmp 0x47702d
mov eax, dword [esi + 0x14]
test eax, eax
je 0x47702d
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00476f47
test edi, edi
mov eax, edi
jne 0x477017
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x40100b
Capabilities:
Query or enumerate registry value

Disassembly:
call 0x40100b
push eax
call sub.KERNEL32.dll_ExitProcess
push ebp
mov ebp, esp
add esp, 0xfffffef0
jmp 0x40109c
lea eax, [ebp - 0x104]
push eax
call fcn.004011ec
push 0x401019
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
jne 0x401165
lea eax, [ebp - 0x10c]
push eax
push 0x20019
push 0
push 0x401038
push 0x80000001
call sub.ADVAPI32.dll_RegOpenKeyExA
cmp eax, 0
jne 0x4011a5
mov dword [ebp - 0x110], 0x103
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x104]
push eax
push 0
push 0
push 0x401052
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegQueryValueExA
push eax
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegCloseKey
pop eax
cmp eax, 0
jne 0x4011a5
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrlenA
lea ebx, [ebp - 0x104]
add ebx, eax
dec ebx
cmp byte [ebx], 0x5c
je 0x40114a
mov word [ebx], 0x5c
push 0x401023
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
je 0x4011a5
mov dword [ebp - 0x108], eax
push 0x40102d
push eax
call sub.KERNEL32.dll_GetProcAddress
test eax, eax
je 0x40119a
push 0x3e8
call eax
test eax, eax
je 0x40119a
call 0x40118a
add dword [esp], 0x1e76
call eax
push 0
call sub.KERNEL32.dll_ExitProcess
push dword [ebp - 0x108]
call sub.KERNEL32.dll_FreeLibrary
push 0x10
push 0x401096
push 0x401057
push 0
call sub.USER32.dll_MessageBoxA
mov eax, 0xffffffff
leave
ret

Function at 0x455dec
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push ebx
xor eax, eax
mov ebx, dword fs:[0x18]
mov ecx, dword fs:[0x30]
test ecx, ecx
jns 0x455e24
mov ecx, 0x530000
cmp dword [ebx + 0x58], ecx
jne 0x455e12
mov al, 1
jmp 0x455e65
cmp dword [ebx + 0x54], ecx
jne 0x455e1b
mov al, 2
jmp 0x455e65
cmp dword [ebx + 0x7c], ecx
jne 0x455e65
mov al, 3
jmp 0x455e65
mov ebx, dword [ecx + 0xa8]
mov ecx, dword [ecx + 0xa4]
cmp ecx, 4
ja 0x455e39
mov al, 4
jmp 0x455e65
cmp ecx, 5
jne 0x455e59
cmp ebx, 0
jne 0x455e47
mov al, 5
jmp 0x455e65
cmp ebx, 1
jne 0x455e50
mov al, 6
jmp 0x455e65
cmp ebx, 2
jne 0x455e59
mov al, 7
jmp 0x455e65
cmp ecx, 6
jne 0x455e65
cmp ebx, 0
jne 0x455e65
mov al, 8
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4021ab
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push esi
push edi
mov ebx, str.VERTEX_License_Server
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov dword [0x40d76c], eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
lea ecx, [ebp - 0x108]
mov eax, dword [0x40d76c]
push eax
push ebx
push str._s_error:__d
push ecx
call fcn.004027c0
add esp, 0x10
lea ecx, [ebp - 0x108]
mov edx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
test esi, esi
je 0x40221c
push edi
lea eax, [ebp - 8]
push eax
push edi
push 2
push edi
push edi
push edi
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, dword [0x40b170]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40222f
Capabilities:
Access the windows event log

Disassembly:
push ebp
lea eax, [esp + 0x14]
mov ebp, esp
sub esp, 0x104
push esi
lea edx, [ebp - 0x104]
push edi
push eax
push dword [ebp + 0x10]
push edx
call fcn.00402e10
add esp, 0xc
cmp word [ebp + 8], 4
je 0x402293
push str.VERTEX_License_Server
xor edi, edi
push edi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
lea eax, [ebp - 0x104]
mov dword [ebp - 4], eax
test esi, esi
je 0x402293
push edi
lea eax, [ebp - 4]
push eax
push edi
push 1
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x402450
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x403e34
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov ecx, eax
mov dl, ah
and ecx, 0xff
shr eax, 0x10
mov dword [0x40b768], edx
mov dword [0x40b764], ecx
mov dword [0x40b75c], eax
shl ecx, 8
add ecx, edx
mov dword [0x40b760], ecx
call fcn.00403df0
test eax, eax
jne 0x4024ba
push 0x1c
call fcn.00402590
add esp, 4
call fcn.00403c50
test eax, eax
jne 0x4024cd
push 0x10
call fcn.00402590
add esp, 4
mov dword [ebp - 4], 0
call fcn.00403a70
call fcn.00403a60
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40f2c8], eax
call fcn.004035c0
mov dword [0x40b5d0], eax
test eax, eax
je 0x402500
cmp dword [0x40f2c8], 0
jne 0x40250a
push 0xffffffffffffffff
call fcn.00402eb0
add esp, 4
call fcn.00403350
call fcn.00403260
call fcn.00402e80
mov eax, dword [0x40b778]
mov dword [0x40b77c], eax
push eax
mov eax, dword [0x40b770]
push eax
mov eax, dword [0x40b76c]
push eax
call fcn.00401d0d
add esp, 0xc
push eax
call fcn.00402eb0
jmp 0x402567
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4025c0
Capabilities:
Create thread
Resume thread

Disassembly:
push esi
push edi
xor edi, edi
push 0x74
push 1
call fcn.00404150
add esp, 8
mov esi, eax
cmp esi, edi
je 0x402613
push esi
call fcn.00403cb0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], ecx
push esi
mov edx, dword [esp + 0x14]
push 4
push esi
push 0x402650
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 4], eax
mov edi, eax
test edi, edi
jne 0x402631
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call fcn.004029a0
add esp, 4
test edi, edi
je 0x402629
push edi
call fcn.00402c10
add esp, 4
mov eax, 0xffffffff
pop edi
pop esi
ret
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x40260b
mov eax, edi
pop edi
pop esi
ret

Function at 0x402ef0
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
push edi
call fcn.00402fb0
cmp dword [0x40b798], 1
mov esi, dword [esp + 0x10]
jne 0x402f13
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x40b794], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x40b790], bl
jne 0x402f6d
cmp dword [0x40f2b8], 0
je 0x402f5b
mov edi, dword [0x40f2b4]
sub edi, 4
cmp edi, dword [0x40f2b8]
jb 0x402f5b
mov eax, dword [edi]
test eax, eax
je 0x402f50
call eax
sub edi, 4
cmp edi, dword [0x40f2b8]
jae 0x402f48
push 0x40b01c
push 0x40b014
call fcn.00402fd0
add esp, 8
push 0x40b024
push 0x40b020
call fcn.00402fd0
add esp, 8
test ebx, ebx
je 0x402f8c
call fcn.00402fc0
pop edi
pop esi
pop ebx
ret
mov dword [0x40b798], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x4035c0
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x40b83c], ebx
jne 0x40360f
call esi
cmp eax, ebx
mov edi, eax
je 0x4035ed
mov dword [0x40b83c], 1
jmp 0x40360f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x403605
mov dword [0x40b83c], 2
jmp 0x40360f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x40b83c], 1
jne 0x4036be
test edi, edi
jne 0x403632
call esi
mov edi, eax
test edi, edi
jne 0x403632
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x40364c
add esi, 2
cmp word [esi], 0
jne 0x40363a
add esi, 2
cmp word [esi], 0
jne 0x40363a
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x4036ad
push ebp
call fcn.00402b20
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x4036ad
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40369c
push ebx
call fcn.004029a0
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x40b83c], 2
jne 0x403742
test ebx, ebx
jne 0x4036e1
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x4036e1
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x4036f6
inc ebp
cmp byte [ebp], 0
jne 0x4036e8
inc ebp
cmp byte [ebp], 0
jne 0x4036e8
sub ebp, ebx
inc ebp
push ebp
call fcn.00402b20
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x40371b
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret

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

Disassembly:
push esi
call fcn.00404200
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x40ba7c], eax
cmp eax, 0xffffffff
jne 0x403c6a
xor eax, eax
pop esi
ret
push 0x74
push 1
call fcn.00404150
add esp, 8
mov esi, eax
test esi, esi
je 0x403cac
push esi
mov eax, dword [0x40ba7c]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x403cac
push esi
call fcn.00403cb0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov eax, 1
mov dword [esi + 4], 0xffffffff
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x403cd0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x40ba7c]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x403d33
push 0x74
push 1
call fcn.00404150
add esp, 8
mov edi, eax
test edi, edi
je 0x403d29
push edi
mov eax, dword [0x40ba7c]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x403d29
push edi
call fcn.00403cb0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi], eax
mov dword [edi + 4], 0xffffffff
jmp 0x403d33
push 0x10
call fcn.00402590
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
ret

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

Disassembly:
cmp dword [0x40ba7c], 0xffffffff
push esi
je 0x403ddf
mov esi, dword [esp + 8]
test esi, esi
jne 0x403d68
mov eax, dword [0x40ba7c]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x403dd1
mov eax, dword [esi + 0x24]
test eax, eax
je 0x403d78
push eax
call fcn.004029a0
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x403d88
push eax
call fcn.004029a0
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x403d98
push eax
call fcn.004029a0
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x403da8
push eax
call fcn.004029a0
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x403db8
push eax
call fcn.004029a0
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x403dc8
push eax
call fcn.004029a0
add esp, 4
push esi
call fcn.004029a0
add esp, 4
push 0
mov eax, dword [0x40ba7c]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x403f50
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x40ba88
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x403f77
add eax, 8
inc ecx
cmp eax, 0x40bb18
jb 0x403f68
cmp dword [ecx*8 + 0x40ba88], edx
lea ebx, [ecx*8]
jne 0x40413b
cmp dword [0x40b5dc], 1
je 0x4040f7
cmp dword [0x40b5dc], 0
jne 0x403fae
cmp dword [0x40b5e0], 1
je 0x4040f7
cmp edx, 0xfc
je 0x40413b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x403feb
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40402f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x40a2f0
push ebp
call fcn.00405e50
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40a2d0
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x40ba8c]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00405db0
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x40f1b0], 0
je 0x40410d
mov eax, dword [0x40f1b0]
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x404117
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x40ba8c]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub 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 ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x406420
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x418
push ebx
push esi
push edi
push ebp
xor edi, edi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], edi
cmp ebp, edi
jne 0x406448
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov edx, dword [esp + 0x42c]
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x40f1b0
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ebx, dword [esp + 0x18]
shl eax, 2
lea ecx, [eax + eax*8]
mov eax, dword [ebx]
mov dword [esp + 0x1c], ecx
test byte [eax + ecx + 4], 0x20
je 0x406489
push 2
push 0
push edx
call fcn.004059a0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x406525
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40655e
lea esi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x4064ec
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x4064da
mov byte [esi], 0xd
inc edi
inc esi
mov byte [esi], al
inc esi
mov eax, esi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x4064c1
lea eax, [esp + 0x24]
push 0
sub esi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push esi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406554
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, esi
jge 0x4064ac
jmp 0x40655e
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406554
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x40655e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x40660a
cmp dword [esp + 0x10], 0
je 0x4065ba
cmp dword [esp + 0x10], 5
jne 0x40659d
call fcn.00402c90
mov dword [eax], 9
call fcn.00402ca0
mov ecx, dword [esp + 0x10]
pop ebp
pop edi
mov dword [eax], ecx
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00402c10
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x4065e4
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x4065e4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
call fcn.00402c90
mov dword [eax], 0x1c
call fcn.00402ca0
pop ebp
mov dword [eax], 0
mov eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, edi
pop edi
pop esi
pop ebx
add esp, 0x418
ret