joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4215cc
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x42b5e8
call fcn.0040e914
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.004274ff
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x42160b
call fcn.004274ff
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 0x421619
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x421627
or eax, 0xffffffff
jmp 0x42170f
mov ecx, esi
call fcn.00421542
mov dword [ebp - 0x14], eax
call fcn.0041cd80
xor edi, edi
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
je 0x42165e
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x42165e
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.0041cd34
push dword [ebp - 0x14]
call fcn.0041c881
push ebx
push eax
push dword [ebp - 0x18]
mov ecx, esi
call fcn.004212cf
cmp eax, edi
je 0x4216d1
test byte [esi + 0x24], 0x10
je 0x42169f
push 4
mov ecx, esi
pop ebx
call fcn.0041f5fb
test ah, 1
je 0x421697
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.0041eb72
cmp dword [esi + 0x1c], edi
je 0x4216d1
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.0041f76c
jmp 0x4216d1
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], edi
je 0x4216e5
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x4216fe
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x4216fe
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.0042157c
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 0x42608d
Capabilities:
Create http request

Disassembly:
mov eax, 0x42b994
call fcn.0040e914
push ecx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 0xc]
and dword [ebp - 4], 0
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esi], vtable.CInternetSession.0
jne 0x4260c5
call fcn.004274ff
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi + 8], eax
jne 0x4260ea
push eax
push dword [esi + 4]
call fcn.00426d46
jmp 0x4260f6
push esi
push eax
mov ecx, 0x43c5b0
call fcn.00426107
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret 0x18
Function at 0x426283
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, 0x42b9cf
call fcn.0040e914
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
call fcn.0042291b
mov eax, dword [0x438ae8]
lea ebx, [esi + 0x24]
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebx], eax
mov eax, dword [ebp + 0x10]
mov dword [esi], vtable.CInternetFile.0
mov ecx, 0x43c5b0
mov byte [ebp - 4], 1
push dword [eax + 0xc]
push dword [ebp + 8]
call fcn.00426107
push dword [ebp + 0xc]
lea ecx, [esi + 0xc]
call fcn.0041fd0d
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 8]
mov dword [esi + 0x1c], eax
lea eax, [ebp + 0x10]
push eax
call fcn.0040cccf
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.0041fcbd
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 1
call fcn.0041fb84
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x18], eax
mov dword [esi + 0x3c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x40], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
Function at 0x45b079
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x45b0a0
call fcn.0045636b
mov dword [eax], esi
call fcn.00456358
push 0x16
pop esi
mov dword [eax], esi
call fcn.0045ed3b
mov eax, esi
jmp 0x45b0f5
test dword [ebp + 0xc], 0xfffffff9
jne 0x45b086
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x45b0cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0045637e
pop ecx
call fcn.00456358
mov eax, dword [eax]
jmp 0x45b0f5
test al, 0x10
jne 0x45b0f3
test al, 1
je 0x45b0f3
test byte [ebp + 0xc], 2
je 0x45b0f3
call fcn.0045636b
mov dword [eax], 5
call fcn.00456358
mov dword [eax], 0xd
jmp 0x45b0c4
xor eax, eax
pop esi
pop ebp
ret

Function at 0x46b33d
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4924c4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0045d142
and dword [ebp - 0x14], 0
cmp dword [0x49518c], 0
mov dword [ebp - 0x18], eax
jne 0x46b3f0
push 0x47aa78
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x46b498
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x47aa6c
push ebx
call edi
test eax, eax
je 0x46b498
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x47aa5c
push ebx
mov dword [0x49518c], eax
call edi
push eax
call esi
push 0x47aa48
push ebx
mov dword [0x495190], eax
call edi
push eax
call esi
push 0x47aa2c
push ebx
mov dword [0x495194], eax
call edi
push eax
call esi
mov dword [0x49519c], eax
test eax, eax
je 0x46b3f0
push 0x47aa14
push ebx
call edi
push eax
call esi
mov dword [0x495198], eax
mov eax, dword [0x495198]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x46b449
cmp dword [0x49519c], ecx
je 0x46b449
push eax
call esi
push dword [0x49519c]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x46b449
test ebx, ebx
je 0x46b449
call edi
test eax, eax
je 0x46b440
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x46b440
test byte [ebp - 8], 1
jne 0x46b449
or dword [ebp + 0x10], 0x200000
jmp 0x46b47c
mov eax, dword [0x495190]
cmp eax, dword [ebp - 0x18]
je 0x46b47c
push eax
call esi
test eax, eax
je 0x46b47c
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x46b47c
mov eax, dword [0x495194]
cmp eax, dword [ebp - 0x18]
je 0x46b47c
push eax
call esi
test eax, eax
je 0x46b47c
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x49518c]
call esi
test eax, eax
je 0x46b498
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x46b49a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00454633
leave
ret
Function at 0x401340
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x5a38c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov eax, dword [esi + 0xb8]
mov ecx, 1
sub ecx, dword [eax - 4]
push edi
or ecx, dword [eax - 8]
jge 0x401374
push 0
lea ecx, [esi + 0xb8]
call fcn.004011e0
mov edi, dword [esi + 0xb8]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4013f1
push ebx
lea edx, [ebp - 0x14]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push edi
mov dword [esi + 0xc0], ebx
mov dword [esi + 0xc4], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi + 0xc8]
xor eax, eax
push 0xa
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0x10]
mov word [ebp - 8], ax
mov eax, dword [ebp - 0x14]
push ecx
mov ecx, dword [0x5a50a4]
push edx
mov byte [ebp - 0x10], 0x17
mov dword [ebp - 0xf], eax
mov dword [ebp - 0xb], ebx
call fcn.0040e0f0
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00527098
mov esp, ebp
pop ebp
ret

