joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404ad0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 1
push edi
mov dword [esp + 8], 0
jne 0x404af2
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ecx, edi
jle 0x404b6b
mov eax, dword [esi + 8]
add eax, dword [esi + 4]
sub eax, ecx
mov ecx, edi
sub ecx, 1
je 0x404b58
sub ecx, 1
je 0x404b43
sub ecx, 2
je 0x404b30
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov dword [eax], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cx, word [edx]
mov word [eax], cx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [edx]
mov byte [eax], cl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
push esi
call fcn.004043b0
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x404b98
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push 0
lea edx, [esp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x14]
push edi
push edx
add ecx, eax
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x40173a
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
lea eax, [ebp - 0x10]
push esi
push edi
mov edi, dword [ebp + 8]
push eax
push dword [edi + 0x14]
call dword [sym.imp.USER32.dll_GetClientRect]
lea esi, [edi + 0x18]
lea ecx, [ebp - 0x10]
push ecx
dec dword [ebp - 8]
push dword [esi]
dec dword [ebp - 4]
call fcn.0040164e
add esp, 8
mov eax, 2
lea ecx, [ebp - 0x10]
inc dword [ebp - 8]
push ecx
inc dword [ebp - 4]
lea edx, [ebp - 0x58]
mov dword [ebp - 0x10], eax
push edx
mov dword [ebp - 0xc], eax
sub dword [ebp - 8], 2
sub dword [ebp - 4], 2
call dword [sym.imp.USER32.dll_CopyRect]
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x48]
push ecx
push edx
call dword [sym.imp.USER32.dll_CopyRect]
push 0x19
lea ecx, [ebp - 0x38]
push ecx
push dword [edi + 0x14]
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea ecx, [ebp - 0x38]
push ecx
call fcn.00403550
add esp, 4
mov edi, eax
lea ecx, [ebp - 0x38]
push 0x40b070
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
imul edi, dword [ebp - 8]
mov ecx, 0x64
mov eax, edi
cdq
idiv ecx
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x50], eax
push dword [0x40c714]
push ecx
mov dword [ebp - 0x48], eax
push dword [esi]
call dword [sym.imp.USER32.dll_FillRect]
push dword [0x40c720]
lea edx, [ebp - 0x48]
push edx
push dword [esi]
call dword [sym.imp.USER32.dll_FillRect]
lea ecx, [ebp - 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
lea ecx, [ebp - 0x1c]
push ecx
lea eax, [ebp - 0x38]
push edi
push eax
push dword [esi]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov ebx, eax
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x18]
push 0x800000
cdq
push dword [esi]
sub eax, edx
sar eax, 1
mov dword [ebp - 0x14], eax
call dword [sym.imp.GDI32.dll_SetBkColor]
push 0xffffff
push dword [esi]
call dword [sym.imp.GDI32.dll_SetTextColor]
push 0
lea eax, [ebp - 0x38]
push edi
lea ecx, [ebp - 0x58]
push eax
push ecx
push 6
push dword [ebp - 0x14]
push ebx
push dword [esi]
call dword [sym.imp.GDI32.dll_ExtTextOutA]
push 0xffffff
push dword [esi]
call dword [sym.imp.GDI32.dll_SetBkColor]
push 0x800000
push dword [esi]
call dword [sym.imp.GDI32.dll_SetTextColor]
push 0
lea eax, [ebp - 0x38]
push edi
lea ecx, [ebp - 0x48]
push eax
push ecx
push 6
push dword [ebp - 0x14]
push ebx
push dword [esi]
call dword [sym.imp.GDI32.dll_ExtTextOutA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401aa5
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
xor eax, eax
mov ecx, 0x10
push esi
push edi
xor esi, esi
lea edi, [ebp - 0x6c]
mov dword [ebp - 0x70], esi
rep stosd dword es:[edi], eax
lea edi, [ebp - 0xc]
lea ecx, [ebp - 0x174]
mov dword [ebp - 0x10], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov word [ebp - 0x40], 5
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x70]
mov dword [ebp - 0x70], 0x44
mov dword [ebp - 0x44], 1
push ecx
push edx
push esi
lea eax, [ebp - 0x174]
push esi
push esi
push esi
push esi
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x401bd4
push esi
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
push 1
lea eax, [ebp - 0x2c]
push esi
push esi
push esi
push eax
call edi
test eax, eax
je 0x401b54
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
lea eax, [ebp - 0x2c]
push esi
push esi
push esi
push eax
call edi
test eax, eax
jne 0x401b31
push 0xc8
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x401b22
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x40b074
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x401bd0
xor esi, esi
push 1
lea eax, [ebp - 0x2c]
push esi
push esi
push esi
push eax
call edi
test eax, eax
je 0x401bc0
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
lea eax, [ebp - 0x2c]
push esi
push esi
push esi
push eax
call edi
test eax, eax
jne 0x401b9d
push esi
push str.isdelete
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
jne 0x401b8e
xor eax, eax
jmp 0x401bda
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x401ef4
Capabilities:
Encode data using xor

