joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46dc10
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a60e0
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4d7590]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov eax, dword [ebp + 8]
xor edi, edi
xor ebx, ebx
push eax
lea ecx, [ebp + 8]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], edi
call fcn.0040be92
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x14]
push edx
lea ecx, [esi + 4]
mov byte [ebp - 4], 1
call fcn.00452990
mov esi, dword [ebp + 8]
mov byte [ebp - 4], 3
cmp esi, edi
je 0x46dcad
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, edi
jne 0x46dcaa
cmp esi, edi
je 0x46dcaa
mov eax, dword [esi]
cmp eax, edi
je 0x46dc91
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, edi
je 0x46dca1
push eax
call fcn.00418636
add esp, 4
push esi
call fcn.00418636
add esp, 4
mov dword [ebp + 8], edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
je 0x46dcb8
mov eax, dword [eax]
jmp 0x46dcba
xor eax, eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46dcdf
mov eax, dword [ebp - 0x14]
cmp eax, edi
je 0x46dcd0
mov eax, dword [eax]
jmp 0x46dcd2
xor eax, eax
mov ecx, dword [ebp + 0xc]
push edi
push eax
call fcn.0045e320
movzx ebx, al
mov esi, dword [ebp - 0x14]
cmp esi, edi
je 0x46dd29
lea ecx, [esi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x46dd29
cmp esi, edi
je 0x46dd29
mov eax, dword [esi]
cmp eax, edi
je 0x46dd05
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, edi
je 0x46dd15
push eax
call fcn.00418636
add esp, 4
push esi
call fcn.00418636
add esp, 4
jmp 0x46dd29
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4791c0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4a6bbf
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4d7590]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x10], esi
call fcn.0041e328
lea edi, [esi + 0x54]
xor ebx, ebx
mov ecx, edi
mov dword [esp + 0x2c], ebx
mov dword [esi], vtable.FCDrawTextEx.0
call fcn.0041e328
mov dword [edi], vtable.CRichEditCtrl.0
mov byte [esp + 0x2c], 1
call fcn.0041a7e3
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x47922c
push 0x80004005
call fcn.00401027
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0xa8], eax
mov dword [esi + 0xac], ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
mov byte [esp + 0x60], 3
mov dword [esi + 0xb0], 0xffffffff
call fcn.0042207b
push eax
push ebx
mov ecx, esi
call fcn.00421410
push 0x4d2
push esi
lea ecx, [esp + 0x1c]
push ecx
push 0x40000004
push 0x20
mov ecx, edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.00425609
mov eax, esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x20
ret
Function at 0x488430
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov ecx, dword [esi]
mov edx, ecx
xor edx, eax
shr ecx, 8
and edx, 0xff
mov edx, dword [edi + edx*4]
xor edx, ecx
movzx ecx, dl
add ecx, dword [esi + 4]
mov dword [esi], edx
mov edx, dword [esi + 8]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
shr edx, 8
xor edx, dword [edi + ecx*4]
mov dword [esi + 8], edx
ret
Function at 0x48e6b0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x10
push ebx
mov bl, byte [edx + 8]
cmp bl, 3
je 0x48e85a
mov ecx, dword [esp + 0x20]
push ebp
mov ebp, dword [edx]
push esi
xor esi, esi
push edi
mov dword [esp + 0x24], esi
test bl, 2
je 0x48e708
movzx eax, byte [edx + 9]
movzx esi, byte [ecx]
mov edi, eax
sub edi, esi
movzx esi, byte [ecx + 1]
mov dword [esp + 0x10], edi
mov edi, eax
sub edi, esi
movzx esi, byte [ecx + 2]
sub eax, esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov edi, 3
jmp 0x48e71b
movzx eax, byte [ecx + 3]
movzx edi, byte [edx + 9]
sub edi, eax
mov dword [esp + 0x10], edi
mov edi, 1
test bl, 4
je 0x48e72f
movzx ecx, byte [ecx + 4]
movzx eax, byte [edx + 9]
sub eax, ecx
mov dword [esp + edi*4 + 0x10], eax
inc edi
xor ecx, ecx
xor eax, eax
cmp edi, ecx
jle case.0x48e776.3
jmp 0x48e740
cmp dword [esp + eax*4 + 0x10], ecx
jg 0x48e74c
mov dword [esp + eax*4 + 0x10], ecx
jmp 0x48e751
mov esi, 1
inc eax
cmp eax, edi
jl 0x48e740
cmp si, cx
je case.0x48e776.3
movzx eax, byte [edx + 9]
add eax, 0xfffffffe
cmp eax, 0xe
ja case.0x48e776.3
movzx eax, byte [eax + 0x48e874]
jmp dword [eax*4 + 0x48e860]
mov edx, dword [edx + 4]
mov eax, dword [esp + 0x28]
cmp edx, ecx
jbe case.0x48e776.3
lea esp, [esp]
mov cl, byte [eax]
shr cl, 1
and cl, 0x55
mov byte [eax], cl
inc eax
sub edx, 1
jne 0x48e790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov edi, dword [edx + 4]
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x28]
mov ecx, edx
mov eax, 0xf0
sar eax, cl
mov ebx, 0xf
sar ebx, cl
and al, 0xf0
or al, bl
test edi, edi
jbe case.0x48e776.3
mov edi, edi
mov bl, byte [esi]
mov cl, dl
shr bl, cl
inc esi
and bl, al
sub edi, 1
mov byte [esi - 1], bl
jne 0x48e7d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov esi, dword [esp + 0x28]
imul ebp, edi
xor ebx, ebx
test ebp, ebp
jbe case.0x48e776.3
mov eax, ebx
xor edx, edx
div edi
inc ebx
inc esi
mov cl, byte [esp + edx*4 + 0x10]
shr byte [esi - 1], cl
cmp ebx, ebp
jb 0x48e7f6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov esi, dword [esp + 0x28]
imul ebp, edi
xor ebx, ebx
test ebp, ebp
jbe case.0x48e776.3
mov edi, edi
xor edx, edx
mov eax, ebx
div edi
movzx ax, byte [esi]
mov ecx, 0x100
imul ax, cx
movzx ecx, byte [esi + 1]
add ax, cx
inc esi
inc ebx
inc esi
movzx ecx, word [esp + edx*4 + 0x10]
shr ax, cl
movzx eax, ax
mov edx, eax
shr edx, 8
mov byte [esi - 2], dl
mov byte [esi - 1], al
cmp ebx, ebp
jb 0x48e820
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x494420
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4a7f18
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4d7590]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4d7590]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov esi, dword [esp + 0x44]
xor ebp, ebp
mov ebx, ecx
cmp esi, ebp
jne 0x49446f
push ebp
push ebp
push ebp
push 2
call fcn.00496520
xor al, al
jmp 0x494607
call fcn.00493230
push 2
or eax, 0xffffffff
push ebp
push esi
mov dword [ebx + 8], eax
mov dword [ebx + 4], eax
call fcn.0049c0a3
push esi
call fcn.0049bfab
push ebp
push ebp
push esi
mov edi, eax
call fcn.0049c0a3
add esp, 0x1c
cmp edi, ebp
jg 0x4944c0
cmp byte [esp + 0x48], 0
je 0x4944ad
push esi
call fcn.0043735e
add esp, 4
push ebp
push ebp
push ebp
push 0xd
mov ecx, ebx
call fcn.00496520
xor al, al
jmp 0x494607
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], ebp
mov byte [esp + 0x18], 0
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x40], ebp
call fcn.00493ca0
lea eax, [edi + 1]
push eax
call fcn.0041862b
push esi
push 1
mov ebp, eax
push edi
push ebp
mov byte [ebp], 0
call fcn.0049bdf1
add esp, 0x14
cmp eax, 1
je 0x494543
cmp byte [esp + 0x48], 0
je 0x494510
push esi
call fcn.0043735e
add esp, 4
push ebp
call fcn.00418636
add esp, 4
push 0
push 0
push 0
push 2
mov ecx, ebx
call fcn.00496520
cmp dword [esp + 0x2c], 0x10
jb 0x49453c
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00418636
add esp, 4
xor al, al
jmp 0x494607
cmp byte [esp + 0x48], 0
je 0x494553
push esi
call fcn.0043735e
add esp, 4
mov byte [edi + ebp], 0
cmp byte [ebp], 0
mov eax, ebp
mov esi, ebp
je 0x4945b5
mov cl, byte [esi]
cmp cl, 0xa
jne 0x49457d
mov edx, esi
sub edx, eax
inc edx
push edx
push eax
lea ecx, [esp + 0x1c]
call fcn.00494100
inc esi
mov eax, esi
jmp 0x4945b0
cmp cl, 0xd
jne 0x4945af
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x494595
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00494100
push 0xa
push 1
lea ecx, [esp + 0x1c]
call fcn.00493df0
cmp byte [esi + 1], 0xa
jne 0x494578
add esi, 2
mov eax, esi
jmp 0x4945b0
inc esi
cmp byte [esi], 0
jne 0x494561
sub esi, eax
je 0x4945c4
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.00494100
push ebp
call fcn.00418636
mov eax, dword [esp + 0x1c]
add esp, 4
cmp dword [esp + 0x2c], 0x10
jae 0x4945dc
lea eax, [esp + 0x18]
mov ecx, dword [esp + 0x4c]
mov edx, dword [ebx]
mov edx, dword [edx + 8]
push ecx
push 0
push eax
mov ecx, ebx
call edx
cmp byte [ebx + 0x44], 0
lea ecx, [esp + 0x14]
je 0x494600
call fcn.0040247f
xor al, al
jmp 0x494607
call fcn.0040247f
mov al, 1
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.00436eab
add esp, 0x2c
ret 0xc
Function at 0x4978c0
Capabilities:
Create process on windows
Initialize iwebbrowser2