Function at 0x401430
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 0xc8]
push 1
add ecx, 0x24
call fcn.0040ddc0
mov ecx, dword [eax]
mov dword [ebp - 4], ecx
mov esi, dword [eax + 4]
mov ecx, dword [eax]
xor edx, edx
xor ebx, ebx
or edx, esi
or ecx, ebx
mov dword [ebp - 0xc], esi
mov dword [edi + 0xd0], edx
mov dword [edi + 0xd4], ecx
cmp edx, dword [edi + 0xc0]
jne 0x401480
cmp ecx, dword [edi + 0xc4]
je 0x401550
cmp dword [eax + 4], 0xffffffff
je 0x401550
mov eax, dword [edi + 0xb8]
mov edx, 1
sub edx, dword [eax - 4]
or edx, dword [eax - 8]
jge 0x4014aa
push 0
lea ecx, [edi + 0xb8]
call fcn.004011e0
mov ebx, dword [edi + 0xb8]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401557
push 0
lea eax, [ebp - 4]
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x2000
push 0x40
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [ebp - 0xc]
mov esi, eax
push 0
mov byte [esi], 0x18
mov ecx, dword [ebp - 4]
lea eax, [ebp - 8]
push eax
mov dword [esi + 1], ecx
push 0x1ff7
lea ecx, [esi + 9]
push ecx
push ebx
mov dword [esi + 5], edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
test eax, eax
je 0x401542
mov edx, dword [edi + 0xc8]
mov ecx, dword [0x5a50a4]
add eax, 9
push eax
push esi
push edx
call fcn.0040e0f0
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.00401010
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401580
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0xc8]
push 0
add ecx, 0x24
call fcn.0040ddc0
cmp byte [eax], 0x1c
jne 0x4015a0
mov ecx, esi
pop esi
jmp fcn.00401430
pop esi
ret
push esi
mov esi, ecx
mov eax, dword [esi + 0xd4]
mov byte [esi + 0x188], 0
mov ecx, dword [eax + 0x14]
push ecx
mov ecx, dword [esi + 0x18c]
push 1
add ecx, 0x24
call fcn.0040ddc0
mov edx, dword [esi + 0xd0]
push eax
push edx
call fcn.005280b0
mov eax, dword [esi + 0x20]
add esp, 0xc
push 0
push 0
push 0xf
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop esi
ret
push esi
mov esi, ecx
mov ecx, dword [esi + 0x18c]
inc dword [esi + 0xdc]
push 0
add ecx, 0x24
call fcn.0040ddc0
movzx eax, byte [eax]
add eax, 0xffffff8d
cmp eax, 3
ja case.default.0x416254
jmp dword [eax*4 + 0x4162b8]
mov ecx, esi
pop esi
jmp 0x415640
mov ecx, dword [esi + 0x18c]
push 0
add ecx, 0x24
call fcn.0040ddc0
cmp byte [eax + 1], 1
mov ecx, esi
pop esi
jne 0x416281
jmp fcn.004157e0
jmp fcn.00415690
mov ecx, esi
pop esi
jmp fcn.00416010
mov ecx, dword [esi + 0x18c]
add ecx, 0x24
call fcn.0040dc00
mov ecx, dword [esi + 0x18c]
dec eax
push eax
push 1
add ecx, 0x24
call fcn.0040ddc0
push eax
mov ecx, esi
call fcn.00415470
pop esi
ret
push esi
mov esi, ecx
call fcn.00417dc0
lea ecx, [esi + 0xb8]
call fcn.00432267
mov dword [esi + 0x13c], eax
pop esi
ret
push esi
mov esi, ecx
mov ecx, dword [esi + 0x1a0]
push 0
add ecx, 0x24
call fcn.0040ddc0
movzx eax, byte [eax]
sub eax, 0x7d
je 0x418f41
dec eax
je 0x418f39
dec eax
jne 0x418f49
mov ecx, esi
pop esi
jmp fcn.00418220
mov ecx, esi
pop esi
jmp fcn.00418800
mov ecx, esi
pop esi
jmp fcn.00418610
pop esi
ret
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je case.0x4202e1.27
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x48]
test eax, eax
jle 0x4202c1
add eax, 0xfffff6f8
cmp eax, 4
ja case.0x4202e1.27
jmp dword [eax*4 + 0x420380]
pop esi
pop ebp
jmp 0x401580
pop esi
pop ebp
jmp 0x417ec0
pop esi
pop ebp
jmp 0x418f10
pop esi
pop ebp
jmp 0x416230
pop esi
pop ebp
jmp fcn.004094f0
push 0
lea ecx, [esi + 0x24]
call fcn.0040ddc0
movzx ecx, byte [eax]
add ecx, 0xffffffe7
cmp ecx, 0x67
ja case.0x4202e1.27
movzx ecx, byte [ecx + 0x4203b0]
jmp dword [ecx*4 + 0x420394]
mov ecx, dword [0x5a50a8]
inc eax
push eax
push esi
call fcn.0041fac0
pop esi
pop ebp
ret
mov edx, dword [0x5a50a8]
mov eax, dword [edx + 0x20]
push esi
push 0
push 0x903
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop esi
pop ebp
ret
mov ecx, dword [0x5a50a8]
mov edx, dword [ecx + 0x20]
push esi
push 0
push 0x904
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
pop esi
pop ebp
ret
mov eax, dword [0x5a50a8]
mov ecx, dword [eax + 0x20]
push esi
push 0
push 0x905
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
pop esi
pop ebp
ret
mov edx, dword [0x5a50a8]
mov eax, dword [edx + 0x20]
push esi
push 0
push 0x906
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop esi
pop ebp
ret
mov ecx, dword [0x5a50a8]
mov edx, dword [ecx + 0x20]
push esi
push 0
push 0x907
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
pop esi
pop ebp
ret
Function at 0x401930
Capabilities:
Get file system object information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
mov eax, dword [0x5a38c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp eax, 0xffffffff
jne 0x401955
mov eax, 0x80
jmp 0x40195a
or eax, 0x80
push 0x4010
push 0x160
lea edx, [ebp - 0x164]
push edx
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x160]
xor ecx, ebp
call fcn.00527098
mov esp, ebp
pop ebp
ret

