joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401350
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x24
mov eax, dword [0x410070]
push esi
mov esi, dword [esp + 0x34]
push str.__Install
push esi
mov dword [esp + 0x2c], eax
call fcn.0040ab6e
add esp, 8
test eax, eax
je 0x40149c
push str.__Uninstall
push esi
call fcn.0040ab6e
add esp, 8
test eax, eax
jne 0x4013b6
lea ecx, [esp + 4]
call fcn.00401710
lea ecx, [esp + 4]
call fcn.00402a50
lea ecx, [esp + 4]
call fcn.00401720
xor eax, eax
pop esi
mov ecx, dword [esp + 0x20]
call fcn.0040333a
add esp, 0x24
ret 0x10
push edi
push str.__Update
push esi
call fcn.0040ab6e
add esp, 8
test eax, eax
jne 0x40149b
push str.23FFC125_11C9_4a25_9227_485D63C3A530
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40140b
test edi, edi
je 0x40149b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x20]
call fcn.0040333a
add esp, 0x24
ret 0x10
lea eax, [esp + 0x38]
push eax
push str.LastUpdate
push 0x40d600
push 0x80000002
mov dword [esp + 0x48], 0
call fcn.00401110
push 0
call fcn.004032d0
add esp, 0x14
lea ecx, [esp + 8]
mov esi, eax
call fcn.00401710
mov eax, dword [esp + 0x38]
cmp esi, eax
jl 0x401453
sub esi, eax
cmp esi, 0x15180
jle 0x40147e
lea ecx, [esp + 8]
call fcn.00402d10
test eax, eax
jne 0x40147e
push eax
call fcn.004032d0
push eax
push str.LastUpdate
push 0x40d600
push 0x80000002
call fcn.00401210
add esp, 0x14
lea ecx, [esp + 8]
call fcn.004027d0
test edi, edi
je 0x401492
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 8]
call fcn.00401720
pop edi
mov ecx, dword [esp + 0x24]
xor eax, eax
pop esi
call fcn.0040333a
add esp, 0x24
ret 0x10
Function at 0x4014b0
Capabilities:
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4cc
mov eax, dword [0x410070]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov dword [esp + 0x4d4], eax
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x9c
call esi
test eax, eax
jne 0x401508
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x14], 0x94
call esi
test eax, eax
je 0x4016ef
mov eax, dword [esp + 0x20]
dec eax
je 0x40152b
dec eax
jne 0x4016d7
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push 5
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
jmp 0x4016a8
push 0x104
lea eax, [esp + 0x1bc]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jle 0x4016ef
cmp eax, 0xc8
jg 0x4016ef
mov cl, byte [esp + eax + 0x1b7]
lea edi, [esp + 0x1b8]
dec edi
cmp cl, 0x5c
jne 0x401588
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401565
mov ecx, dword [str.wininit.ini]
mov edx, dword [0x40d69c]
mov eax, dword [0x40d6a0]
mov dword [edi], ecx
mov dword [edi + 4], edx
mov dword [edi + 8], eax
jmp 0x4015b2
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401588
mov ecx, dword [0x40d688]
mov edx, dword [0x40d68c]
mov eax, dword [0x40d690]
mov dword [edi], ecx
mov cl, byte [0x40d694]
mov dword [edi + 4], edx
mov dword [edi + 8], eax
mov byte [edi + 0xc], cl
mov esi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
xor eax, eax
test esi, esi
mov ecx, 0x41
lea edi, [esp + 0x3c8]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0xb0]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x2c0]
rep stosd dword es:[edi], eax
je 0x401618
mov edi, dword [ebp + 8]
push 0x104
lea edx, [esp + 0xb4]
push edx
push edi
call ebx
test eax, eax
jne 0x401618
push 0x104
lea eax, [esp + 0xb4]
push edi
push eax
call fcn.004033a0
add esp, 0xc
push 0x104
lea ecx, [esp + 0x2c4]
push ecx
push esi
call ebx
test eax, eax
jne 0x401642
push 0x104
lea edx, [esp + 0x2c4]
push esi
push edx
call fcn.004033a0
add esp, 0xc
test esi, esi
lea ecx, [esp + 0x3c8]
jne 0x40166a
lea eax, [esp + 0xb0]
push eax
push str.NUL_s_n
push 0x104
push ecx
call fcn.00403348
add esp, 0x10
jmp 0x40168d
lea edx, [esp + 0xb0]
push edx
lea eax, [esp + 0x2c4]
push eax
push str._s_s_n
push 0x104
push ecx
call fcn.00403348
add esp, 0x14
lea edx, [esp + 0x1b8]
push edx
lea eax, [esp + 0x3cc]
push eax
push str.rename
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionA]
test eax, eax
jne 0x4016d7
push eax
push eax
lea ecx, [esp + 0x14]
push ecx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 1
mov ecx, dword [esp + 0x4d4]
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x4d4]
xor eax, eax
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401730
Capabilities:
Get file version info

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
lea eax, [esp + 8]
push eax
push edi
mov dword [esp + 0xc], 0
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [esp + 0x10], eax
jne 0x40175d
or eax, 0xffffffff
pop edi
add esp, 8
ret 0xc
push esi
push eax
call fcn.004034c9
mov esi, eax
add esp, 4
test esi, esi
je 0x401788
mov ecx, dword [esp + 0x14]
push esi
push ecx
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x401793
push esi
call fcn.004034c4
add esp, 4
pop esi
or eax, 0xffffffff
pop edi
add esp, 8
ret 0xc
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0xc]
push eax
push 0x40d6a4
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x40177f
mov eax, dword [esp + 0x18]
test eax, eax
mov ecx, dword [esp + 8]
push ebx
je 0x4017ce
mov ebx, dword [ecx + 0x14]
mov edi, dword [ecx + 0x10]
push ebp
xor edx, edx
xor ebp, ebp
or edx, ebx
or edi, ebp
mov dword [eax], edx
mov dword [eax + 4], edi
pop ebp
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4017e9
mov edi, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
xor edx, edx
xor ebx, ebx
or edx, ecx
or edi, ebx
mov dword [eax], edx
mov dword [eax + 4], edi
push esi
call fcn.004034c4
add esp, 4
pop ebx
pop esi
xor eax, eax
pop edi
add esp, 8
ret 0xc

