joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404a40
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb4
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetDlgItem]
push esi
push edi
push 2
push dword [0x40b10c]
call ebx
mov edi, eax
test edi, edi
je 0x404bea
push 0x1d
lea eax, [ebp - 0xb4]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
test eax, eax
jle 0x404bea
lea eax, [ebp - 0xb4]
push eax
mov eax, dword [0x40b430]
push dword [eax]
call fcn.004055d0
mov esi, eax
add esp, 8
test esi, esi
je 0x404bea
push 3
push dword [0x40b10c]
call ebx
mov ebx, eax
test ebx, ebx
je 0x404bdf
push 0xe
lea eax, [ebp - 0x3c]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextW]
test eax, eax
jle 0x404bdf
lea eax, [ebp - 0x3c]
push eax
push dword [esi + 4]
call fcn.004055d0
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
je 0x404bdf
lea eax, [ebp - 0x20]
push eax
push dword [0x40b110]
call fcn.00404360
add esp, 8
test eax, eax
je 0x404c01
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x404b59
lea eax, [ebp - 0x20]
push eax
push dword [esi + 4]
call fcn.004055d0
add esp, 8
test eax, eax
je 0x404b31
push 0
push 0x155
push 0x15c
jmp 0x404bf3
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 4]
push esi
call fcn.00406250
add esp, 0xc
test eax, eax
je 0x404bdf
push dword [ebp - 4]
lea eax, [ebp - 0x20]
push eax
push ebx
call fcn.004048a0
add esp, 0xc
lea eax, [ebp - 0x78]
push eax
push dword [0x40b110]
call fcn.004042d0
add esp, 8
test eax, eax
je 0x404c01
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x404b94
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x78]
push eax
mov eax, dword [0x40b430]
push dword [eax]
call fcn.004055d0
add esp, 8
test eax, eax
je 0x404bb9
push 0
push 0x155
push 0x15b
jmp 0x404bf3
lea eax, [ebp - 0x78]
push eax
push esi
call fcn.004061d0
add esp, 8
test eax, eax
je 0x404bea
push esi
lea eax, [ebp - 0x78]
push eax
push edi
call fcn.004048a0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x10
push 0x3c
push 0x159
jmp 0x404bf3
push 0x10
push 0x3c
push 0x158
push dword [0x40b110]
call fcn.00401660
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405510
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
lea eax, [ebp - 0x90]
push dword [ebp + 8]
push str.Control_PanelAppearanceClassicSchemes
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp eax, 0x2a
jge 0x405541
xor eax, eax
mov esp, ebp
pop ebp
ret
push esi
lea eax, [ebp - 4]
push eax
push 0x10000
push 0
lea eax, [ebp - 0x90]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40556c
xor esi, esi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
push dword [ebp - 4]
neg eax
sbb esi, esi
inc esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x405710
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x26c
push ebx
push esi
push edi
mov dword [eax], 0
mov dword [eax + 4], 0
lea eax, [ebp - 4]
push eax
push 1
push 0
push str.Control_PanelAppearanceClassicSchemes
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4057a6
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x3a
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push str.SelectedStyle
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4057a6
cmp dword [ebp - 0xc], 1
jne 0x4057a6
cmp dword [ebp - 8], 0x38
jae 0x4057a6
mov edi, dword [ebp + 8]
test edi, edi
je 0x4057a6
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea eax, [ebp - 0x64]
push eax
push dword [edi + 8]
call ebx
test eax, eax
je 0x4057af
mov edi, dword [edi]
test edi, edi
jne 0x405793
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edi
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x64]
push eax
push str.Control_PanelAppearanceClassicSchemes
lea eax, [ebp - 0x26c]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp eax, 0x2a
jl 0x405873
lea eax, [ebp - 4]
push eax
push 1
push 0
lea eax, [ebp - 0x26c]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405873
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x1c
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push str.SelectedSize
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4057a6
cmp dword [ebp - 0xc], 1
jne 0x4057a6
cmp dword [ebp - 8], 0x38
jae 0x4057a6
mov esi, dword [edi + 4]
test esi, esi
je 0x405873
lea eax, [ebp - 0x28]
push eax
push dword [esi + 8]
call ebx
test eax, eax
je 0x40586d
mov esi, dword [esi]
test esi, esi
jne 0x405850
pop edi
lea eax, [esi + 1]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [eax + 4], esi
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405d10
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0xbc
mov eax, dword [eax]
test eax, eax
je 0x405e99
push dword [eax + 8]
lea eax, [ebp - 0xbc]
push str.Control_PanelAppearanceClassicSchemes
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp eax, 0x2a
jl 0x405e99
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0x20001
push 0
lea eax, [ebp - 0xbc]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405e99
mov ecx, dword [ebp + 8]
mov eax, 0x40b118
push ebx
push esi
push edi
xor edi, edi
lea esi, [ecx + 0x254]
sub eax, ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
mov ebx, dword [ebp - 4]
push edi
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
push str.Color_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
cmp eax, 6
jl 0x405de2
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 4
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
lea eax, [ebp - 0x30]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405de2
cmp dword [ebp - 0x14], 4
jne 0x405de2
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
jne 0x405de8
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + esi]
mov dword [esi], eax
cmp eax, dword [ebp - 0x20]
je 0x405e08
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x405dfd
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [esi]
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov dword [esi + 0x7c], eax
inc edi
add esi, 4
cmp edi, 0x1f
jl 0x405d90
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0xc], 4
lea esi, [ebx + 0x34c]
push esi
push eax
push 0
push str.Gradients
push dword [ebp - 4]
call edi
test eax, eax
jne 0x405e4a
cmp dword [ebp - 8], 4
je 0x405e51
mov eax, dword [0x40b3e8]
mov dword [esi], eax
lea eax, [ebp - 0xc]
push eax
lea esi, [ebx + 0x350]
push esi
lea eax, [ebp - 8]
push eax
push 0
push str.FlatMenus
push dword [ebp - 4]
call edi
test eax, eax
jne 0x405e76
cmp dword [ebp - 8], 4
je 0x405e7d
mov eax, dword [0x40b3ec]
mov dword [esi], eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
push ebx
call fcn.00405ea0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x406300
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
lea eax, [ebp - 0xa0]
push dword [ebp + 0xc]
push str.Control_PanelAppearanceClassicSchemes
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp eax, 0x2a
jl 0x406405
push 0
lea eax, [ebp - 4]
push eax
push 0
push 2
push 0
push 0
push 0
lea eax, [ebp - 0xa0]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x406405
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea ebx, [eax + 1]
xor esi, esi
add edi, 0x254
nop word [eax + eax]
push esi
lea eax, [ebp - 0x14]
push str.Color_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
cmp eax, 6
jl 0x4063a3
push 4
push edi
push 4
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb eax, eax
inc eax
and ebx, eax
inc esi
add edi, 4
cmp esi, 0x1f
jl 0x406370
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add eax, 0x34c
push 4
push eax
push 4
push 0
push str.Gradients
push dword [ebp - 4]
call esi
mov ecx, dword [ebp + 8]
neg eax
push 4
sbb edi, edi
add ecx, 0x350
push ecx
push 4
push 0
push str.FlatMenus
push dword [ebp - 4]
inc edi
and edi, ebx
call esi
push dword [ebp - 4]
xor esi, esi
test eax, eax
cmove esi, edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x406410
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
lea eax, [ebp - 0xc8]
push esi
push dword [ebp + 0x10]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push dword [ebp + 0xc]
push str.Control_PanelAppearanceClassicSchemes
push str._s_s_s
push eax
call esi
add esp, 0x14
cmp eax, 0x2c
jl 0x40659c
push 0
lea eax, [ebp - 4]
push eax
push 0
push 2
push 0
push 0
push 0
lea eax, [ebp - 0xc8]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40659c
push ebx
push edi
lea ebx, [eax + 1]
xor edi, edi
push edi
lea eax, [ebp - 0x20]
push str.Font_d
push eax
call esi
add esp, 0xc
cmp eax, 5
jge 0x406491
xor ebx, ebx
jmp 0x406511
push edi
push dword [ebp + 8]
call fcn.00405880
mov esi, eax
add esp, 8
test esi, esi
jne 0x4064a7
xor ebx, ebx
jmp 0x40650b
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov dword [ebp - 0x10], eax
mov eax, dword [0x40b46c]
mov dword [ebp - 0xc], ecx
mov eax, dword [eax + 0xc]
cmp eax, 0x60
je 0x4064e1
push eax
push 0x60
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [esi], eax
mov eax, dword [0x40b46c]
push dword [eax + 0xc]
push 0x60
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [esi + 4], eax
push 0x5c
push esi
push 3
push 0
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [0x40b46c]
cmp dword [eax + 0xc], 0x60
je 0x40650b
mov eax, dword [ebp - 0xc]
mov dword [esi], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 4], eax
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
inc edi
cmp edi, 6
jl 0x406476
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
xor esi, esi
push esi
lea eax, [ebp - 0x20]
push str.Size_d
push eax
call edi
add esp, 0xc
cmp eax, 5
jge 0x40653b
xor ebx, ebx
jmp 0x406584
push esi
push dword [ebp + 8]
call fcn.004058f0
mov ecx, eax
add esp, 8
mov eax, dword [0x40b46c]
mov dword [ebp - 8], ecx
mov eax, dword [eax + 0xc]
cmp eax, 0x60
je 0x406566
push eax
push 0x60
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [ebp - 8], eax
push 4
lea eax, [ebp - 8]
push eax
push 4
push 0
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb eax, eax
inc eax
and ebx, eax
inc esi
cmp esi, 0xa
jl 0x406523
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x405eba
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push esi
mov esi, 0x104
lea eax, [ebp - 0x120]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, esi
pop esi
jbe 0x405ede
xor eax, eax
test eax, eax
je 0x405ef0
cmp byte [ebp + eax - 0x121], 0x5c
je 0x405ef0
xor ecx, ecx
jmp 0x405ef3
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx + 0x409010]
lea eax, [ebp + eax - 0x120]
push ecx
push str._s_s.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x120]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
leave
ret 4

Function at 0x405f97
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x422acc], 0
push esi
jne 0x405fce
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405fa8
mov dword [ecx*4 + 0x422ac8], eax
inc ecx
cmp ecx, 0x100
jl 0x405fa3
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405fff
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x422ac8]
xor eax, esi
inc ecx
dec edx
jne 0x405fe1
pop edi
not eax
pop esi
ret 0xc

Function at 0x430000
Capabilities:
Packed with generic packer

Disassembly:
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax - 0x6f6f6f70], dl
nop
nop
nop
nop
nop
pushal
call 0x43000c
nop
nop
pop eax
nop
nop
nop
nop
add eax, 0x403d6f
sub eax, 0x403d15
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
jl 0x42ffd9
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x402710
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x40c018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0
mov edi, dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, ecx
push esi
push 0
push 0
push 0x258
push 0x258
push 0
push bind
push 0xa0000
push 0x40ff10
push 0x40fea8
push 0
mov dword [0x40ff0c], esi
call edi
mov dword [0x40fea4], eax
test eax, eax
jne 0x402774
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004071d0
mov esp, ebp
pop ebp
ret
push 0
push esi
push 0x6a
push eax
push 0
push 0
push 0
push 0
push 0x50000000
push 0
push str.msctls_statusbar32
push 0
call edi
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
mov esi, eax
push 0
push esi
call edi
lea eax, [ebp - 0x10]
push eax
push 3
push 0x404
push esi
mov dword [ebp - 0x10], 0x6e
mov dword [ebp - 0xc], 0xe6
mov dword [ebp - 8], 0xffffffff
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp + 8]
mov edx, dword [0x40fea4]
push ecx
push edx
call edi
mov eax, dword [0x40fea4]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov eax, 1
pop esi
call fcn.004071d0
mov esp, ebp
pop ebp
ret

Function at 0x403550
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x40c018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x40c7e8]
push ebx
push esi
push edi
test eax, eax
js 0x403659
cmp eax, 3
jge 0x403659
mov esi, eax
imul esi, esi, 0x214
push ecx
add esi, 0x40c1ac
inc eax
lea edi, [esi + 4]
push pe_nt_image_headers32
mov dword [0x40c7e8], eax
push edi
mov dword [esi], 1
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
cmp dword [esi], 0
je 0x403659
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0xe]
movzx ecx, word [ebp - 0x12]
movzx edx, word [ebp - 0x14]
push eax
push ecx
push edx
push edi
lea ebx, [esi + 0x110]
push str.._s_04d__02d__02d.txt
push ebx
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ecx
mov dword [esi + 0x10c], edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
jne 0x403634
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004071d0
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x403659
mov ecx, dword [esi + 0x210]
push ecx
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004071d0
mov esp, ebp
pop ebp
ret
Function at 0x403670
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x40c018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
test eax, eax
js 0x403867
cmp eax, dword [ecx + 0x640]
jge 0x403867
imul eax, eax, 0x214
cmp dword [eax + ecx + 4], 0
lea esi, [eax + ecx + 4]
je 0x403867
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x812]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
cmp ecx, dword [esi + 0x104]
jne 0x4036f6
movzx edx, word [ebp - 0x816]
cmp edx, dword [esi + 0x108]
jne 0x4036f6
movzx eax, word [ebp - 0x818]
cmp eax, dword [esi + 0x10c]
je 0x4037b3
mov ecx, dword [esi + 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [ebp - 0x812]
movzx ecx, word [ebp - 0x816]
movzx edx, word [ebp - 0x818]
push eax
push ecx
push edx
mov dword [esi + 0x10c], edx
lea edx, [esi + 4]
push edx
lea edi, [esi + 0x110]
push str.._s_04d__02d__02d.txt
push edi
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ecx
call ebx
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
jne 0x40377d
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004071d0
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4037b3
mov eax, dword [esi + 0x210]
push eax
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004071d0
mov esp, ebp
pop ebp
ret
push 0x3ff
lea ecx, [ebp - 0x807]
push 0
push ecx
mov byte [ebp - 0x808], 0
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
push edx
push eax
lea ecx, [ebp - 0x808]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll_vsprintf_s]
push 0x3ff
lea edx, [ebp - 0x407]
push 0
push edx
mov byte [ebp - 0x408], 0
call sub.MSVCR100.dll_memset
movzx ecx, word [ebp - 0x80c]
movzx edx, word [ebp - 0x80e]
lea eax, [ebp - 0x808]
push eax
movzx eax, word [ebp - 0x810]
push ecx
push edx
push eax
lea ecx, [ebp - 0x408]
push str._02d:_02d:_02d__s_r_n
push ecx
call ebx
lea eax, [ebp - 0x408]
add esp, 0x40
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403840
mov ecx, dword [esi + 0x210]
sub eax, edx
push 0
lea edx, [ebp - 0x81c]
push edx
push eax
lea eax, [ebp - 0x408]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004071d0
mov esp, ebp
pop ebp
ret
Function at 0x4038d0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push eax
mov esi, ecx
lea ebx, [esi + 0xc]
push pe_nt_image_headers32
push ebx
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
push 0
push 0x20
push 3
push 0
push 1
push bind
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403928
push ebx
push str.__s__Could_not_open_file
add esi, 0x218
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x40394c
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [esi + 4], 0
mov ecx, dword [esi + 8]
push ecx
call fcn.004071c5
add esp, 4
mov dword [esi + 4], eax
test eax, eax
jne 0x403985
push ebx
push str.__s__Could_not_alloc_file_buffer
add esi, 0x218
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 8]
push 0
lea edx, [ebp - 4]
push edx
push ecx
push eax
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4039aa
push ebx
push str.__s__Could_not_read_file
jmp 0x403965
mov eax, dword [esi + 4]
cmp byte [eax], 0xef
jne 0x4039c6
cmp byte [eax + 1], 0xbb
jne 0x4039c6
cmp byte [eax + 2], 0xbf
jne 0x4039c6
push ebx
push str.__s__The_file_is_codified_in_UTF_8_BOM_and_cannot_be_read._Change_it_to_UTF_8_and_try_again
jmp 0x403965
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
pop edi
mov dword [esi + 0x214], eax
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret