Function at 0x401050
Capabilities:
Delete file
Get common file path
Hide graphical window
Read file on windows
Resolve function by parsing pe exports
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x68c
mov eax, dword [0x43304c]
xor eax, esp
mov dword [esp + 0x688], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [esp + 0x70]
push esi
push edi
push 0x104
push eax
push 0
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp word [esp + eax*2 + 0x78], 0x5c
je 0x401091
dec eax
jmp 0x401086
add eax, eax
cmp eax, 0x208
jae 0x4014aa
xor ecx, ecx
mov word [esp + eax + 0x78], cx
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.0040c2fc
cmp dword [eax], 2
jne 0x40128c
call fcn.0040c302
push 0x42f65c
mov dword [esp + 0x6c], 0x474e5089
mov dword [esp + 0x70], 0xa1a0a0d
mov eax, dword [eax]
mov dword [esp + 0x10], 0
push dword [eax + 4]
lea eax, [esp + 0x14]
push eax
call fcn.0040c3be
add esp, 0xc
test eax, eax
jne 0x401146
push dword [esp + 0xc]
lea eax, [esp + 0x5c]
push 8
push 1
push eax
call fcn.0040c5f6
add esp, 0x10
cmp eax, 8
jne 0x401146
push dword [esp + 0xc]
call fcn.0040c7a8
add esp, 4
xor ecx, ecx
nop
mov al, byte [esp + ecx + 0x68]
cmp al, byte [esp + ecx + 0x58]
jne 0x401146
inc ecx
cmp ecx, 8
jb 0x401120
call fcn.0040c302
xor ecx, ecx
mov edx, dword [eax]
mov edx, dword [edx + 4]
call fcn.004024a0
jmp 0x401270
lea eax, [esp + 0x488]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x280]
push eax
push 0
push 0x42f620
lea eax, [esp + 0x494]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
call fcn.0040c302
push 0
mov dword [esp + 0x6c], 1
mov dword [esp + 0x70], 0
mov eax, dword [eax]
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov edi, dword [eax + 4]
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.gdiplus.dll_GdiplusStartup]
push 0x10
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov esi, eax
test esi, esi
je 0x4011dc
lea eax, [esi + 4]
mov dword [esi], vtable.Gdiplus::Image.0
push eax
push edi
mov dword [eax], 0
call dword [sym.imp.gdiplus.dll_GdipLoadImageFromFile]
mov dword [esi + 8], eax
jmp 0x4011de
xor esi, esi
mov eax, dword [esi + 8]
mov dword [esi + 8], 0
test eax, eax
jne 0x40123c
lea edx, [esp + 0x58]
call fcn.004014b0
test eax, eax
je 0x40123c
push 0
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x288]
push eax
push dword [esi + 4]
call dword [sym.imp.gdiplus.dll_GdipSaveImageToFile]
mov ecx, esi
push 1
test eax, eax
je 0x40121e
mov dword [esi + 8], eax
jmp 0x401240
mov eax, dword [esi]
call dword [eax]
push dword [esp + 0xc]
call dword [sym.imp.gdiplus.dll_GdiplusShutdown]
lea edx, [esp + 0x280]
xor ecx, ecx
call fcn.004024a0
jmp 0x401262
push 1
mov ecx, esi
mov eax, dword [esi]
call dword [eax]
push dword [esp + 0xc]
call dword [sym.imp.gdiplus.dll_GdiplusShutdown]
push 0x10
push 0x42f5ec
push str.Cannot_convert_this_image
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea eax, [esp + 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x688]
xor ecx, esp
call fcn.004082ae
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [sym.imp.USER32.dll_LoadIconW]
push 0x84
push ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x401940
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], ebx
call edi
mov esi, dword [sym.imp.USER32.dll_LoadCursorW]
push 0x7f03
push 0
mov dword [esp + 0x2c], eax
call esi
mov ebx, dword [sym.imp.USER32.dll_RegisterClassW]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], str.GYAZOWIN
call ebx
mov eax, dword [esp + 0xc]
push 0x84
push eax
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], 0x401650
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], eax
call edi
push 0x7f03
push 0
mov dword [esp + 0x2c], eax
call esi
push 0
mov dword [esp + 0x2c], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], str.GYAZOWINL
call ebx
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x4c
call esi
push 0x4d
mov ebx, eax
call esi
mov edi, eax
push 0x4e
mov dword [esp + 0x6c], edi
call esi
push 0x4f
mov dword [esp + 0x5c], eax
call esi
push 0
mov dword [0x434e90], edi
mov edi, dword [esp + 0x10]
push edi
push 0
push 0
push 0
push 0
push 0
push 0
push 0x80000000
push 0
push str.GYAZOWIN
push 0x80000a8
mov dword [esp + 0x68], eax
mov dword [0x434e94], ebx
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov esi, eax
test esi, esi
jne 0x4013d7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x688]
xor ecx, esp
call fcn.004082ae
mov esp, ebp
pop ebp
ret 0x10
push 0
push dword [esp + 0x3c]
push dword [esp + 0x60]
push dword [esp + 0x74]
push ebx
push esi
call dword [sym.imp.USER32.dll_MoveWindow]
push 5
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
push 0
push 0x64
push 1
push esi
call dword [sym.imp.USER32.dll_SetTimer]
push 0
push edi
push 0
push esi
push 0x12c
push 0x12c
push 0x64
push 0x64
push 0x80000000
push 0
push str.GYAZOWINL
push 0x8080080
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 3
push 0x64
push 0xff
push eax
mov dword [0x434e98], eax
call dword [sym.imp.USER32.dll_SetLayeredWindowAttributes]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
lea eax, [esp + 0x3c]
push 0
push 0
push 0
push eax
call esi
test eax, eax
je 0x40148f
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
nop dword [eax]
lea eax, [esp + 0x3c]
push eax
call edi
lea eax, [esp + 0x3c]
push eax
call ebx
push 0
push 0
push 0
lea eax, [esp + 0x48]
push eax
call esi
test eax, eax
jne 0x401470
mov ecx, dword [esp + 0x694]
mov eax, dword [esp + 0x44]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004082ae
mov esp, ebp
pop ebp
ret 0x10
call fcn.004083de
int3