Function at 0x401860
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x108
mov eax, dword [0x410070]
push ebx
push esi
mov dword [esp + 0x10c], eax
mov eax, dword [esp + 0x114]
push edi
push eax
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0xc]
push 0x5c
push edx
call fcn.004034ce
inc eax
push 0x5c
push eax
call fcn.004034ce
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4018e3
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0xc]
push eax
mov byte [esi], 0
call edi
cmp eax, 0xffffffff
jne 0x4018ce
push 0
lea ecx, [esp + 0x10]
push ecx
call ebx
test eax, eax
je 0x4018fb
mov byte [esi], 0x5c
push 0x5c
inc esi
push esi
call fcn.004034ce
mov esi, eax
add esp, 8
test esi, esi
jne 0x4018b2
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x104]
call fcn.0040333a
add esp, 0x108
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x110]
pop edi
pop esi
pop ebx
call fcn.0040333a
add esp, 0x108
ret
Function at 0x4021e0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x124
mov eax, dword [0x410070]
mov dword [esp + 0x120], eax
push ebx
xor eax, eax
push esi
mov esi, ecx
mov dword [ecx], eax
mov dword [ecx + 4], eax
push edi
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
push 0x1e
mov dword [ecx + 0x10], eax
push esi
mov dword [ecx + 0x14], eax
push 0x40d7b4
mov dword [ecx + 0x18], eax
push 0x40d600
push 0x80000002
mov dword [ecx + 0x1c], eax
call fcn.00401180
add esp, 0x14
test eax, eax
je 0x40238b
xor ebx, ebx
mov byte [esp + 0x20], bl
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x21]
rep stosd dword es:[edi], eax
push 0x104
lea edx, [esp + 0x24]
stosw word es:[edi], ax
push edx
push ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402318
lea eax, [esp + 0x20]
push 0x5c
push eax
call fcn.004039a0
add esp, 8
cmp eax, ebx
je 0x402318
push str.BaiduX.exe
lea ecx, [esp + 0x24]
push ecx
mov byte [eax + 1], bl
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x402318
inc eax
push eax
call fcn.004034c9
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x4022e1
push ebx
mov byte [esi], bl
call fcn.004034c4
add esp, 4
or eax, 0xffffffff
mov ecx, dword [esp + 0x12c]
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x10]
push edi
push ecx
push ebx
lea edx, [esp + 0x2c]
push edx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x402356
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0x40d6a4
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x402330
push edi
call fcn.004034c4
add esp, 4
mov byte [esi], bl
or eax, 0xffffffff
mov ecx, dword [esp + 0x12c]
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0xc]
lea edx, [esp + 0x18]
push edx
mov edx, dword [eax + 8]
push esi
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x28], 0x20
call fcn.00402140
cmp eax, 0xffffffff
jne 0x402377
push edi
mov byte [esi], bl
call fcn.004034c4
add esp, 4
or eax, 0xffffffff
mov ecx, dword [esp + 0x12c]
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push str.The_product_version_is__s_n
call fcn.00401720
push edi
call fcn.004034c4
add esp, 0xc
mov ecx, dword [esp + 0x12c]
xor eax, eax
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4027d0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe24
mov eax, dword [0x410070]
push ebx
push esi
push edi
mov dword [esp + 0xe2c], eax
push 0x104
lea eax, [esp + 0x124]
push eax
push 0
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402a38
lea ecx, [esp + 0x120]
push 0x5c
push ecx
call fcn.004039a0
add esp, 8
test eax, eax
je 0x40284d
push 0x103
lea edx, [esp + 0x124]
mov byte [eax], 0
push edx
lea eax, [esp + 0x20]
push eax
call fcn.004033a0
add esp, 0xc
push 0x40d834
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea edx, [esp + 0x18]
push edx
push 0x7ff
lea eax, [esp + 0x630]
push eax
push str.file
mov byte [esp + 0x638], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
mov edi, eax
test edi, edi
je 0x402a38
cmp edi, 0x7ff
ja 0x402a38
mov byte [esp + edi + 0x628], 0
mov al, byte [esp + 0x628]
test al, al
mov dword [esp + 0x10], 0
lea esi, [esp + 0x628]
je 0x4028f0
lea ebx, [ebx]
mov ecx, esi
lea edx, [esp + 0x628]
sub ecx, edx
cmp ecx, edi
jge 0x4028f0
lea eax, [esp + 0x18]
push eax
push esi
mov ecx, ebx
call fcn.004023a0
test eax, eax
je 0x4028d8
mov dword [esp + 0x10], 1
cmp byte [esi], 0
je 0x4028e8
lea ecx, [ecx]
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4028e0
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4028b0
mov eax, dword [str.QueryURL]
test eax, eax
je 0x4029bb
mov esi, 0x41005c
mov ebx, esi
jmp 0x402910
xor eax, eax
mov byte [esp + 0x228], 0
mov ecx, 0xff
lea edi, [esp + 0x229]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
push 0x400
stosw word es:[edi], ax
lea edx, [esp + 0x230]
push edx
stosb byte es:[edi], al
mov eax, dword [esi]
push 0x40d781
push eax
push 0x40d828
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jbe 0x4029ab
cmp eax, 0x400
jae 0x4029ab
lea eax, [esp + 0x228]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402965
sub eax, edx
mov dword [esp + 0x14], eax
je 0x4029ab
mov edx, dword [esi]
lea ecx, [esp + 0x228]
push ecx
push edx
push 0x40d600
push 0x80000001
call fcn.00401260
mov ecx, dword [esi]
lea eax, [esp + 0x238]
push eax
push ecx
push 0x40d600
push 0x80000002
call fcn.00401260
add esp, 0x20
mov eax, dword [ebx + 4]
add ebx, 4
test eax, eax
mov esi, ebx
jne 0x402910
mov eax, dword [str.NOTCP]
test eax, eax
je 0x402a21
mov edi, 0x410040
mov ebx, edi
jmp 0x4029d0
mov eax, dword [edi]
lea edx, [esp + 0x18]
push edx
push 0xffffffffffffffff
push eax
push str.REG_DWORD
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402a15
mov ecx, dword [edi]
push esi
push ecx
push 0x40d600
push 0x80000001
call fcn.00401210
mov edx, dword [edi]
push esi
push edx
push 0x40d600
push 0x80000002
call fcn.00401210
add esp, 0x20
mov eax, dword [ebx + 4]
add ebx, 4
test eax, eax
mov edi, ebx
jne 0x4029d0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xe2c]
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xe2c]
or eax, 0xffffffff
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402a50
Capabilities:
Delete file
Download url
Receive data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x51c
mov eax, dword [0x410070]
push ebx
mov dword [esp + 0x51c], eax
push esi
push edi
xor eax, eax
mov esi, ecx
xor ebx, ebx
mov byte [esp + 0x120], bl
mov ecx, 0xff
lea edi, [esp + 0x121]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x18], bl
mov ecx, 0x40
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push eax
push str.UninstallFlag
push 0x40d600
push 0x80000002
mov dword [esp + 0x1c], ebx
call fcn.00401110
add esp, 0x10
test eax, eax
jne 0x402add
cmp dword [esp + 0xc], 1
jne 0x402add
xor eax, eax
mov ecx, dword [esp + 0x524]
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push str.UninstallFlag
push 0x40d600
push 0x80000002
call fcn.00401210
add esp, 0x10
push 0x104
lea ecx, [esp + 0x1c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x18]
push 0x5c
push edx
call fcn.004039a0
add esp, 8
cmp eax, ebx
jne 0x402b30
or eax, 0xffffffff
mov ecx, dword [esp + 0x524]
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edi, [esp + 0x18]
mov byte [eax + 1], bl
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x402b38
mov eax, dword [str.update.ini]
mov ecx, dword [0x40d898]
mov dx, word [0x40d89c]
mov dword [edi], eax
mov al, byte [0x40d89e]
mov dword [edi + 4], ecx
mov word [edi + 8], dx
lea edx, [esp + 0x10]
push edx
push str.ID.Data2
xor ecx, ecx
mov dword [esp + 0x18], ecx
push 0x40d600
push 0x80000002
mov byte [edi + 0xa], al
mov dword [esp + 0x24], ecx
call fcn.004012e0
add esp, 0x10
mov ecx, esi
call fcn.004021e0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push esi
push eax
push ecx
push str.http:__x.baidu.com_update_update.ini
push str._s_uid_I64uuninstall1ver_s
lea edx, [esp + 0x134]
push 0x400
push edx
call fcn.00403348
add esp, 0x1c
lea eax, [esp + 0x120]
push eax
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntry]
push ebx
push ebx
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x12c]
push edx
push ebx
call sub.urlmon.dll_URLDownloadToFileA
mov esi, eax
lea eax, [esp + 0x18]
neg esi
push eax
sbb esi, esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x524]
mov eax, esi
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402c10
Capabilities:
Download url
Receive data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x414
mov eax, dword [0x410070]
push ebx
push esi
push edi
mov dword [esp + 0x41c], eax
mov ebx, ecx
xor eax, eax
mov byte [esp + 0x18], 0
mov ecx, 0xff
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
lea ebx, [ebx]
lea eax, [esp + 0x10]
push eax
push str.ID.Data2
push 0x40d600
push 0x80000002
call fcn.004012e0
add esp, 0x10
test eax, eax
je 0x402c95
push 0x2710
call edi
inc esi
cmp esi, 5
jl 0x402c50
or eax, 0xffffffff
mov ecx, dword [esp + 0x41c]
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, ebx
call fcn.004021e0
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp + 0xc]
mov edx, dword [esp + 0x10]
push ebx
push ecx
push edx
cmp eax, 1
push str.http:__x.baidu.com_update_update.ini
lea eax, [esp + 0x28]
jne 0x402cbf
push str._s_uid_I64uiflag1ver_s
jmp 0x402cc4
push str._s_uid_I64uver_s
push 0x400
push eax
call fcn.00403348
add esp, 0x1c
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntry]
mov edx, dword [ebp + 8]
push 0
push 0
push edx
lea eax, [esp + 0x24]
push eax
push 0
call sub.urlmon.dll_URLDownloadToFileA
mov ecx, dword [esp + 0x41c]
neg eax
sbb eax, eax
call fcn.0040333a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x402d10
Capabilities:
Read .ini file

Disassembly:
sub esp, 0xa14
mov eax, dword [0x410070]
push ebx
push edi
mov dword [esp + 0xa18], eax
push 0x104
lea eax, [esp + 0x118]
push eax
mov edi, ecx
xor ebx, ebx
push ebx
mov dword [esp + 0x18], edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402f18
lea ecx, [esp + 0x114]
push 0x5c
push ecx
call fcn.004039a0
add esp, 8
cmp eax, ebx
je 0x402d8a
push 0x103
lea edx, [esp + 0x118]
mov byte [eax], bl
push edx
lea eax, [esp + 0x18]
push eax
call fcn.004033a0
add esp, 0xc
push 0x40d834
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push esi
lea edx, [esp + 0xc]
push edx
push str.iflag
push 0x40d600
push 0x80000002
mov dword [esp + 0x1c], ebx
call fcn.00401110
mov eax, dword [esp + 0x1c]
mov esi, 1
add esp, 0x10
cmp eax, esi
je 0x402e00
push esi
lea eax, [esp + 0x18]
push eax
mov ecx, edi
call fcn.00402c10
test eax, eax
je 0x402de2
pop esi
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0xa10]
call fcn.0040333a
add esp, 0xa14
ret
push esi
push str.iflag
push 0x40d600
push 0x80000002
mov dword [esp + 0x1c], esi
call fcn.00401210
add esp, 0x10
jmp 0x402e11
push ebx
lea ecx, [esp + 0x18]
push ecx
mov ecx, edi
call fcn.00402c10
test eax, eax
jne 0x402dc9
lea edx, [esp + 0x14]
push edx
push 0x7ff
lea eax, [esp + 0x224]
push eax
push str.file
mov byte [esp + 0x22c], bl
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
mov edi, eax
cmp edi, ebx
je 0x402dc9
cmp edi, 0x7ff
ja 0x402dc9
mov byte [esp + edi + 0x21c], bl
mov al, byte [esp + 0x21c]
push ebp
xor ebp, ebp
cmp al, bl
lea esi, [esp + 0x220]
je 0x402ea0
nop
mov ecx, esi
lea edx, [esp + 0x220]
sub ecx, edx
cmp ecx, edi
jge 0x402ea0
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00401a80
test eax, eax
je 0x402e87
mov ebp, 1
cmp byte [esi], bl
je 0x402e98
jmp 0x402e90
mov al, byte [esi + 1]
inc esi
cmp al, bl
jne 0x402e90
mov al, byte [esi + 1]
inc esi
cmp al, bl
jne 0x402e60
lea ecx, [esp + 0x18]
push ecx
push 0x7ff
lea edx, [esp + 0x228]
push edx
push 0x40d781
push 0x40d7b4
push str.version
mov byte [esp + 0x238], bl
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp eax, ebx
jbe 0x402eff
cmp eax, 0x800
jae 0x402eff
mov byte [esp + eax + 0x220], bl
lea eax, [esp + 0x220]
push eax
push 0x40d7b4
push 0x40d600
push 0x80000002
call fcn.00401260
add esp, 0x10
mov eax, ebp
pop ebp
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0xa10]
call fcn.0040333a
add esp, 0xa14
ret
mov ecx, dword [esp + 0xa18]
pop edi
or eax, 0xffffffff
pop ebx
call fcn.0040333a
add esp, 0xa14
ret

Function at 0x40394b
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40396b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004047d1
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x40398e
test byte [esp + 8], 2
je 0x40398e
call fcn.004047bf
mov dword [eax], 0xd
call fcn.004047c8
mov dword [eax], 5
jmp 0x403967
xor eax, eax
ret
Function at 0x403a6e
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40d918
call fcn.00404a0c
mov edi, 0x94
mov eax, edi
call fcn.00403280
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x410c30], ecx
mov eax, dword [esi + 4]
mov dword [0x410c3c], eax
mov edx, dword [esi + 8]
mov dword [0x410c40], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x410c34], esi
cmp ecx, 2
je 0x403ace
or esi, 0x8000
mov dword [0x410c34], esi
shl eax, 8
add eax, edx
mov dword [0x410c38], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x403b09
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x403b09
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x403b21
cmp eax, 0x20b
je 0x403b0e
mov dword [ebp - 0x1c], esi
jmp 0x403b35
cmp dword [ecx + 0x84], 0xe
jbe 0x403b09
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x403b2f
cmp dword [ecx + 0x74], 0xe
jbe 0x403b09
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.004071ed
pop ecx
test eax, eax
jne 0x403b49
push 0x1c
call fcn.00403a4a
pop ecx
call fcn.00405f76
test eax, eax
jne 0x403b5a
push 0x10
call fcn.00403a4a
pop ecx
call fcn.0040714b
mov dword [ebp - 4], esi
call fcn.00404247
test eax, eax
jge 0x403b73
push 0x1b
call fcn.00403a25
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x412460], eax
call fcn.00407029
mov dword [0x410c20], eax
call fcn.00406f87
test eax, eax
jge 0x403b99
push 8
call fcn.00403a25
pop ecx
call fcn.00406d54
test eax, eax
jge 0x403baa
push 9
call fcn.00403a25
pop ecx
push 1
call fcn.0040489e
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x403bc0
push eax
call fcn.00403a25
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00406cf7
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x403be1
movzx eax, word [ebp - 0x40]
jmp 0x403be4
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401350
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x403c02
push edi
call fcn.004049cb
call fcn.004049ed
jmp 0x403c34
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00404a47
ret
Function at 0x403d61
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00403280
mov eax, dword [0x410070]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.00404128
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1008], eax
je 0x403e94
push 2
push esi
push dword [ebp + 8]
call fcn.00404128
add esp, 0xc
cmp eax, ebx
je 0x403e94
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x403e34
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00407530
push 0x8000
push dword [ebp + 8]
call fcn.004074b7
add esp, 0x14
mov dword [ebp - 0x100c], eax
cmp edi, ebx
mov eax, ebx
jge 0x403dea
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call fcn.0040723e
add esp, 0xc
cmp eax, 0xffffffff
je 0x403e0a
sub edi, eax
test edi, edi
jg 0x403de2
jmp 0x403e22
call fcn.004047c8
cmp dword [eax], 5
jne 0x403e1f
call fcn.004047bf
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0x100c]
push dword [ebp + 8]
call fcn.004074b7
pop ecx
pop ecx
jmp 0x403e7c
jge 0x403e7c
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00404128
push dword [ebp + 8]
call fcn.00404540
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x403e7c
call fcn.004047bf
mov dword [eax], 0xd
call fcn.004047c8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0x1008]
push dword [ebp + 8]
call fcn.00404128
add esp, 0xc
mov eax, esi
pop edi
jmp 0x403e96
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0040333a
leave
ret