Disassembly:
push ebp
lea ebp, [esp - 0x804]
sub esp, 0x804
push 0xfffffffffffffffe
push 0x4d1a18
push 0x43c120
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4d7590]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x800], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, dword [ebp + 0x80c]
xor eax, eax
mov word [ebp], ax
push 0x7fe
xor edi, edi
push edi
lea ecx, [ebp + 2]
push ecx
call fcn.00436ec0
push esi
push str.__s_
push 0x800
lea edx, [ebp]
push edx
call fcn.00497850
add esp, 0x1c
push 5
push edi
lea eax, [ebp]
push eax
push str.Explorer
push 0x4a9da0
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jg 0x497a1f
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
lea ecx, [ebp - 0x1c]
push ecx
push 0x4c1668
push 0x15
push edi
push 0x4c1678
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x497a2f
mov eax, dword [ebp - 0x1c]
cmp eax, edi
je 0x497a18
mov dword [ebp - 0x20], edi
mov edx, dword [eax]
lea ecx, [ebp - 0x20]
push ecx
push eax
mov edx, dword [edx + 0x94]
call edx
mov eax, dword [ebp - 0x20]
cmp eax, edi
je 0x4979b5
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 3
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, esi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4979c0
sub eax, edx
sar eax, 1
je 0x497a0d
xor ecx, ecx
mov word [ebp - 0x30], cx
mov edx, 8
mov word [ebp - 0x44], dx
push esi
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
lea edx, [ebp - 0x30]
push edx
push edx
push edx
push edx
lea edx, [ebp - 0x44]
push edx
push eax
mov eax, dword [ecx + 0xd0]
call eax
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [ebp - 4], 0xfffffffe
mov eax, 1
jmp 0x497a38
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x800]
xor ecx, ebp
call fcn.00436eab
add ebp, 0x804
mov esp, ebp
pop ebp
ret
Function at 0x499530
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x1004
call fcn.00437a10
mov eax, dword [0x4d7590]
xor eax, esp
mov dword [esp + 0x1000], eax
push esi
mov esi, dword [esp + 0x1010]
push edi
mov edi, dword [esp + 0x1010]
push 0x1000
lea eax, [esp + 0xc]
push 0
push eax
call fcn.00436ec0
push 0x800
lea ecx, [esp + 0x18]
push 0x4bd9c0
push ecx
call fcn.0043729d
push 0x800
lea edx, [esp + 0x24]
push esi
push edx
call fcn.004378d4
push 0x800
lea eax, [esp + 0x30]
push 0x4bd994
push eax
call fcn.004378d4
push 0x800
lea ecx, [esp + 0x3c]
push esi
push ecx
call fcn.004378d4
push 0x800
lea edx, [esp + 0x48]
push str.vL
push edx
call fcn.004378d4
add esp, 0x48
push 0x800
lea eax, [esp + 0xc]
push edi
push eax
call fcn.004378d4
push 0x800
lea ecx, [esp + 0x18]
push 0x4bd954
push ecx
call fcn.004378d4
add esp, 0x18
push 0x14
push esi
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
cmp eax, 6
jne 0x499623
push 5
push 0
push 0
push str.http:__down.360safe.com_setup.exe
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0
call fcn.0043bc24
int3