Function at 0x401cc0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401cdb
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401d12
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x401d0e
jmp 0x401d00
cmp esi, eax
jae 0x401d12
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401d00
cmp esi, eax
jb 0x401d19
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x401fb0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x588c88
push 0x527680
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5a38c0]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 4], 0
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
call fcn.005275e4
add esp, 4
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
je 0x402113
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, edi
mov dword [ebp - 0x1c], esi
cmp byte [edi], 0x5c
jne 0x40206c
lea eax, [edi + 1]
cmp byte [eax], 0x5c
jne 0x40206c
mov esi, eax
mov dword [ebp - 0x1c], esi
inc esi
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x402043
cmp al, 0x5c
je 0x402043
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x40202b
cmp byte [esi], 0
je 0x402050
inc esi
mov dword [ebp - 0x1c], esi
lea esp, [esp]
mov al, byte [esi]
test al, al
je 0x402065
cmp al, 0x5c
je 0x402065
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x402049
cmp byte [esi], 0
je 0x40208b
jmp 0x402087
lea eax, [edi + 1]
cmp byte [eax], 0x3a
jne 0x40208b
mov esi, eax
mov dword [ebp - 0x1c], esi
inc esi
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x40208b
cmp al, 0x5c
jne 0x40208b
inc esi
mov dword [ebp - 0x1c], esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov al, byte [esi]
test al, al
je 0x4020d8
cmp al, 0x5c
jne 0x4020ca
mov byte [esi], 0
push edi
call ebx
cmp eax, 0xffffffff
jne 0x4020c3
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4020c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4020c7
push edi
jmp 0x40210b
test al, 0x10
je 0x4020c0
mov byte [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov dword [ebp - 0x1c], esi
jmp 0x402091
mov dword [ebp - 4], 0xfffffffe
push edi
call fcn.005275aa
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.005275aa
add esp, 4
mov dword [ebp - 4], 0xfffffffe
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4041f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5a38c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi + 0x70c]
push edi
push 9
add ecx, 0x24
call fcn.0040ddc0
mov ecx, dword [esi + 0x70c]
push 1
add ecx, 0x24
mov dword [ebp - 0x18], eax
call fcn.0040ddc0
mov edx, dword [eax]
xor ecx, ecx
or ecx, dword [eax + 4]
xor ebx, ebx
or edx, ebx
mov dword [esi + 0xb8], ecx
mov dword [esi + 0xbc], edx
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x70c]
mov edx, dword [eax + 4]
add ecx, 0x24
mov dword [ebp - 0x24], edx
call fcn.0040dc00
lea ebx, [esi + 0x98]
lea edi, [eax - 9]
mov eax, dword [ebx]
mov ecx, 1
sub ecx, dword [eax - 4]
or ecx, dword [eax - 8]
jge 0x404279
push 0
mov ecx, ebx
call fcn.004011e0
mov eax, dword [ebx]
push 0
push 0x80
push 3
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x24]
push 0
lea edx, [ebp - 0x20]
push edx
push ecx
push eax
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x14], 0
nop
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
push 0
lea edx, [ebp - 0x1c]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jg 0x4042d5
mov ecx, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, 0xf
jl 0x4042b0
cmp dword [ebp - 0x14], 0xf
jne 0x404324
test eax, eax
jg 0x404324
push 0x551764
lea edx, [ebp - 0x18]
push ebx
push edx
call fcn.00403df0
mov eax, dword [eax]
mov ecx, dword [esi + 0x20]
add esp, 0xc
push 0x30
push 0x55175c
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404324
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1c]
add dword [esi + 0xb8], edx
mov ecx, esi
adc dword [esi + 0xbc], 0
call fcn.00402880
cmp byte [esi + 0x94], 0
je 0x404366
mov ecx, esi
call fcn.00401e80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00527098
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x24]
mov dword [ebp - 0xf], eax
push 9
mov dword [ebp - 0xb], ecx
mov ecx, dword [esi + 0x70c]
lea eax, [ebp - 0x10]
push eax
push ecx
mov ecx, dword [esi + 0x710]
mov byte [ebp - 0x10], 7
call fcn.0040e0f0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00527098
mov esp, ebp
pop ebp
ret
Function at 0x407e20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi + 0x70c]
push edi
push 1
add ecx, 0x24
call fcn.0040ddc0
mov ebx, eax
mov eax, dword [ebx]
mov dword [ebp - 4], eax
mov edi, dword [ebx + 4]
mov edx, dword [ebx]
xor ecx, ecx
or ecx, edi
xor eax, eax
or edx, eax
mov dword [esi + 0xb8], ecx
mov ecx, esi
mov dword [ebp - 0xc], edi
mov dword [esi + 0xbc], edx
call fcn.00402880
mov ecx, dword [esi + 0xb8]
cmp ecx, dword [esi + 0xb0]
jne 0x407e85
mov edx, dword [esi + 0xbc]
cmp edx, dword [esi + 0xb4]
je 0x407f62
cmp dword [ebx + 4], 0xffffffff
je 0x407f62
cmp byte [esi + 0x94], 0
jne 0x407f62
mov eax, dword [esi + 0xa8]
mov ecx, 1
sub ecx, dword [eax - 4]
or ecx, dword [eax - 8]
jge 0x407ebc
push 0
lea ecx, [esi + 0xa8]
call fcn.004011e0
mov ebx, dword [esi + 0xa8]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x407f69
push 0
lea edx, [ebp - 4]
push edx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x2000
push 0x40
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [ebp - 0xc]
mov edi, eax
push 0
mov byte [edi], 5
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
mov dword [edi + 1], eax
push 0x1ff7
lea eax, [edi + 9]
push eax
push ebx
mov dword [edi + 5], ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
test eax, eax
je 0x407f54
mov ecx, dword [esi + 0x70c]
add eax, 9
push eax
push edi
push ecx
mov ecx, dword [esi + 0x710]
call fcn.0040e0f0
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.00407b90
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret