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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x421380
cmp edx, dword [eax]
je 0x4096a7
add eax, 8
inc ecx
cmp eax, 0x421410
jl 0x409698
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x421380]
jne 0x4097d5
mov eax, dword [0x423c48]
cmp eax, 1
je 0x4097af
test eax, eax
jne 0x4096d8
cmp dword [0x420cd4], 1
je 0x4097af
cmp edx, 0xfc
je 0x4097d5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40970f
lea eax, [ebp - 0x1a4]
push 0x41c504
push eax
call fcn.0040aee0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00408bc0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x409752
lea eax, [ebp - 0x1a4]
push eax
call fcn.00408bc0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x41c500
push edi
call fcn.0040bf50
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x41c4e4
push eax
call fcn.0040aee0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040aef0
lea eax, [ebp - 0xa0]
push 0x41c4e0
push eax
call fcn.0040aef0
push dword [esi + 0x421384]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040aef0
push 0x12010
lea eax, [ebp - 0xa0]
push 0x41c4b8
push eax
call fcn.0040bebb
add esp, 0x2c
pop edi
jmp 0x4097d5
lea eax, [ebp + 8]
lea esi, [esi + 0x421384]
push 0
push eax
push dword [esi]
call fcn.00408bc0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x40ff60
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.004047e0
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x41002b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x41002b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x40ffde
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x40ffe9
or bh, 8
and edi, 0x8000000
je 0x410004
mov eax, dword [0x4253fc]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x41002b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410400
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x41042b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x41044f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x41046a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x411112
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x411134
cmp dword [edi + 0x3c], 0
jne 0x411134
movzx eax, bx
mov dword [edi + 0x3c], eax
call fcn.0041823f
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.00411161
pop edi
pop esi
pop ebx
ret 8

Function at 0x4114ac
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x419994
call fcn.00405088
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x18], eax
call fcn.0041823f
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x4114eb
call fcn.0041823f
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x4114f9
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x411507
or eax, 0xffffffff
jmp 0x4115ef
mov ecx, esi
call fcn.00411422
mov dword [ebp - 0x14], eax
call fcn.0041229d
xor edi, edi
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
je 0x41153e
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x41153e
push edi
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x20], 1
push esi
mov dword [ebp - 4], edi
call fcn.00412251
push dword [ebp - 0x14]
call fcn.00411d9f
push ebx
push eax
push dword [ebp - 0x18]
mov ecx, esi
call fcn.004111af
cmp eax, edi
je 0x4115b1
test byte [esi + 0x24], 0x10
je 0x41157f
push 4
mov ecx, esi
pop ebx
call fcn.0041440f
test ah, 1
je 0x411577
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.00413daa
cmp dword [esi + 0x1c], edi
je 0x4115b1
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.004144c4
jmp 0x4115b1
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], edi
je 0x4115c5
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x4115de
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x4115de
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x58]
mov ecx, esi
call fcn.0041145c
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x413c58
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 0x413c9a
call fcn.0041823f
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x413c9a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x413c91
xor eax, eax
jmp 0x413ca2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00413ca8
pop edi
pop esi
pop ebx
ret 4

Function at 0x418c55
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 0x418c83
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x418ca1
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00418bbb
jmp 0x418ca1
mov eax, dword [esi + 0x14]
test eax, eax
je 0x418ca1
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00418bbb
test edi, edi
mov eax, edi
jne 0x418c8b
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401990
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x31c
xor eax, eax
push edi
mov dword [esp + 8], eax
mov ecx, 0x40
mov dword [esp + 0xc], eax
lea edi, [esp + 0x15]
mov dword [esp + 0x10], eax
mov byte [esp + 0x14], al
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x330]
lea edx, [esp + 0x14]
stosw word es:[edi], ax
push ecx
mov ecx, dword [esp + 0x32c]
stosb byte es:[edi], al
mov eax, dword [esp + 0x330]
push 0x104
push edx
push 0x40a2ac
push eax
push ecx
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x11a]
mov word [esp + 0x118], 0
rep stosd dword es:[edi], eax
lea edx, [esp + 0x118]
push 0x104
stosw word es:[edi], ax
push edx
lea eax, [esp + 0x1c]
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [esp + 4]
lea edx, [esp + 0x118]
push ecx
push edx
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov eax, dword [esp + 0x324]
mov edx, dword [esp + 4]
mov ecx, eax
pop edi
mov dword [ecx], edx
mov edx, dword [esp + 4]
mov dword [ecx + 4], edx
mov edx, dword [esp + 8]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0xc]
mov dword [ecx + 0xc], edx
add esp, 0x31c
ret