Function at 0x499630
Capabilities:
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x140
mov eax, dword [0x4d7590]
xor eax, esp
mov dword [esp + 0x13c], eax
mov eax, dword [esp + 0x144]
push ebx
push esi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x499682
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x13c]
xor ecx, esp
call fcn.00436eab
add esp, 0x140
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [esp + 0x10]
push eax
push 0x40
lea ecx, [esp + 0x114]
push ecx
push esi
call edi
test eax, eax
je 0x49970b
cmp dword [esp + 0xc], 0x40
jne 0x49970b
mov edx, 0x5a4d
cmp word [esp + 0x108], dx
jne 0x49970b
mov eax, dword [esp + 0x144]
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [esp + 0x144]
jne 0x49970b
push 0
lea ecx, [esp + 0x10]
push ecx
push 0xf8
lea edx, [esp + 0x1c]
push edx
push esi
call edi
test eax, eax
je 0x49970b
cmp dword [esp + 0xc], 0xf8
jne 0x49970b
cmp dword [esp + 0x10], 0x4550
jne 0x49970b
cmp word [esp + 0x16], bx
je 0x49970b
mov ebx, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x148]
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.00436eab
add esp, 0x140
ret

Function at 0x499960
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret
Function at 0x401000
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
mov al, byte [esi]
cmp al, 0x22
push 0x20
pop ebx
je 0x401029
cmp al, bl
jbe 0x40103b
inc esi
cmp byte [esi], bl
ja 0x40101e
jmp 0x40103b
cmp al, 0x22
je 0x40103a
inc esi
mov al, byte [esi]
test al, al
jne 0x401025
cmp al, 0x22
jne 0x40103b
jmp 0x40103a
cmp al, bl
ja 0x401041
inc esi
mov al, byte [esi]
test al, al
jne 0x401036
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
push 0x80
push 8
mov dword [0x4061d4], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x4061d0], eax
mov eax, section..data
mov edi, 0x406014
cmp eax, edi
mov ebx, eax
jae 0x40108d
mov eax, dword [ebx]
test eax, eax
je 0x401086
call eax
add ebx, 4
cmp ebx, edi
jb 0x40107e
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov ecx, dword [0x4061d8]
test ecx, ecx
mov ebx, eax
je 0x4010c5
mov eax, dword [0x4061d0]
lea edi, [eax + ecx*4]
cmp eax, edi
mov esi, eax
jae 0x4010c5
mov eax, dword [esi]
test eax, eax
je 0x4010be
call eax
add esi, 4
cmp esi, edi
jb 0x4010b6
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40116d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401184
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x4011b9
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x4011b5
cmp edi, eax
jae 0x4011b9
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x4011a7
cmp edi, eax
jb 0x4011bd
xor eax, eax
jmp 0x4011c7
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret

Function at 0x4011e2
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0xa0
mov eax, dword [0x406138]
xor eax, ebp
mov dword [ebp + 0x74], eax
push 0x9c
lea eax, [ebp - 0x28]
push 0
push eax
call fcn.00402b1b
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x401223
xor al, al
jmp 0x401240
cmp dword [ebp - 0x24], 5
jb 0x40121f
jbe 0x40122f
mov al, 1
jmp 0x401240
xor eax, eax
inc eax
cmp dword [ebp - 0x20], eax
jae 0x401240
cmp word [ebp + 0x6c], 4
sbb al, al
inc al
mov ecx, dword [ebp + 0x74]
xor ecx, ebp
call fcn.004010cd
add ebp, 0x78
leave
ret
Function at 0x401753
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, eax
push edi
lea ebx, [esi + 0x20]
mov eax, ebx
lea edi, [ebp - 0xc]
call fcn.0040207b
push dword [eax + 4]
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, edi
call fcn.00402099
mov eax, dword [ebx]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40179c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4017d0
add esi, 0x1c
mov eax, esi
lea edi, [ebp - 0xc]
call fcn.0040207b
mov eax, dword [eax + 4]
mov ebx, dword [ebx]
push eax
push 0
push 0x405194
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov ebx, eax
neg ebx
sbb bl, bl
mov ecx, edi
inc bl
call fcn.00402099
test bl, bl
je 0x4017d5
or eax, 0xffffffff
jmp 0x4017e9
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4017ee
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [0x4061b4]
mov ecx, 0x4061b4
call dword [eax + 0xc]
or dword [ebp - 0xc], 0xffffffff
add eax, 0x10
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push 0x104
mov esi, eax
mov dword [ebp - 0x14], eax
call fcn.004021de
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
mov eax, dword [edi + 0x20]
xor esi, esi
push esi
push 0x405198
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea ecx, [ebp - 0x14]
mov ebx, eax
call fcn.00402099
cmp ebx, esi
je 0x4018f5
lea eax, [ebp - 4]
push eax
add edi, 0x10
call fcn.00401fc4
push 0x405168
push 0x66
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, esi
mov dword [ebp - 8], eax
je 0x4018f5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, esi
je 0x4018f5
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
cmp ebx, esi
je 0x4018f5
push esi
push esi
push 4
push esi
push esi
push 0xc0000000
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
inc eax
neg eax
sbb eax, eax
and eax, dword [fcn.004010cd]
cmp eax, esi
je 0x4018e9
push edi
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
mov ecx, ebx
call fcn.00401b31
test eax, eax
pop ecx
pop ecx
jne 0x4018e9
mov esi, dword [ebp - 4]
add esi, 0xfffffff0
call fcn.0040229b
mov esi, dword [ebp + 8]
add eax, 0x10
cmp edi, 0xffffffff
mov dword [esi], eax
je 0x4018fd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4018fd
cmp edi, 0xffffffff
je 0x4018f5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 8]
call fcn.00401e7b
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.004011ca
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
Function at 0x401b31
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x20c4
call fcn.00404440
mov eax, dword [0x406138]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0xd
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x20b8], eax
jb 0x401d2f
push 0x8c
lea eax, [ebp - 0x2098]
push 0
push eax
call fcn.00402b1b
add esp, 0xc
lea edx, [ebp - 0x2098]
call fcn.00402d59
test eax, eax
jne 0x401d2f
mov eax, dword [ebp - 0x2094]
mov ecx, dword [ebp - 0x2098]
sub dword [ebp + 8], 5
sub dword [ebp + 8], 8
add ecx, eax
mov eax, 0x300
shl eax, cl
lea ebx, [edi + 5]
xor ecx, ecx
push 2
mov esi, ebx
add eax, 0x736
pop edx
add ebx, 8
mul edx
seto cl
lea edi, [ebp - 0x20a8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
neg ecx
or ecx, eax
push ecx
call fcn.00402abf
mov esi, eax
xor edi, edi
cmp esi, edi
pop ecx
mov dword [ebp - 0x20a0], esi
jne 0x401be9
push edi
call fcn.00402aa4
jmp 0x401d2e
push dword [ebp - 0x208c]
call fcn.00402abf
cmp eax, edi
pop ecx
mov dword [ebp - 0x209c], eax
jne 0x401c0b
push edi
call fcn.00402aa4
push esi
jmp 0x401d28
mov dword [ebp - 0x2084], eax
mov dword [ebp - 0x2088], esi
mov dword [ebp - 0x2014], 0xfffffffe
mov dword [ebp - 0x2040], edi
mov ecx, dword [ebp - 0x20a8]
cmp ecx, edi
jne 0x401c42
cmp dword [ebp - 0x20a4], edi
jne 0x401c42
cmp dword [ebp + 8], edi
je 0x401cf5
mov eax, 0x2000
mov dword [ebp - 0x20bc], eax
cmp ecx, eax
mov dword [ebp - 0x20b0], edi
mov dword [ebp - 0x20ac], edi
mov dword [ebp - 0x20b4], ecx
lea eax, [ebp - 0x20bc]
ja 0x401c6f
lea eax, [ebp - 0x20b4]
xor ecx, ecx
cmp dword [ebp + 8], edi
lea edx, [ebp - 0x2098]
sete cl
push ecx
lea ecx, [ebp - 0x20ac]
push ecx
push dword [eax]
lea eax, [ebp - 0x2008]
push eax
lea eax, [ebp - 0x20b0]
push eax
push dword [ebp + 8]
push ebx
call fcn.00402dd5
add esp, 0x1c
test eax, eax
jne 0x401d0c
mov eax, dword [ebp - 0x20b0]
sub dword [ebp + 8], eax
mov esi, dword [ebp - 0x20ac]
add ebx, eax
sub dword [ebp - 0x20a8], esi
push edi
lea eax, [ebp - 0x20c0]
sbb dword [ebp - 0x20a4], edi
push eax
push esi
lea eax, [ebp - 0x2008]
push eax
push dword [ebp - 0x20b8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401d17
cmp dword [ebp - 0x20c0], esi
jne 0x401d17
mov esi, dword [ebp - 0x20a0]
jmp 0x401c27
push dword [ebp - 0x209c]
call fcn.00402aa4
push esi
call fcn.00402aa4
pop ecx
pop ecx
xor eax, eax
jmp 0x401d32
push dword [ebp - 0x209c]
jmp 0x401c00
push dword [ebp - 0x209c]
call fcn.00402aa4
push dword [ebp - 0x20a0]
call fcn.00402aa4
pop ecx
pop ecx
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004010cd
leave
ret