joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bf60
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x830
mov al, byte [0x42eed4]
push ebx
push ebp
push esi
push edi
mov byte [esp + 0x1c], al
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0x1d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x854]
test eax, eax
je 0x40c0c6
mov esi, dword [esp + 0x850]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov ecx, dword [esp + 0x84c]
push eax
push ecx
push str.___________________________7d9114302a0cb6
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_nContent_Type:_application_octet_stream_r_n_r_n
lea edx, [esp + 0x2c]
push 0x823
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
push 0x4290b0
repne scasb al, byte es:[edi]
not ecx
dec ecx
push esi
mov ebp, ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 0x20
test ebx, ebx
je 0x40c0ae
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push ebx
call esi
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
mov edi, eax
push 0
push ebx
mov dword [esp + 0x34], edi
call esi
mov ecx, dword [esp + 0x864]
add edi, ebp
add esp, 0x1c
mov dword [esp + 0x10], edi
mov edx, dword [ecx]
lea eax, [edi + 2]
cmp eax, edx
mov dword [esp + 0x14], eax
jae 0x40c093
mov eax, dword [esp + 0x844]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x1c]
mov edi, eax
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 1
and ecx, 3
add ebp, eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x854]
mov dx, word [0x4290ac]
add esp, 0x10
mov word [eax + ecx], dx
mov eax, dword [esp + 0x848]
mov edx, dword [esp + 0x14]
push ebx
mov dword [eax], edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x830
ret
push ebx
mov dword [ecx], 0
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x830
ret
mov ecx, dword [esp + 0x848]
pop edi
pop esi
pop ebp
mov dword [ecx], 0
pop ebx
add esp, 0x830
ret
mov edx, dword [esp + 0x850]
mov eax, dword [esp + 0x84c]
push edx
push eax
push str.___________________________7d9114302a0cb6
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
lea ecx, [esp + 0x2c]
push 0x823
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x848]
not ecx
dec ecx
mov eax, ecx
mov ecx, dword [edx]
cmp eax, ecx
jae 0x40c138
mov edi, dword [esp + 0x844]
mov ecx, eax
mov ebx, ecx
lea esi, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
mov dword [edx], eax
pop ebx
add esp, 0x830
ret
pop edi
pop esi
pop ebp
mov dword [edx], 0
pop ebx
add esp, 0x830
ret
Function at 0x40c7a0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x61c
push ebx
push esi
lea eax, [ebp - 4]
push edi
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.0040c150
add esp, 4
cmp eax, ebx
mov dword [0x4946c4], eax
je 0x40c964
mov dx, word [0x42e49c]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x412]
mov word [ebp - 0x414], dx
mov word [ebp - 0x20c], dx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x20a]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x20c]
push ecx
push 0x103
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x20c]
push 0x428be8
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov ecx, 0x4301b8
call fcn.004065c0
mov esi, dword [sym.imp.MSVCRT.dll__snwprintf]
push str.http:__feedback.theworld.cn_collection_
mov ecx, 0x412
xor eax, eax
mov edi, 0x48d698
push 0x428180
push 0x824
push 0x48d698
rep stosd dword es:[edi], eax
call esi
mov ecx, 0x82
xor eax, eax
mov edi, 0x48d288
add esp, 0x10
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x414]
push ecx
push 0x428180
push 0x104
push 0x48d288
call esi
mov dx, word [0x42e49c]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x61a]
mov word [ebp - 0x61c], dx
add esp, 0x10
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, str.___________________________7d9114302a0cb6
mov dword [0x43285c], 0x2710
test eax, eax
mov dword [0x432854], 0x40c980
mov dword [0x432850], ebx
je 0x40c906
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea eax, [edi + edi]
add eax, 3
and al, 0xfc
call fcn.00421e40
mov ebx, esp
push edi
push ebx
push 0xffffffffffffffff
push str.___________________________7d9114302a0cb6
push 0
push 0
mov word [ebx], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
push str.multipart_form_data__boundary_s
lea ecx, [ebp - 0x61c]
push 0x103
push ecx
call esi
mov eax, dword [ebp - 4]
mov edx, dword [0x4946c4]
mov dword [0x432638], eax
mov ecx, 0x82
xor eax, eax
mov edi, 0x43263c
mov dword [0x432634], edx
add esp, 0x10
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x61c]
push ecx
push 0x428180
push 0x104
push 0x43263c
call esi
add esp, 0x10
mov ecx, 0x4301b8
call fcn.00406510
lea esp, [ebp - 0x628]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c9c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x214
push ebp
push str.dbghelp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebp, eax
test ebp, ebp
je 0x40cab7
push ebx
push esi
push str.MiniDumpWriteDump
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x40caae
mov ax, word [0x42e49c]
push edi
mov word [esp + 0x1c], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x1e]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
push ecx
push 0x103
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x4944b8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea edx, [esp + 0x24]
push 0x428be8
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push 0x4944b8
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
pop edi
cmp esi, 0xffffffff
je 0x40caae
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [esp + 0x224]
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
push esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
pop ebx
pop ebp
add esp, 0x214
ret
Function at 0x40cfb0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x422520
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebp
push esi
mov esi, dword [esp + 0x30]
push edi
xor edi, edi
cmp esi, edi
mov dword [esp + 0xc], edi
je 0x40d0cc
mov eax, dword [esp + 0x38]
cmp eax, edi
je 0x40d0cc
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ebp, eax
mov dword [esp + 0x34], ebp
mov dword [esp + 0x28], edi
mov word [esp + 0x10], di
mov eax, dword [esi]
lea ecx, [esp + 0x10]
push ecx
push edi
push ebp
push esi
mov byte [esp + 0x38], 1
call dword [eax + 0x20]
test eax, eax
jl 0x40d09a
push 8
lea edx, [esp + 0x14]
push edi
lea eax, [esp + 0x18]
push edx
push eax
call dword [sym.imp.OLEAUT32.dll_VariantTimeToDosDateTime]
test eax, eax
jl 0x40d09a
mov eax, dword [esp + 0x18]
mov ecx, dword [0x428780]
push ebx
mov ebx, dword [esp + 0x34]
cmp eax, edi
mov esi, eax
mov dword [ebx], ecx
je 0x40d073
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x40d073
push edi
mov ecx, ebx
call fcn.00405d60
test eax, eax
je 0x40d073
lea ecx, [edi + edi]
mov edi, dword [ebx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
push ebp
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, ebx
pop ebx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
mov esi, dword [esp + 0x30]
mov ecx, dword [0x428780]
lea edx, [esp + 0x10]
push edx
mov dword [esi], ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
push ebp
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, esi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
mov eax, dword [esp + 0x30]
mov ecx, dword [0x428780]
pop edi
pop esi
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
pop ebp
mov dword fs:[0], ecx
add esp, 0x20
ret
Function at 0x40dcf0
Capabilities:
Get file version info

Disassembly:
mov eax, 0x400c
call fcn.00421e40
push esi
push edi
mov ecx, 0xfff
xor eax, eax
lea edi, [esp + 0x16]
mov word [esp + 0x14], 0
rep stosd dword es:[edi], eax
mov esi, dword [esp + 0x4018]
stosw word es:[edi], ax
lea eax, [esp + 0xc]
push eax
push esi
call sub.VERSION.dll_GetFileVersionInfoSizeW
test eax, eax
je 0x40ddb9
cmp eax, 0x3fff
ja 0x40ddb9
lea ecx, [esp + 0x14]
push ecx
push eax
push 0
push esi
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x40ddb9
lea edx, [esp + 0x10]
lea eax, [esp + 8]
push edx
push eax
lea ecx, [esp + 0x1c]
push 0x429974
push ecx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40ddb9
mov eax, dword [esp + 8]
xor edx, edx
mov esi, dword [esp + 0x4020]
mov edi, dword [esp + 0x401c]
mov dx, word [eax + 0xc]
mov ecx, dword [eax + 0xc]
push edx
xor edx, edx
mov dx, word [eax + 8]
mov eax, dword [eax + 8]
shr ecx, 0x10
push ecx
push edx
shr eax, 0x10
push eax
push 0x429978
push esi
push edi
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x1c
mov word [edi + esi*2 - 2], 0
mov eax, 1
pop edi
pop esi
add esp, 0x400c
ret
pop edi
xor eax, eax
pop esi
add esp, 0x400c
ret

Function at 0x40ddd0
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov esi, eax
test esi, esi
jne 0x40ddf6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov eax, 1
je 0x40ddf8
mov eax, esi
pop esi
ret

Function at 0x40e2f0
Capabilities:
Create shortcut via ishelllink

Disassembly:
sub esp, 8
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x423f60
push 1
push 0
push 0x423f70
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40e39f
mov ecx, dword [esp]
test ecx, ecx
je 0x40e39f
mov eax, dword [esp + 0x10]
push esi
mov dword [esp + 8], 0
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x50]
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x18]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x1c]
push 0
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x44]
mov eax, dword [esp + 4]
lea edx, [esp + 8]
push edx
push 0x423ff0
mov ecx, dword [eax]
push eax
call dword [ecx]
mov esi, eax
test esi, esi
jl 0x40e392
mov eax, dword [esp + 8]
test eax, eax
je 0x40e392
mov edx, dword [esp + 0x10]
mov ecx, dword [eax]
push 1
push edx
push eax
call dword [ecx + 0x18]
mov esi, eax
mov eax, dword [esp + 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 4]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, esi
pop esi
add esp, 8
ret
Function at 0x40e430
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x40e]
mov word [ebp - 0x410], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [ebp + 0x14]
mov esi, dword [sym.imp.MSVCRT.dll__snwprintf]
mov eax, edi
and eax, 0xff
sub eax, 0x20
je 0x40e486
dec eax
jne 0x40e4a1
push str.Cookie
push 0x428180
lea eax, [ebp - 0x410]
push 0x103
push eax
jmp 0x40e49c
push str.IECache
push 0x428180
lea ecx, [ebp - 0x410]
push 0x103
push ecx
call esi
add esp, 0x10
cmp dword [0x42a908], ebx
je 0x40e5f3
cmp word [ebp - 0x410], bx
je 0x40e5f3
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x616]
mov word [ebp - 0x618], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x206]
mov word [ebp - 0x208], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [ebp - 0x618]
push 0x104
lea eax, [ebp - 0x410]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x618]
push ecx
mov ecx, 0x42a8b8
call fcn.004020e0
lea edx, [ebp - 0x208]
push eax
push edx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x208]
push 1
push eax
call fcn.0040dc50
lea ecx, [ebp - 0x208]
push ecx
call fcn.0040de00
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov word [ebp + eax*2 - 0x20a], bx
mov eax, dword [ebp + 8]
add esp, 0x10
cmp eax, ebx
je 0x40e586
mov ecx, dword [ebp + 0x20]
lea eax, [ebp - 0x208]
push eax
push 0x428180
push 0x103
push ecx
call esi
add esp, 0x10
xor eax, eax
lea esp, [ebp - 0x624]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
lea edx, [ebp - 0x208]
test edx, edx
jne 0x40e594
xor esi, esi
jmp 0x40e5ca
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.00421e40
mov esi, esp
push ebx
push ebx
push edi
push esi
lea ecx, [ebp - 0x208]
push 0xffffffffffffffff
push ecx
push ebx
push ebx
mov byte [esi], bl
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp + 0x20]
push esi
push 0x4299ac
push 0x103
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
xor eax, eax
lea esp, [ebp - 0x624]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
cmp dword [ebp + 8], ebx
je 0x40e61b
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x10]
push ecx
push edx
push edi
push eax
call dword [ebp + 0xc]
lea esp, [ebp - 0x624]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push eax
push edi
push ecx
call dword [ebp + 0xc]
lea esp, [ebp - 0x624]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
Function at 0x40f920
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4225f1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, ecx
push edi
mov dword [esp + 8], esi
call fcn.00420ad0
xor edi, edi
lea ecx, [esi + 0x34]
mov dword [esp + 0x14], edi
call fcn.004140a0
lea ecx, [esi + 0xab8]
mov byte [esp + 0x14], 1
call fcn.00414a70
lea ecx, [esi + 0xb08]
mov byte [esp + 0x14], 2
call fcn.0041a520
mov ecx, dword [esp + 0xc]
mov eax, 0xa
mov dword [esi + 0x24], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0xaf8], edi
mov dword [esi + 0xafc], edi
mov dword [esi + 0xb00], edi
mov dword [esi], 0x423adc
mov dword [esi + 0x2c], 0x1e
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x410ef0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
push esi
push edi
mov ebp, ecx
call fcn.00410e50
mov esi, dword [esp + 0x14]
xor edi, edi
cmp esi, edi
je 0x410fd8
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
je 0x410fd8
push ebx
push 0x83e
push esi
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
cmp ebx, edi
je 0x410f87
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
mov dword [esp + 0x18], eax
je 0x410f87
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
push esi
push 0x22
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, esi
mov esi, eax
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor edi, edi
mov eax, dword [ebp + 0xc]
pop ebx
cmp eax, edi
je 0x410fd8
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edi
push ecx
push 1
push eax
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x410fd8
cmp dword [esp + 0x14], edi
je 0x410fd8
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
cmp esi, edi
je 0x410fd3
mov ecx, dword [esp + 0x14]
lea eax, [esi + 4]
push eax
push ecx
mov dword [esi], 0x423afc
mov dword [eax], edi
call sub.gdiplus.dll_GdipLoadImageFromStream
mov dword [esi + 8], eax
jmp 0x410fd5
xor esi, esi
mov dword [ebp + 0x14], esi
mov esi, dword [ebp + 0x14]
cmp esi, edi
je 0x411032
mov eax, dword [esi + 4]
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], edi
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, edi
je 0x410ff8
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x14]
mov esi, dword [ebp + 0x14]
mov dword [ebp + 4], ecx
lea edx, [esp + 0x14]
mov eax, dword [esi + 4]
push edx
push eax
mov dword [esp + 0x1c], edi
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, edi
je 0x41101b
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x14]
xor eax, eax
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 4]
cmp ecx, edi
pop edi
pop esi
pop ebp
setg al
ret 8
pop edi
pop esi
xor eax, eax
pop ebp
ret 8
Function at 0x411ff0
Capabilities:
Move file
Read file on windows

Disassembly:
sub esp, 0x210
push ebx
push ebp
push esi
mov esi, dword [esp + 0x224]
xor ebp, ebp
push edi
push ebp
push esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
call fcn.0040dad0
add esp, 8
test eax, eax
jne 0x412072
mov ecx, 0x81
lea edi, [esp + 0x1a]
mov word [esp + 0x18], bp
push esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str._s.tmp
lea eax, [esp + 0x20]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
lea ecx, [esp + 0x28]
push ebp
push ecx
call fcn.0040dad0
add esp, 0x18
test eax, eax
je 0x412072
lea edx, [esp + 0x18]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov ebx, dword [esp + 0x22c]
cmp ebx, 2
jne 0x412079
mov ebx, 1
jmp 0x412079
mov ebx, dword [esp + 0x22c]
push 0x214
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
cmp edi, ebp
mov dword [esp + 0x10], edi
jne 0x4120a1
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x210
ret
mov ecx, 0x85
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
push esi
mov dword [eax + 0x208], ebx
call edi
add esp, 4
cmp eax, 0x103
jbe 0x4120ce
mov eax, 0x103
jmp 0x4120d4
push esi
call edi
add esp, 4
mov ecx, dword [esp + 0x10]
push eax
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_wcsncpy]
mov edx, dword [esp + 0x1c]
add esp, 0xc
cmp dword [edx + 0x208], 2
jne 0x412114
push 0x429a3c
push esi
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ecx, dword [esp + 0x18]
mov ebx, eax
mov eax, dword [esp + 0x22c]
add esp, 8
mov dword [eax], ecx
jmp 0x4121d2
push 0x429a44
push esi
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ebx, eax
add esp, 8
cmp ebx, ebp
jne 0x412133
mov dword [esp + 0x14], 1
jmp 0x4121a9
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push ebp
push ebx
call esi
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push ebx
mov ebp, eax
call esi
add esp, 0x1c
test ebp, ebp
jle 0x4121c3
lea edi, [ebp + 2]
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x4121a7
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
push 1
push ebp
push esi
rep stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.00411cd0
mov edi, eax
push esi
mov dword [esp + 0x30], edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x1c
test edi, edi
je 0x4121c3
xor ebp, ebp
cmp dword [esp + 0x10], ebp
je 0x4121d2
lea ecx, [esp + 0x10]
push ebp
push ecx
call fcn.004121f0
add esp, 8
mov dword [esp + 0x10], ebp
jmp 0x4121d2
mov edx, dword [esp + 0x224]
mov eax, dword [esp + 0x10]
xor ebp, ebp
mov dword [edx], eax
cmp ebx, ebp
je 0x4121e0
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
Function at 0x412740
Capabilities:
Delete file
Get file attributes
Move file
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x210
push ebx
push esi
mov esi, dword [esp + 0x21c]
push edi
test esi, esi
jne 0x412760
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x210
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
test bl, 1
mov dword [esp + 0xc], ebx
je 0x41277e
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x210
ret
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x16]
mov word [esp + 0x14], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x224]
push esi
test eax, eax
je 0x4127ba
push str._s.tmp
lea eax, [esp + 0x1c]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
jmp 0x4127de
push 0x428180
lea ecx, [esp + 0x1c]
push 0x103
push ecx
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [esp + 0x14]
push 0x429a3c
push edx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x412801
pop edi
pop esi
pop ebx
add esp, 0x210
ret
push ebp
push edi
push 1
lea eax, [esp + 0x1c]
push 2
push eax
mov dword [esp + 0x24], 0xfeff
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ebp, dword [esi + 0x20c]
add esp, 0x10
test ebp, ebp
je 0x41286a
mov ebx, dword [sym.imp.MSVCRT.dll_fwprintf]
mov ecx, dword [ebp]
push ecx
push str._r_n_s_r_n
push edi
call ebx
mov esi, dword [ebp + 0xc]
add esp, 0xc
test esi, esi
je 0x412858
mov edx, dword [esi]
push edx
push str._s_r_n
push edi
call ebx
mov esi, dword [esi + 4]
add esp, 0xc
test esi, esi
jne 0x412843
mov ebp, dword [ebp + 8]
test ebp, ebp
jne 0x41282d
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x224]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x22c]
add esp, 4
test eax, eax
pop ebp
je 0x4128a1
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
lea eax, [esp + 0x18]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x210
ret

Function at 0x412a40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0xc]
push ebx
push esi
push edi
mov edi, dword [esp + 0x1c]
and ecx, 0xffff
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x412a92
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x412a92
push ebp
mov ebp, dword [esp + 0x18]
test ebp, ebp
je 0x412a86
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp], eax
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
pop ebp
pop edi
pop esi
pop ebx
ret
pop edi
pop esi
xor eax, eax
pop ebx
ret