Function at 0x402870
Capabilities:
Read .ini file

Disassembly:
mov al, byte [0x4099ac]
sub esp, 0x118
test al, 0x80
jne 0x4029c5
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x4099a4], eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.00402a10
push eax
push str._sminigame.ini
lea eax, [esp + 0x20]
push 0x103
push eax
call fcn.004029d0
xor ecx, ecx
add esp, 0x10
mov dword [esp + 5], ecx
lea edx, [esp + 0x18]
mov dword [esp + 9], ecx
push edx
mov dword [esp + 0x11], ecx
lea eax, [esp + 8]
push 0x14
mov dword [esp + 0x19], ecx
push eax
push 0x40a2ac
mov word [esp + 0x25], cx
push 0x409368
push str.setting
mov byte [esp + 0x1c], 0
mov byte [esp + 0x2f], cl
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 4]
pop edi
test al, al
je 0x4029be
lea ecx, [esp]
push esi
push ecx
call dword [sym.imp.MSVCRT.dll__mbslwr]
mov esi, dword [sym.imp.MSVCRT.dll__mbsstr]
lea edx, [esp + 8]
push 0x409364
push edx
call esi
add esp, 0xc
test eax, eax
je 0x40293b
or byte [0x4099ac], 4
lea eax, [esp + 4]
push 0x409360
push eax
call esi
add esp, 8
test eax, eax
je 0x402955
or byte [0x4099ac], 0x40
lea ecx, [esp + 4]
push 0x40935c
push ecx
call esi
add esp, 8
test eax, eax
je 0x40296f
or byte [0x4099ac], 2
lea edx, [esp + 4]
push str.tv_e
push edx
call esi
add esp, 8
test eax, eax
je 0x402989
or byte [0x4099ac], 1
lea eax, [esp + 4]
push 0x409354
push eax
call esi
add esp, 8
test eax, eax
je 0x4029a3
or byte [0x4099ac], 8
lea ecx, [esp + 4]
push 0x409350
push ecx
call esi
add esp, 8
test eax, eax
pop esi
je 0x4029be
or byte [0x4099ac], 0x10
or byte [0x4099ac], 0x80
add esp, 0x118
ret
Function at 0x4035a0
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push ebx
push ebp
push esi
push edi
push 0x103
push eax
push 0x40a1a4
call dword [sym.imp.MSVCRT.dll__mbsnbcpy]
mov ebp, dword [sym.imp.MSVCRT.dll__access]
mov ebx, dword [sym.imp.MSVCRT.dll__mbschr]
add esp, 0xc
mov edi, 0x40a1a4
push 0x5c
push edi
call ebx
mov esi, eax
add esp, 8
test esi, esi
jne 0x4035e9
push 0x2f
push edi
call ebx
mov esi, eax
add esp, 8
test esi, esi
je 0x403621
push 0
push 0x40a1a4
mov byte [esi], 0
call ebp
add esp, 8
test eax, eax
je 0x40360e
push 0x40a1a4
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 4
test eax, eax
jne 0x40361a
test esi, esi
mov byte [esi], 0x5c
lea edi, [esi + 1]
je 0x403621
jmp 0x4035cd
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
Function at 0x403ba0
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x400
push edi
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 5]
mov byte [esp + 4], 0
lea edx, [esp + 4]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x40c]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x410]
push eax
push ecx
push 0x3ff
push 0x400
push edx
call dword [0x409058]
add esp, 0x14
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
add esp, 0x400
ret

Function at 0x403c00
Capabilities:
Read .ini file

