joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d7aa0
Capabilities:
Check os version

Disassembly:
sub esp, 0x194
cmp dword [0x50f994], 0
push ebx
push esi
push edi
je 0x4d7ac1
mov eax, dword [0x50f994]
pop edi
pop esi
pop ebx
add esp, 0x194
ret
push 0x42
push 0x120
call fcn.004891a0
add esp, 8
mov dword [0x50f994], eax
test eax, eax
jne 0x4d7ae5
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x194
ret
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov ebx, eax
xor ecx, ecx
mov cl, bl
mov eax, dword [0x50f994]
lea edx, [esp + 0xc]
mov dword [eax + 0x14], ecx
xor ecx, ecx
mov eax, dword [0x50f994]
mov cl, bh
push edx
mov dword [eax + 0x18], ecx
mov dword [esp + 0x10], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4d7c42
mov eax, dword [esp + 0x10]
mov ecx, dword [0x50f994]
mov dword [ecx + 0x14], eax
mov ecx, dword [0x50f994]
mov edx, dword [esp + 0x14]
mov dword [ecx + 0x18], edx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4d7be5
cmp eax, 1
je 0x4d7bfa
cmp eax, 2
je 0x4d7c2d
mov si, word [esp + 0xa0]
mov eax, dword [0x50f994]
mov ecx, 0xa
mov edi, dword [eax + 0x18]
mov eax, edi
cdq
idiv ecx
test edx, edx
jne 0x4d7b7d
mov eax, edi
cdq
idiv ecx
mov edi, eax
lea eax, [esp + 0xa0]
push esi
push 0x1e88
push 0x100
push eax
call fcn.004c8000
lea edx, [esp + 0xb0]
add esp, 0x10
mov eax, dword [0x50f994]
push edi
mov ecx, dword [eax + 0x14]
add eax, 0x1c
push ecx
push edx
push 0x100
push eax
call fcn.00401900
add esp, 0x14
mov eax, dword [0x50f994]
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [0x50f994]
pop edi
pop esi
pop ebx
mov dword [ecx + 0x11c], eax
mov eax, dword [0x50f994]
add esp, 0x194
ret
mov si, 4
mov eax, dword [0x50f994]
mov dword [eax + 0x10], 1
jmp 0x4d7b60
mov eax, dword [0x50f994]
cmp dword [eax + 0x14], 4
jl 0x4d7c1b
cmp dword [eax + 0x18], 0xa
jl 0x4d7c1b
mov dword [eax + 8], 1
mov si, 2
jmp 0x4d7b60
mov eax, dword [0x50f994]
mov esi, 1
mov dword [eax + 4], esi
jmp 0x4d7b60
mov si, 3
mov eax, dword [0x50f994]
mov dword [eax + 0xc], 1
jmp 0x4d7b60
test ebx, 0x80000000
mov eax, dword [0x50f994]
je 0x4d7ca5
mov eax, dword [eax + 0x14]
cmp eax, 3
jg 0x4d7c73
mov ecx, dword [0x50f994]
cmp dword [ecx + 0x18], 0xb
jg 0x4d7c73
mov dword [ecx + 0x10], 1
mov si, 4
jmp 0x4d7b60
cmp eax, 4
jl 0x4d7c93
mov eax, dword [0x50f994]
cmp dword [eax + 0x18], 0xa
jl 0x4d7c93
mov dword [eax + 8], 1
mov si, 2
jmp 0x4d7b60
mov eax, dword [0x50f994]
mov esi, 1
mov dword [eax + 4], esi
jmp 0x4d7b60
mov dword [eax + 0xc], 1
mov si, 3
jmp 0x4d7b60
Function at 0x4d8ea0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
xor esi, esi
cmp dword [0x509738], esi
je 0x4d8eb4
mov eax, dword [0x509738]
pop edi
pop esi
ret
push 0x104
mov eax, dword [0x50e328]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
mov ecx, dword [0x50e328]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x4d8ee8
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x4d8f00
push 0x328
mov eax, dword [str._s___d]
push str.version
push eax
call fcn.004c8c90
add esp, 0xc
mov eax, dword [esi]
push edi
mov dword [0x509738], eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [0x509738]
pop edi
pop esi
ret

Function at 0x4dbf50
Capabilities:
Hide graphical window

