Function at 0x465710
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5fb8e8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6f1550]
xor eax, esp
push eax
lea eax, [esp + 0x5c]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x28], esi
xor ebp, ebp
cmp dword [esi + 0x188], ebp
sete bl
test bl, bl
je 0x465778
mov eax, dword [esi + 0xec]
push eax
call fcn.004093a0
add esp, 4
test al, al
sete bl
test bl, bl
je 0x465778
mov eax, dword [esi + 0xec]
push eax
call fcn.0040d4a0
add esp, 4
test al, al
sete bl
mov ecx, esi
call fcn.00455530
cmp eax, 2
mov dword [esp + 0x30], eax
jne 0x4657a1
test bl, bl
je 0x4657a1
mov eax, dword [esi + 0xf0]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x20]
push eax
call edx
mov ecx, esi
call fcn.00455530
lea ecx, [esp + 0x1c]
call fcn.00401a30
mov dword [esp + 0x64], ebp
mov dword [esp + 0x14], ebp
mov byte [esp + 0x64], 1
mov eax, dword [esi + 0x188]
cmp eax, ebp
mov dword [esp + 0x18], ebp
je 0x46584f
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push ebp
push eax
mov eax, dword [ecx + 0x2c]
call eax
cmp eax, ebp
jge 0x4657fe
push eax
push str.GetDIB_failed__hr___08x
lea ecx, [esp + 0x24]
push ecx
call fcn.0040ada0
mov byte [esp + 0x70], 0
push ebp
call fcn.0059b05f
add esp, 0x10
jmp 0x465b1f
mov edx, dword [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
call fcn.004131c0
mov eax, dword [esi + 0x188]
mov ebx, dword [esp + 0x14]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push ebx
push eax
mov eax, dword [ecx + 0x2c]
call eax
cmp eax, ebp
jge 0x4658ca
push eax
lea ecx, [esp + 0x20]
push str.GetDIB_failed__hr___08x
push ecx
call fcn.0040ada0
mov byte [esp + 0x70], 0
push ebx
call fcn.0059b05f
add esp, 0x10
jmp 0x465b1f
mov eax, dword [esi + 0xfc]
mov edx, dword [eax]
mov edx, dword [edx + 0x90]
push ebp
lea ecx, [esp + 0x1c]
push ecx
push eax
call edx
cmp eax, ebp
jge 0x46587a
push eax
push str.GetCurrentImage_failed__hr___08x
lea eax, [esp + 0x24]
push eax
jmp 0x4657e6
mov ecx, dword [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.004131c0
mov eax, dword [esi + 0xfc]
mov ebx, dword [esp + 0x14]
mov edx, dword [eax]
mov edx, dword [edx + 0x90]
push ebx
lea ecx, [esp + 0x1c]
push ecx
push eax
call edx
cmp eax, ebp
jge 0x4658ca
push eax
lea eax, [esp + 0x20]
push str.GetCurrentImage_failed__hr___08x
push eax
call fcn.0040ada0
mov byte [esp + 0x70], 0
push ebx
call fcn.0059b05f
add esp, 0x10
jmp 0x465b1f
mov word [esp + 0x34], 0x4d42
mov dword [esp + 0x3e], 0x36
movzx ecx, word [ebx + 0xe]
cmp cx, 8
ja 0x465909
mov eax, dword [ebx + 0x20]
cmp eax, ebp
je 0x4658f7
lea ecx, [eax*4 + 0x36]
mov dword [esp + 0x3e], ecx
jmp 0x465909
mov edx, 1
shl edx, cl
lea eax, [edx*4 + 0x36]
mov dword [esp + 0x3e], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x6c]
add ecx, 0xe
mov dword [esp + 0x36], ecx
push edx
lea ecx, [esp + 0x28]
mov word [esp + 0x40], bp
mov word [esp + 0x3e], bp
call fcn.00401f00
mov byte [esp + 0x64], 3
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x28]
call fcn.00429af0
mov edi, eax
mov byte [esp + 0x64], 4
mov eax, dword [edi]
mov esi, dword [eax - 0xc]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, esi
or eax, ecx
jge 0x465964
push esi
mov ecx, edi
call fcn.004019e0
mov eax, dword [edi]
lea ecx, [esi + 1]
push ecx
push eax
call fcn.005c06e2
push eax
call fcn.00401310
add esp, 0xc
cmp esi, ebp
jl 0x465b7c
mov eax, dword [edi]
cmp esi, dword [eax - 8]
jg 0x465b7c
mov dword [eax - 0xc], esi
mov edx, dword [edi]
mov byte [esi + edx], 0
mov esi, dword [edi]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
sub esi, 0x10
call edx
cmp dword [esi + 0xc], ebp
lea ecx, [esi + 0xc]
jl 0x4659bd
cmp eax, dword [esi]
jne 0x4659bd
mov edi, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x4659f4
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
cmp edi, ebp
jne 0x4659d6
call fcn.00401810
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
add eax, 1
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.005bf888
add esp, 0x10
add edi, 0x10
mov dword [esp + 0x20], edi
mov byte [esp + 0x64], 7
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x465a20
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x64], 9
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x465a45
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x20]
push str..bmp
push ecx
call fcn.005c0e71
add esp, 8
cmp eax, ebp
sete al
test al, al
je 0x465abe
mov edx, dword [esp + 0x6c]
push 0x617cc8
push edx
call fcn.005c248b
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x465a96
push str.Cannot_create_file
lea ecx, [esp + 0x20]
call fcn.00401e80
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x20]
call fcn.00401aa0
jmp 0x465b0d
push esi
push 0xe
lea eax, [esp + 0x3c]
push 1
push eax
call fcn.005c2073
mov ecx, dword [esp + 0x28]
push esi
push ecx
push 1
push ebx
call fcn.005c2073
push esi
call fcn.005c234b
add esp, 0x24
jmp 0x465ae8
mov edx, dword [esp + 0x20]
push str..jpg
push edx
call fcn.005c0e71
add esp, 8
cmp eax, ebp
sete al
test al, al
je 0x465ae8
mov eax, dword [esp + 0x6c]
push ebx
push eax
lea ecx, [esp + 0x4c]
call fcn.004286a0
mov byte [esp + 0x64], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x465b0d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x64], 0
push ebx
call fcn.0059b05f
mov esi, dword [esp + 0x2c]
add esp, 4
mov eax, dword [esp + 0x1c]
cmp dword [eax - 0xc], ebp
mov dword [esp + 0x14], ebp
je 0x465b34
push ebp
push ebp
push eax
call fcn.005a9608
cmp dword [esp + 0x30], 2
jne 0x465b55
mov ecx, esi
call fcn.00455530
cmp eax, 2
je 0x465b55
mov eax, dword [esi + 0xf0]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push eax
call edx
mov dword [esp + 0x64], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00401aa0
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 4
push 0x80070057
call fcn.00401480
int3