Disassembly:
mov al, byte [0x40a3b8]
sub esp, 0x12c
test al, 0x80
jne 0x403df8
mov ecx, dword [esp + 0x130]
xor eax, eax
mov dword [esp + 0x15], eax
push edi
mov dword [esp + 0x1d], eax
push ecx
mov dword [esp + 0x25], eax
push 0x409554
mov dword [esp + 0x2d], eax
lea edx, [esp + 0x20]
mov word [esp + 0x31], ax
push 0x13
push edx
mov byte [esp + 0x28], 0
mov byte [esp + 0x3b], al
call fcn.004029d0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x3d]
mov byte [esp + 0x3c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
add esp, 0x10
stosb byte es:[edi], al
call fcn.00402a10
push eax
push str._sminigame.ini
lea eax, [esp + 0x34]
push 0x103
push eax
call fcn.004029d0
xor ecx, ecx
add esp, 0x10
mov dword [esp + 5], ecx
lea edx, [esp + 0x2c]
mov dword [esp + 9], ecx
push edx
mov dword [esp + 0x11], ecx
lea eax, [esp + 8]
mov dword [esp + 0x15], ecx
push 0x14
mov word [esp + 0x1d], cx
push eax
mov byte [esp + 0x23], cl
push 0x40a2ac
lea ecx, [esp + 0x28]
push 0x409368
push ecx
mov byte [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 4]
pop edi
test al, al
je 0x403d81
lea edx, [esp]
push esi
push edx
call dword [sym.imp.MSVCRT.dll__mbslwr]
mov esi, dword [sym.imp.MSVCRT.dll__mbsstr]
lea eax, [esp + 8]
push 0x409364
push eax
call esi
add esp, 0xc
test eax, eax
je 0x403cfc
or byte [0x40a3b8], 4
lea ecx, [esp + 4]
push 0x409360
push ecx
call esi
add esp, 8
test eax, eax
je 0x403d16
or byte [0x40a3b8], 0x40
lea edx, [esp + 4]
push 0x40935c
push edx
call esi
add esp, 8
test eax, eax
je 0x403d30
or byte [0x40a3b8], 2
lea eax, [esp + 4]
push str.tv_e
push eax
call esi
add esp, 8
test eax, eax
je 0x403d4a
or byte [0x40a3b8], 1
lea ecx, [esp + 4]
push 0x409354
push ecx
call esi
add esp, 8
test eax, eax
je 0x403d64
or byte [0x40a3b8], 8
lea edx, [esp + 4]
push 0x409350
push edx
call esi
add esp, 8
test eax, eax
pop esi
je 0x403d81
mov al, byte [0x40a3b8]
or al, 0x10
jmp 0x403d86
mov al, byte [0x40a3b8]
mov cl, byte [0x4099ac]
test al, 4
jne 0x403d99
test cl, 4
je 0x403d9f
or al, 4
jmp 0x403d9f
test al, 0x40
je 0x403d9f
and al, 0xfb
test al, 2
jne 0x403dac
test cl, 2
je 0x403db2
or al, 2
jmp 0x403db2
test al, 0x40
je 0x403db2
and al, 0xfd
test al, 1
jne 0x403dbf
test cl, 1
je 0x403dc5
or al, 1
jmp 0x403dc5
test al, 0x40
je 0x403dc5
and al, 0xfe
test al, 0x18
jne 0x403df1
test cl, 8
je 0x403dd0
or al, 8
test al, 0x10
jne 0x403deb
test cl, 0x10
je 0x403df1
or al, 0x10
or al, 0x80
mov byte [0x40a3b8], al
add esp, 0x12c
ret 4
test al, 0x40
je 0x403df1
and al, 0xef
or al, 0x80
mov byte [0x40a3b8], al
add esp, 0x12c
ret 4
Function at 0x4041b0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x400
push ebx
push esi
push edi
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
mov edx, dword [esp + 0x41c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x410]
lea ecx, [esp + 0xc]
push eax
mov eax, dword [esp + 0x41c]
push 0x400
push ecx
mov ecx, dword [esp + 0x420]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0xc]
xor edi, edi
xor esi, esi
lea edx, [esp + 0xc]
test al, al
lea ecx, [esp + 0xc]
je 0x404236
cmp al, 0x20
je 0x404227
cmp al, 9
je 0x404227
test edi, edi
jne 0x40422e
mov edi, 1
mov edx, ecx
jmp 0x40422e
cmp edi, 1
jne 0x40422e
mov esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x404212
mov ebx, dword [esp + 0x420]
test edx, edx
mov byte [ebx], 0
je 0x4042a5
test esi, esi
jne 0x40427f
test ebx, ebx
je 0x4042a5
mov esi, dword [esp + 0x424]
test esi, esi
jle 0x4042a5
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, esi
jae 0x4042a5
push edx
push esi
push ebx
call dword [0x40906c]
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0x400
ret 0x18
sub esi, edx
test ebx, ebx
je 0x4042a5
test esi, esi
jle 0x4042a5
mov eax, dword [esp + 0x424]
cmp eax, esi
jle 0x4042a5
push esi
push edx
push eax
push ebx
call dword [0x409068]
add esp, 0x10
mov byte [esi + ebx], 0
pop edi
pop esi
pop ebx
add esp, 0x400
ret 0x18
Function at 0x4042c0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x108
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
mov ebx, dword [esp + 0x11c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
lea eax, [esp + 0x18]
push 0x104
push eax
push 0
push str.Path
push str.Redirect
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [esp + 0x14]
lea ecx, [esp + 0x14]
test edx, edx
je 0x40432d
mov al, byte [esp + 0x14]
test al, al
je 0x40432d
cmp al, 0x20
je 0x404325
cmp al, 9
jne 0x404370
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40431d
mov esi, dword [esp + 0x120]
test esi, esi
je 0x404363
mov edx, dword [esp + 0x124]
test edx, edx
jle 0x404363
test ebx, ebx
je 0x404363
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, edx
jae 0x404363
push ebx
push edx
push esi
call dword [0x40906c]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret 0xc
lea eax, [esp + 0x14]
push 0x3a
push eax
call dword [sym.imp.MSVCRT.dll__mbschr]
add esp, 8
test eax, eax
jne 0x404436
cmp byte [esp + 0x14], 0x5c
je 0x404436
test ebx, ebx
je 0x404363
mov edi, dword [esp + 0x120]
test edi, edi
je 0x404363
mov ebp, dword [esp + 0x124]
test ebp, ebp
jle 0x404363
mov esi, dword [sym.imp.MSVCRT.dll__mbsrchr]
push 0x5c
push ebx
call esi
add esp, 8
test eax, eax
jne 0x4043c7
push 0x2f
push ebx
call esi
add esp, 8
test eax, eax
mov byte [edi], 0
je 0x4043ee
sub eax, ebx
inc eax
mov esi, eax
test esi, esi
jle 0x404419
cmp ebp, esi
jle 0x404419
push esi
push ebx
push ebp
push edi
call dword [0x409068]
add esp, 0x10
mov byte [esi + edi], 0
jmp 0x404419
mov esi, dword [esp + 0x10]
push ebp
push ebx
mov ecx, esi
call fcn.00404620
test eax, eax
je 0x40440b
push ebx
push ebp
push edi
call dword [0x40906c]
add esp, 0xc
push 0x409570
push ebp
push edi
mov ecx, esi
call fcn.004046d0
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
push ebp
push edi
call fcn.004046d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret 0xc
mov edx, dword [esp + 0x124]
mov eax, dword [esp + 0x120]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
mov ecx, esi
call fcn.004042c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret 0xc
Function at 0x404b60
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x110
mov ecx, dword [esp + 0x114]
lea eax, [esp]
push ebp
mov ebp, dword [esp + 0x11c]
push esi
push edi
push eax
push 0xf003f
push 0
push ebp
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404c18
lea edx, [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push edx
mov edx, dword [esp + 0x10]
push eax
push eax
push eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x2c]
push eax
push ecx
push 0
push edx
mov dword [esp + 0x30], pe_nt_image_headers32
call edi
test eax, eax
jne 0x404bfe
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.00404b60
mov esi, eax
add esp, 8
test esi, esi
jne 0x404c22
lea edx, [esp + 0x14]
lea ecx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x10]
push eax
push eax
push eax
lea eax, [esp + 0x20]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x30], pe_nt_image_headers32
call edi
test eax, eax
je 0x404bc0
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x120]
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
pop ebp
add esp, 0x110
ret
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 0x110
ret

Function at 0x404c40
Capabilities:
Set registry value

Disassembly:
sub esp, 0x404
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 4]
push esi
push edi
mov edi, dword [esp + 0x410]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x414]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test edx, edx
rep movsb byte es:[edi], byte [esi]
je 0x404cd6
mov edi, 0x409570
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
lea ebx, [esp + 0x14]
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
lea ebx, [esp + 0x14]
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
pop ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
pop ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 8]
push 0
push eax
push 0
push 0xf003f
push 0
push 0
lea ecx, [esp + 0x24]
push 0
push ecx
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x404d09
pop edi
xor eax, eax
pop esi
add esp, 0x404
ret
mov edx, dword [esp + 0x418]
test edx, edx
je 0x404d30
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
mov edx, dword [esp + 0x10]
push 1
push eax
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
add esp, 0x404
ret