Disassembly:
push ebp
xor edx, edx
mov ebp, esp
sub esp, 4
push ebx
push esi
mov esi, dword [ebp + 0xc]
cmp esi, edx
jle 0x401f46
mov eax, dword [ebp + 8]
mov ebx, edx
mov cl, 7
and bl, 7
sub cl, bl
mov byte [ebp - 2], cl
movzx ecx, cl
mov cl, byte [ecx + 0x40b030]
xor cl, byte [edx + eax]
mov byte [ebp - 1], cl
mov byte [ebp - 3], cl
mov cl, byte [ebp - 2]
ror byte [ebp - 1], cl
mov cl, byte [ebp - 3]
movzx ecx, bl
mov cl, byte [ecx + 0x40b030]
xor byte [ebp - 1], cl
mov bl, byte [ebp - 1]
mov byte [edx + eax], bl
inc edx
cmp esi, edx
jg 0x401f08
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402ee9
Capabilities:
Get disk information

Disassembly:
push ebp
mov eax, dword [esp + 8]
mov ebp, esp
sub esp, 0x208
test eax, eax
push ebx
push esi
push edi
je 0x403040
push eax
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x209], 0x5c
je 0x402f38
push 0x40b144
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x208]
xor ebx, ebx
push eax
call fcn.004035e0
add esp, 4
mov al, byte [ebp - 0x208]
sub al, 0x40
mov byte [ebp - 0x103], bl
mov byte [ebp - 0x104], al
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
je 0x403040
push 3
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x104]
push ecx
call fcn.00404200
add esp, 0xc
lea ecx, [ebp - 0x104]
mov byte [ebp - 0x101], bl
push ecx
call fcn.00402eb2
add esp, 4
cmp eax, dword [ebp + 0x10]
jb 0x403040
push ebx
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x104]
push str._sEXB_04X
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x104]
push 0
push ecx
call fcn.00409340
add esp, 8
test eax, eax
jne 0x402fe4
inc ebx
cmp ebx, 0xffff
jb 0x402fa9
lea eax, [ebp - 0x104]
mov esi, dword [ebp + 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call fcn.004035e0
add esp, 4
push esi
call fcn.004037a0
add esp, 4
mov edi, eax
push 0x40b154
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp edi, 0xffffffff
jne 0x40302f
cmp dword [0x40b164], 0xd
jne 0x403039
mov dword [0x40c7fc], 0
jmp 0x403039
mov dword [0x40c7fc], 1
mov eax, 1
jmp 0x403042
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403049
Capabilities:
Get common file path

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
mov dword [0x40c7fc], eax
sub esp, 0x100
lea ecx, [ebp - 0x100]
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
push pe_nt_image_headers32
push ecx
mov byte [esi], al
mov eax, dword [0x40c7f0]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403081
xor al, al
jmp 0x4030f2
push 0x20
lea eax, [ebp - 0x100]
push 0x40b158
push eax
call fcn.00403200
add esp, 0xc
mov edi, eax
test edi, edi
jne 0x4030a1
xor al, al
jmp 0x4030f2
push dword [edi + 0x10]
call fcn.00404140
add esp, 4
mov ebx, eax
push edi
call fcn.00403150
add esp, 4
push ebx
push esi
push str.TEMP
call fcn.00404300
add esp, 4
push eax
call fcn.00402ee9
add esp, 0xc
test eax, eax
mov al, 1
jne 0x4030f2
push pe_nt_image_headers32
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push ebx
lea eax, [ebp - 0x80]
push esi
push eax
call fcn.00402ee9
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4033d0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40b1ac], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x4033ee
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x40b1a8], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x40b1a4], bl
jne 0x403448
cmp dword [0x40d95c], 0
je 0x403436
mov edi, dword [0x40d958]
sub edi, 4
cmp edi, dword [0x40d95c]
jb 0x403436
mov eax, dword [edi]
test eax, eax
je 0x40342b
call eax
sub edi, 4
cmp edi, dword [0x40d95c]
jae 0x403423
push 0x40b01c
push 0x40b014
call fcn.00403480
add esp, 8
push 0x40b024
push 0x40b020
call fcn.00403480
add esp, 8
test ebx, ebx
jne 0x40346f
mov dword [0x40b1ac], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret

Function at 0x403770
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
mov eax, 0
jne 0x40378a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40379d
push eax
call fcn.00405bd0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x4037a0
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
mov eax, 0
jne 0x4037bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4037cf
push eax
call fcn.00405bd0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x4037e0
Capabilities:
Delete directory

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
mov eax, 0
jne 0x4037fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40380d
push eax
call fcn.00405bd0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x403810
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10c
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x403899
lea eax, [esp + 4]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x403899
cmp byte [esp + 4], 0x5c
je 0x403847
cmp byte [esp + 4], 0x2f
jne 0x40385a
mov al, byte [esp + 5]
cmp byte [esp + 4], al
jne 0x40385a
xor eax, eax
add esp, 0x10c
ret
mov byte [esp], 0x3d
xor eax, eax
mov al, byte [esp + 4]
push eax
call fcn.00405c40
lea ecx, [esp + 8]
mov byte [esp + 5], al
mov byte [esp + 6], 0x3a
mov byte [esp + 7], 0
lea edx, [esp + 4]
add esp, 4
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x403899
xor eax, eax
add esp, 0x10c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405bd0
add esp, 4
mov eax, 0xffffffff
add esp, 0x10c
ret
Function at 0x405cd0
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x40d950], edx
push ebx
push esi
push edi
push ebp
jbe 0x405ed7
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x40d850
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x405ed7
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x405d39
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x405d4a
push 2
push 0
push edx
call fcn.00406690
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x405de6
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x405e1f
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x405dad
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x405d9b
mov byte [edi], 0xd
inc esi
inc edi
mov byte [edi], al
inc edi
mov eax, edi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x405d82
lea eax, [esp + 0x24]
push 0
sub edi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push edi
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 0x405e15
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, edi
jge 0x405d6d
jmp 0x405e1f
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 0x405e15
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x405e1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x405ec6
cmp dword [esp + 0x10], 0
je 0x405e78
cmp dword [esp + 0x10], 5
jne 0x405e5b
mov dword [0x40b164], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x40b168], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.00405bd0
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 0x405ea2
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x405ea2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x40b164], 0x1c
mov dword [0x40b168], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x40b164], 9
mov dword [0x40b168], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x406750
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.004041d0
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1014]
push ebp
cmp dword [0x40d950], esi
jbe 0x40689d
mov eax, esi
mov ecx, esi
and eax, 0xffffffe7
and ecx, 0x1f
sar eax, 3
mov edx, dword [eax + 0x40d850]
test byte [edx + ecx*8 + 4], 1
je 0x40689d
push 1
push ebx
push esi
call fcn.00406690
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x40688d
push 2
push ebx
push esi
call fcn.00406690
add esp, 0xc
cmp eax, 0xffffffff
je 0x40688d
mov ecx, dword [esp + 0x101c]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x406833
lea edi, [esp + 0x14]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.00408560
add esp, 8
mov edi, eax
mov eax, 0x1000
cmp ebp, eax
jge 0x4067f6
mov eax, ebp
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00405cd0
add esp, 0xc
cmp eax, 0xffffffff
je 0x406812
sub ebp, eax
test ebp, ebp
jg 0x4067eb
jmp 0x406827
cmp dword [0x40b168], 5
jne 0x406825
mov dword [0x40b164], 0xd
mov ebx, eax
push edi
push esi
call fcn.00408560
add esp, 8
jmp 0x406870
jge 0x406870
push 0
push ecx
push esi
call fcn.00406690
add esp, 0xc
push esi
call fcn.00406460
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x406870
mov dword [0x40b164], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40b168], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.00406690
add esp, 0xc
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x40b164], 9
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
Function at 0x407190
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 [0x40b640], ebx
jne 0x4071df
call esi
cmp eax, ebx
mov edi, eax
je 0x4071bd
mov dword [0x40b640], 1
jmp 0x4071df
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x4071d5
mov dword [0x40b640], 2
jmp 0x4071df
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x40b640], 1
jne 0x40728e
test edi, edi
jne 0x407202
call esi
mov edi, eax
test edi, edi
jne 0x407202
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x40721c
add esi, 2
cmp word [esi], 0
jne 0x40720a
add esi, 2
cmp word [esi], 0
jne 0x40720a
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 0x40727d
push ebp
call fcn.00405b20
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x40727d
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 0x40726c
push ebx
call fcn.00404570
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 [0x40b640], 2
jne 0x407312
test ebx, ebx
jne 0x4072b1
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x4072b1
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x4072c6
inc ebp
cmp byte [ebp], 0
jne 0x4072b8
inc ebp
cmp byte [ebp], 0
jne 0x4072b8
sub ebp, ebx
inc ebp
push ebp
call fcn.00405b20
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x4072eb
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 0x407750
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x40b868
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x407777
add eax, 8
inc ecx
cmp eax, 0x40b8f8
jb 0x407768
cmp dword [ecx*8 + 0x40b868], edx
lea ebx, [ecx*8]
jne 0x40793b
cmp dword [0x40b1bc], 1
je 0x4078f7
cmp dword [0x40b1bc], 0
jne 0x4077ae
cmp dword [0x40b1c0], 1
je 0x4078f7
cmp edx, 0xfc
je 0x40793b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x4077eb
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 0x40782f
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 0x40a360
push ebp
call fcn.00404200
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, 0x40a340
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 + 0x40b86c]
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.00408c30
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x40d850], 0
je 0x40790d
mov eax, dword [0x40d850]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x407917
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x40b86c]
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