Function at 0x406020
Capabilities:
Print debug messages
Write file on windows

Disassembly:
sub esp, 0x12c
mov eax, dword [0x42b160]
xor eax, esp
mov dword [esp + 0x128], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebp
mov ebp, dword [esp + 0x138]
push esi
push edi
push 0
push 0
push 0xffffffffffffffff
push ebp
push 0
push 0
call ebx
mov esi, eax
inc esi
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041842a
add esp, 4
push esi
mov edi, eax
push edi
push 0xffffffffffffffff
push ebp
xor esi, esi
push esi
push esi
call ebx
lea eax, [esp + 0x1c]
push eax
mov ebx, vtable.Gdiplus::Image.0
push edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], esi
call sub.gdiplus.dll_GdipLoadImageFromFile
push edi
mov dword [esp + 0x24], eax
call fcn.00418b82
mov edx, dword [esp + 0x20]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x18], esi
call sub.gdiplus.dll_GdipGetImageType
cmp eax, esi
je 0x4060bd
mov dword [esp + 0x20], eax
cmp dword [esp + 0x10], esi
jne 0x4060e9
push 0x426828
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x1c]
push eax
mov dword [0x42c604], esi
mov dword [esp + 0x1c], ebx
call sub.gdiplus.dll_GdipDisposeImage
xor eax, eax
jmp 0x40620c
mov edx, dword [0x42c5fc]
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x18], esi
call sub.gdiplus.dll_GdipCreateFromHDC
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x28]
push eax
push ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], esi
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, esi
je 0x406121
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x28]
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], esi
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, esi
je 0x406140
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
push edi
push ecx
push esi
push esi
push edx
push ebx
call sub.gdiplus.dll_GdipDrawImageRectI
cmp dword [esp + 0x144], esi
je 0x4061e1
push 0x42c400
lea eax, [esp + 0x38]
push str._s_bk_img_bk.ini
push eax
mov dword [esp + 0x20], esi
call fcn.0041861e
add esp, 0xc
push esi
push 0x80
push 4
push esi
push 3
push 0x40000000
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4061bd
mov edx, dword [esp + 0x2c]
push edx
call sub.gdiplus.dll_GdipDeleteGraphics
mov eax, dword [esp + 0x1c]
push eax
mov dword [esp + 0x1c], vtable.Gdiplus::Image.0
call sub.gdiplus.dll_GdipDisposeImage
xor eax, eax
jmp 0x40620c
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4061c2
push esi
lea ecx, [esp + 0x18]
push ecx
sub eax, edx
push eax
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x2c]
push edx
mov dword [0x42c604], 1
call sub.gdiplus.dll_GdipDeleteGraphics
mov eax, dword [esp + 0x1c]
push eax
mov dword [esp + 0x1c], vtable.Gdiplus::Image.0
call sub.gdiplus.dll_GdipDisposeImage
mov eax, 1
mov ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041869b
add esp, 0x12c
ret