Disassembly:
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4dbf72
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x10
mov edi, dword [esp + 0x1c]
cmp edi, 0x86
jne 0x4dbf8d
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x10
lea eax, [esp + 0x10]
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
push eax
push ebp
push ebx
push edi
push esi
call fcn.004dbc60
add esp, 0x14
test eax, eax
je 0x4dbfb8
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x10
lea ecx, [edi - 0x18]
cmp ecx, 0xfa
ja case.0x4dbfcb.28
xor eax, eax
mov al, byte [ecx + 0x4dc060]
jmp dword [eax*4 + 0x4dc04c]
test ebx, ebx
je case.0x4dbfcb.28
push str.Hidden
push esi
call dword [sym.imp.USER32.dll_RemovePropA]
jmp case.0x4dbfcb.28
push esi
call fcn.004dbbf0
add esp, 4
push 1
push str.Active
push esi
call dword [sym.imp.USER32.dll_SetPropA]
jmp case.0x4dbfcb.28
push esi
call fcn.004dbc10
add esp, 4
push str.Hidden
push esi
call dword [sym.imp.USER32.dll_RemovePropA]
push str.Height
push esi
call dword [sym.imp.USER32.dll_RemovePropA]
jmp case.0x4dbfcb.28
mov eax, ebx
and eax, 0xfff0
cmp eax, 0xf060
jne case.0x4dbfcb.28
push 0
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push ebp
push ebx
push edi
push esi
call dword [sym.imp.USER32.dll_DefWindowProcA]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x10
Function at 0x4dca20
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x24
push ebx
push esi
mov esi, dword [esp + 0x30]
push edi
push ebp
push esi
call dword [sym.imp.USER32.dll_GetWindowDC]
mov edi, eax
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.GDI32.dll_GetDCOrgEx]
mov ecx, dword [esp + 0x14]
push 0
mov eax, dword [esp + 0x14]
push ecx
push eax
xor ebx, ebx
push edi
call dword [sym.imp.GDI32.dll_SetWindowOrgEx]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x2c], eax
push esi
mov dword [esp + 0x34], ecx
call fcn.004dcfd0
mov ebp, dword [esp + 0x40]
add esp, 4
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
push ecx
push eax
push ebp
call dword [sym.imp.USER32.dll_PtInRect]
cmp eax, ebx
je 0x4dca99
cmp ebx, 1
sbb ebx, ebx
neg ebx
push ebx
push ebp
push edi
call fcn.004dc520
add esp, 0xc
lea eax, [esp + 0x18]
push 0
push 0
push esi
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
mov eax, dword [esp + 0x1c]
cmp eax, 0x1f
je 0x4dcac6
cmp eax, 0x202
je 0x4dcac6
push 1
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ah, 0x80
jne 0x4dca72
test ebx, ebx
je 0x4dcadf
push 0
push ebp
push edi
call fcn.004dc520
add esp, 0xc
cmp dword [esp + 0x1c], 0x1f
jne 0x4dcadf
xor ebx, ebx
call fcn.004dd020
push edi
push esi
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x24
ret

Function at 0x4dd970
Capabilities:
Hide graphical window

Disassembly:
push esi
call fcn.004dd9e0
test ax, ax
je 0x4dd9dd
cmp dword [0x50984c], 0
jne 0x4dd9dd
call fcn.004dd8e0
test eax, eax
je 0x4dd9dd
push 0xfffffffffffffff0
mov eax, dword [0x50e324]
push eax
call dword [sym.imp.USER32.dll_GetWindowLongA]
or eax, 0x10000
mov ecx, dword [0x50e324]
push eax
push 0xfffffffffffffff0
push ecx
call dword [sym.imp.USER32.dll_SetWindowLongA]
push 3
mov ecx, dword [0x50e324]
mov dword [0x509848], 1
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov dword [0x509848], 0
mov dword [0x50984c], 1
pop esi
ret

Function at 0x4dda00
Capabilities:
Hide graphical window

Disassembly:
call fcn.004dd9e0
test ax, ax
je 0x4dda46
push 1
mov eax, dword [0x50e324]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0xfffffffffffffff0
mov ecx, dword [0x50e324]
push ecx
call dword [sym.imp.USER32.dll_GetWindowLongA]
and eax, 0xfffeffff
mov ecx, dword [0x50e324]
push eax
push 0xfffffffffffffff0
push ecx
call dword [sym.imp.USER32.dll_SetWindowLongA]
mov dword [0x50984c], 0
ret
Function at 0x4f1090
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 0x4f1119
lea eax, [esp + 4]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4f1119
cmp byte [esp + 4], 0x5c
je 0x4f10c7
cmp byte [esp + 4], 0x2f
jne 0x4f10da
mov al, byte [esp + 5]
cmp byte [esp + 4], al
jne 0x4f10da
xor eax, eax
add esp, 0x10c
ret
mov byte [esp], 0x3d
xor eax, eax
mov al, byte [esp + 4]
push eax
call fcn.004f4280
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 0x4f1119
xor eax, eax
add esp, 0x10c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004f4210
add esp, 4
mov eax, 0xffffffff
add esp, 0x10c
ret

Function at 0x4f1160
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
push esi
mov ebx, dword [esp + 0x118]
push edi
test ebx, ebx
je 0x4f11d3
push ebx
call fcn.004f1290
add esp, 4
test eax, eax
jne 0x4f11a1
xor eax, eax
pop edi
mov dword [0x50a2a8], 0xf
mov dword [0x50a2a4], 0xd
pop esi
pop ebx
add esp, 0x10c
ret
add bl, 0x40
lea eax, [esp + 0x10]
mov byte [esp + 0xc], bl
push eax
lea ecx, [esp + 0x18]
lea ebx, [esp + 0x10]
mov byte [esp + 0x11], 0x3a
mov byte [esp + 0x12], 0x2e
mov byte [esp + 0x13], 0
push ecx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4f11e3
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4f1282
inc eax
cmp eax, 0x104
ja 0x4f1282
mov edx, dword [esp + 0x120]
test edx, edx
jne 0x4f1234
mov ecx, dword [esp + 0x124]
cmp ecx, eax
jg 0x4f120f
mov ecx, eax
push ecx
call fcn.004f3af0
add esp, 4
mov edx, eax
test edx, edx
jne 0x4f1253
xor eax, eax
pop edi
mov dword [0x50a2a4], 0xc
pop esi
pop ebx
add esp, 0x10c
ret
cmp dword [esp + 0x124], eax
jge 0x4f1253
xor eax, eax
pop edi
mov dword [0x50a2a4], 0x22
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, edx
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret

Function at 0x4f1290
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
sub esp, 4
test eax, eax
jne 0x4f12a4
mov eax, 1
add esp, 4
ret
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0x5c
mov byte [esp + 3], 0
add al, 0x40
mov byte [esp], al
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x4f12d6
cmp eax, 1
je 0x4f12d6
mov eax, 1
add esp, 4
ret
xor eax, eax
add esp, 4
ret
Function at 0x4f34f0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x501998
push 0x4f9204
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x50a2b0], eax
xor eax, eax
mov al, byte [0x50a2b1]
mov dword [0x50a2bc], eax
mov eax, dword [0x50a2b0]
shr dword [0x50a2b0], 0x10
and eax, 0xff
mov dword [0x50a2b8], eax
shl eax, 8
add eax, dword [0x50a2bc]
mov dword [0x50a2b4], eax
call fcn.004f91c0
test eax, eax
jne 0x4f3564
push 0x1c
call fcn.004f3690
add esp, 4
mov dword [ebp - 4], 0
call fcn.004f8fe0
call fcn.004f46c0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x512fb0], eax
call fcn.004f8e50
mov dword [0x50a290], eax
test eax, eax
je 0x4f3597
cmp dword [0x512fb0], 0
jne 0x4f35a1
push 0xffffffffffffffff
call fcn.004f37e0
add esp, 4
call fcn.004f8bd0
call fcn.004f8ae0
call fcn.004f37b0
mov esi, dword [0x512fb0]
mov al, byte [esi]
cmp al, 0x22
je 0x4f35c8
cmp al, 0x20
jbe 0x4f35f5
inc esi
cmp byte [esi], 0x20
ja 0x4f35c0
jmp 0x4f35f5
inc esi
cmp byte [esi], 0x22
je 0x4f35f4
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x4f35ef
xor eax, eax
mov al, bl
push eax
call fcn.004f8a80
add esp, 4
test eax, eax
je 0x4f35e9
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x4f35d1
cmp byte [esi], 0x22
jne 0x4f35f5
inc esi
cmp byte [esi], 0
je 0x4f3605
cmp byte [esi], 0x20
ja 0x4f3605
inc esi
cmp byte [esi], 0
jne 0x4f35fa
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x4f3629
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.004f37e0
jmp 0x4f366a
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 0x4f3820
Capabilities:
Terminate process

Disassembly:
cmp dword [0x50a2ec], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x4f383e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x50a2e8], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x50a2e4], bl
jne 0x4f3898
cmp dword [0x512fac], 0
je 0x4f3886
mov edi, dword [0x512fa8]
sub edi, 4
cmp edi, dword [0x512fac]
jb 0x4f3886
mov eax, dword [edi]
test eax, eax
je 0x4f387b
call eax
sub edi, 4
cmp edi, dword [0x512fac]
jae 0x4f3873
push 0x505090
push 0x505088
call fcn.004f38d0
add esp, 8
push 0x505098
push 0x505094
call fcn.004f38d0
add esp, 8
test ebx, ebx
jne 0x4f38bf
mov dword [0x50a2ec], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x4f7380
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x512fa0], edx
push ebx
push esi
push edi
push ebp
jbe 0x4f7587
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x512ea0
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 0x4f7587
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x4f73e9
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x4f73fa
push 2
push 0
push edx
call fcn.004fa570
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x4f7496
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x4f74cf
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x4f745d
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x4f744b
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 0x4f7432
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 0x4f74c5
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, edi
jge 0x4f741d
jmp 0x4f74cf
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 0x4f74c5
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x4f74cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x4f7576
cmp dword [esp + 0x10], 0
je 0x4f7528
cmp dword [esp + 0x10], 5
jne 0x4f750b
mov dword [0x50a2a4], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x50a2a8], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.004f4210
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 0x4f7552
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x4f7552
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x50a2a4], 0x1c
mov dword [0x50a2a8], 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 [0x50a2a4], 9
mov dword [0x50a2a8], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x4f8e50
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 [0x50aeb4], ebx
jne 0x4f8e9f
call esi
cmp eax, ebx
mov edi, eax
je 0x4f8e7d
mov dword [0x50aeb4], 1
jmp 0x4f8e9f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x4f8e95
mov dword [0x50aeb4], 2
jmp 0x4f8e9f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x50aeb4], 1
jne 0x4f8f4e
test edi, edi
jne 0x4f8ec2
call esi
mov edi, eax
test edi, edi
jne 0x4f8ec2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x4f8edc
add esi, 2
cmp word [esi], 0
jne 0x4f8eca
add esi, 2
cmp word [esi], 0
jne 0x4f8eca
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 0x4f8f3d
push ebp
call fcn.004f3af0
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x4f8f3d
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 0x4f8f2c
push ebx
call fcn.004f3760
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 [0x50aeb4], 2
jne 0x4f8fd2
test ebx, ebx
jne 0x4f8f71
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x4f8f71
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x4f8f86
inc ebp
cmp byte [ebp], 0
jne 0x4f8f78
inc ebp
cmp byte [ebp], 0
jne 0x4f8f78
sub ebp, ebx
inc ebp
push ebp
call fcn.004f3af0
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x4f8fab
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 0x4f9320
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x50aec8
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x4f9347
add eax, 8
inc ecx
cmp eax, 0x50af58
jb 0x4f9338
cmp dword [ecx*8 + 0x50aec8], edx
lea ebx, [ecx*8]
jne 0x4f950b
cmp dword [0x50a29c], 1
je 0x4f94c7
cmp dword [0x50a29c], 0
jne 0x4f937e
cmp dword [0x50a2a0], 1
je 0x4f94c7
cmp edx, 0xfc
je 0x4f950b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x4f93bb
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 0x4f93ff
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 0x50982c
push ebp
call fcn.004f1640
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, 0x501e3c
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 + 0x50aecc]
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.004fbf00
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x512ea0], 0
je 0x4f94dd
mov eax, dword [0x512ea0]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x4f94e7
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x50aecc]
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 0x4fc9d0
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.004f1b40
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1014]
push ebp
cmp dword [0x512fa0], esi
jbe 0x4fcb1d
mov eax, esi
mov ecx, esi
and eax, 0xffffffe7
and ecx, 0x1f
sar eax, 3
mov edx, dword [eax + 0x512ea0]
test byte [edx + ecx*8 + 4], 1
je 0x4fcb1d
push 1
push ebx
push esi
call fcn.004fa570
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x4fcb0d
push 2
push ebx
push esi
call fcn.004fa570
add esp, 0xc
cmp eax, 0xffffffff
je 0x4fcb0d
mov ecx, dword [esp + 0x101c]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x4fcab3
lea edi, [esp + 0x14]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.004fd400
add esp, 8
mov edi, eax
mov eax, 0x1000
cmp ebp, eax
jge 0x4fca76
mov eax, ebp
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.004f7380
add esp, 0xc
cmp eax, 0xffffffff
je 0x4fca92
sub ebp, eax
test ebp, ebp
jg 0x4fca6b
jmp 0x4fcaa7
cmp dword [0x50a2a8], 5
jne 0x4fcaa5
mov dword [0x50a2a4], 0xd
mov ebx, eax
push edi
push esi
call fcn.004fd400
add esp, 8
jmp 0x4fcaf0
jge 0x4fcaf0
push 0
push ecx
push esi
call fcn.004fa570
add esp, 0xc
push esi
call fcn.004fb9c0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x4fcaf0
mov dword [0x50a2a4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x50a2a8], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.004fa570
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 [0x50a2a4], 9
pop edi
pop esi
pop ebx
add esp, 0x1004
ret